System.Reflection.CustomAttribute.IsCustomAttributeDefined C# (CSharp) Method

IsCustomAttributeDefined() static private method

static private IsCustomAttributeDefined ( Module decoratedModule, int decoratedMetadataToken, RuntimeType attributeFilterType ) : bool
decoratedModule Module
decoratedMetadataToken int
attributeFilterType RuntimeType
return bool
        internal static bool IsCustomAttributeDefined(
            Module decoratedModule, int decoratedMetadataToken, RuntimeType attributeFilterType)
        {
            return IsCustomAttributeDefined(decoratedModule, decoratedMetadataToken, attributeFilterType, false);
        }

Same methods

CustomAttribute::IsCustomAttributeDefined ( Module decoratedModule, int decoratedMetadataToken, RuntimeType attributeFilterType, bool mustBeInheritable ) : bool

Usage Example

 internal static bool IsDefined(RuntimeMethodInfo method, RuntimeType caType, bool inherit)
 {
     if (PseudoCustomAttribute.IsDefined(method, caType))
     {
         return(true);
     }
     if (CustomAttribute.IsCustomAttributeDefined(method.GetRuntimeModule(), method.MetadataToken, caType))
     {
         return(true);
     }
     if (!inherit)
     {
         return(false);
     }
     method = method.GetParentDefinition();
     while (method != null)
     {
         if (CustomAttribute.IsCustomAttributeDefined(method.GetRuntimeModule(), method.MetadataToken, caType, 0, inherit))
         {
             return(true);
         }
         method = method.GetParentDefinition();
     }
     return(false);
 }
All Usage Examples Of System.Reflection.CustomAttribute::IsCustomAttributeDefined