public GetCustomAttributes ( Type attributeType, bool inherit ) : Object[] | ||
attributeType | Type | |
inherit | bool | |
return | Object[] |
private void WriteCustomAttributes(XmlWriter writer, Module module) { WriteCustomAttributes(writer, module.GetCustomAttributes(this.rep.DocumentInheritedAttributes), "module"); }
public static Attribute GetCustomAttribute (Module element, Type attributeType, bool inherit) { // neither parameter is allowed to be null CheckParameters (element, attributeType); // Module inheritance hierarchies CAN NOT be searched for attributes, so the second // parameter of GetCustomAttributes () is IGNORED. object[] attributes = element.GetCustomAttributes (attributeType, inherit); return FindAttribute (attributes); }
public static Attribute[] GetCustomAttributes (Module element, Type attributeType, bool inherit) { // element parameter is not allowed to be null CheckParameters (element, attributeType); return (Attribute []) element.GetCustomAttributes (attributeType, inherit); }
public static Attribute[] GetCustomAttributes(Module element, bool inherit) { if (element == null) throw new ArgumentNullException(nameof(element)); Contract.EndContractBlock(); return (Attribute[])element.GetCustomAttributes(typeof(Attribute), inherit); }
public static Attribute[] GetCustomAttributes(Module element, Type attributeType, bool inherit) { if (element == null) throw new ArgumentNullException(nameof(element)); if (attributeType == null) throw new ArgumentNullException(nameof(attributeType)); if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute)) throw new ArgumentException(Environment.GetResourceString("Argument_MustHaveAttributeBaseClass")); Contract.EndContractBlock(); return (Attribute[])element.GetCustomAttributes(attributeType, inherit); }
public static bool HasCustomAttribute <T>(this Module element) where T : Attribute => element.GetCustomAttributes <T>().FirstOrDefault() != null;
public static ILookup<string, string> GetElements(Module module) { return module.GetCustomAttributes(typeof(ElementalAttribute)) .Cast<ElementalAttribute>() .MakeLookup(); }
public static Attribute[] GetCustomAttributes(Module element, bool inherit) { if (element == null) { throw new ArgumentNullException("element"); } return (Attribute[]) element.GetCustomAttributes(typeof(Attribute), inherit); }
public static Attribute[] GetCustomAttributes(Module element, Type attributeType, bool inherit) { if (element == null) { throw new ArgumentNullException("element"); } if (attributeType == null) { throw new ArgumentNullException("attributeType"); } if (!attributeType.IsSubclassOf(typeof(Attribute)) && (attributeType != typeof(Attribute))) { throw new ArgumentException(Environment.GetResourceString("Argument_MustHaveAttributeBaseClass")); } return (Attribute[]) element.GetCustomAttributes(attributeType, inherit); }
internal static Object[] GetCustomAttributes(Module target, Type caType, bool inherit) { if (!target.Assembly.ReflectionOnly) return target.GetCustomAttributes(caType, inherit); return CustomAttribute.ExtractCustomAttribute(CustomAttributeData.GetCustomAttributes(target), caType); }
public static IList <CustomAttributeData> GetCustomAttributes(Module target) { return(GetData(target.GetCustomAttributes(true))); }
public override object[] GetCustomAttributesImpl(Module mod, Type attributeType, bool inherit) { System.Diagnostics.Debug.WriteLine("In GetCustomAttributesImpl 1"); #if !DEBUG || true var name = mod.Name; if (mod.Name.Contains("IKVM.OpenJDK") || name.Contains("CodenameOne") || name.Contains("HelloWindows")) { return new JavaModuleAttribute[] { new JavaModuleAttribute() }; } #endif var s = mod.GetCustomAttributes(attributeType).ToArray(); return s; }
public static IEnumerable <T> GetCustomAttributes <T>(this Module element) where T : Attribute { return((IEnumerable <T>)element.GetCustomAttributes(typeof(T))); }
public static Attribute[] GetCustomAttributes (Module element, bool inherit) { // element parameter is not allowed to be null CheckParameters (element, typeof (Attribute)); return (Attribute []) element.GetCustomAttributes (inherit); }