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

IsDefined() static private method

static private IsDefined ( RuntimePropertyInfo property, RuntimeType caType ) : bool
property RuntimePropertyInfo
caType RuntimeType
return bool
        internal static bool IsDefined(RuntimePropertyInfo property, RuntimeType caType)
        {
            ASSERT.PRECONDITION(property != null);

            if (PseudoCustomAttribute.IsDefined(property, caType))
                return true;

            return IsCustomAttributeDefined(property.Module, property.MetadataToken, caType);
        }

Same methods

CustomAttribute::IsDefined ( Assembly assembly, RuntimeType caType ) : bool
CustomAttribute::IsDefined ( Module module, RuntimeType caType ) : bool
CustomAttribute::IsDefined ( ParameterInfo parameter, RuntimeType caType ) : bool
CustomAttribute::IsDefined ( RuntimeConstructorInfo ctor, RuntimeType caType ) : bool
CustomAttribute::IsDefined ( RuntimeEventInfo e, RuntimeType caType ) : bool
CustomAttribute::IsDefined ( RuntimeFieldInfo field, RuntimeType caType ) : bool
CustomAttribute::IsDefined ( RuntimeMethodInfo method, RuntimeType caType, bool inherit ) : bool
CustomAttribute::IsDefined ( RuntimeType type, RuntimeType caType, bool inherit ) : bool

Usage Example

Exemplo n.º 1
0
 public override bool IsDefined(Type attributeType, bool inherit)
 {
     return(CustomAttribute.IsDefined(this, attributeType, inherit));
 }