static private IsCustomAttributeDefined ( |
||
decoratedModule | ||
decoratedMetadataToken | int | |
attributeFilterType | RuntimeType | |
return | bool |
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); }
internal static bool IsDefined(RuntimeType type, RuntimeType caType, bool inherit) { if (type.GetElementType() != null) { return(false); } if (PseudoCustomAttribute.IsDefined(type, caType)) { return(true); } if (CustomAttribute.IsCustomAttributeDefined(type.GetRuntimeModule(), type.MetadataToken, caType)) { return(true); } if (!inherit) { return(false); } type = (type.BaseType as RuntimeType); while (type != null) { if (CustomAttribute.IsCustomAttributeDefined(type.GetRuntimeModule(), type.MetadataToken, caType, 0, inherit)) { return(true); } type = (type.BaseType as RuntimeType); } return(false); }
internal static bool IsDefined(RuntimeFieldInfo field, RuntimeType caType) { if (PseudoCustomAttribute.IsDefined(field, caType)) { return(true); } return(CustomAttribute.IsCustomAttributeDefined(field.GetRuntimeModule(), field.MetadataToken, caType)); }
internal static bool IsDefined(RuntimeEventInfo e, RuntimeType caType) { if (PseudoCustomAttribute.IsDefined(e, caType)) { return(true); } return(CustomAttribute.IsCustomAttributeDefined(e.GetRuntimeModule(), e.MetadataToken, caType)); }
internal static bool IsDefined(RuntimePropertyInfo property, RuntimeType caType) { if (PseudoCustomAttribute.IsDefined(property, caType)) { return(true); } return(CustomAttribute.IsCustomAttributeDefined(property.GetRuntimeModule(), property.MetadataToken, caType)); }
internal static bool IsDefined(RuntimeConstructorInfo ctor, RuntimeType caType) { if (PseudoCustomAttribute.IsDefined(ctor, caType)) { return(true); } return(CustomAttribute.IsCustomAttributeDefined(ctor.GetRuntimeModule(), ctor.MetadataToken, caType)); }
internal static bool IsDefined(RuntimeAssembly assembly, RuntimeType caType) { if (PseudoCustomAttribute.IsDefined(assembly, caType)) { return(true); } return(CustomAttribute.IsCustomAttributeDefined(assembly.ManifestModule as RuntimeModule, RuntimeAssembly.GetToken(assembly.GetNativeHandle()), caType)); }
internal static bool IsDefined(RuntimeParameterInfo parameter, RuntimeType caType) { if (PseudoCustomAttribute.IsDefined(parameter, caType)) { return(true); } return(CustomAttribute.IsCustomAttributeDefined(parameter.GetRuntimeModule(), parameter.MetadataToken, caType)); }
internal static bool IsDefined(RuntimeModule module, RuntimeType caType) { if (PseudoCustomAttribute.IsDefined(module, caType)) { return(true); } RuntimeModule decoratedModule = module; int metadataToken = decoratedModule.MetadataToken; RuntimeType attributeFilterType = caType; return(CustomAttribute.IsCustomAttributeDefined(decoratedModule, metadataToken, attributeFilterType)); }
private static bool IsCustomAttributeDefined(RuntimeModule decoratedModule, int decoratedMetadataToken, RuntimeType attributeFilterType) { return(CustomAttribute.IsCustomAttributeDefined(decoratedModule, decoratedMetadataToken, attributeFilterType, 0, false)); }
internal static bool IsAttributeDefined(RuntimeModule decoratedModule, int decoratedMetadataToken, int attributeCtorToken) { return(CustomAttribute.IsCustomAttributeDefined(decoratedModule, decoratedMetadataToken, (RuntimeType)null, attributeCtorToken, false)); }
internal static bool IsDefined(RuntimeModule module, RuntimeType caType) { return(PseudoCustomAttribute.IsDefined(module, caType) || CustomAttribute.IsCustomAttributeDefined(module, module.MetadataToken, caType)); }