class Attribute

in global :: System

Represents the base class for custom attributes.


public bool Equals( object obj )

Returns a value that indicates whether this instance is equal to a specified object.

  • obj An to compare with this instance or .
  • Returns if and this instance are of the same type and have identical field values; otherwise, .

public static Attribute GetCustomAttribute( Assembly element, Type attributeType )

Retrieves a custom attribute applied to a specified assembly. Parameters specify the assembly and the type of the custom attribute to search for.

  • element An object derived from the class that describes a reusable collection of modules.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns A reference to the single custom attribute of type that is applied to , or if there is no such attribute.

public static Attribute GetCustomAttribute( Assembly element, Type attributeType, bool inherit )

Retrieves a custom attribute applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option.

  • element An object derived from the class that describes a reusable collection of modules.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit This parameter is ignored, and does not affect the operation of this method.
  • Returns A reference to the single custom attribute of type that is applied to , or if there is no such attribute.

public static Attribute GetCustomAttribute( MemberInfo element, Type attributeType )

Retrieves a custom attribute applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a constructor, event, field, method, or property member of a class.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns A reference to the single custom attribute of type that is applied to , or if there is no such attribute.

public static Attribute GetCustomAttribute( MemberInfo element, Type attributeType, bool inherit )

Retrieves a custom attribute applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member.

  • element An object derived from the class that describes a constructor, event, field, method, or property member of a class.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit If , specifies to also search the ancestors of for custom attributes.
  • Returns A reference to the single custom attribute of type that is applied to , or if there is no such attribute.

public static Attribute GetCustomAttribute( Module element, Type attributeType )

Retrieves a custom attribute applied to a module. Parameters specify the module, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a portable executable file.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns A reference to the single custom attribute of type that is applied to , or if there is no such attribute.

public static Attribute GetCustomAttribute( Module element, Type attributeType, bool inherit )

Retrieves a custom attribute applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option.

  • element An object derived from the class that describes a portable executable file.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit This parameter is ignored, and does not affect the operation of this method.
  • Returns A reference to the single custom attribute of type that is applied to , or if there is no such attribute.

public static Attribute GetCustomAttribute( ParameterInfo element, Type attributeType )

Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a parameter of a member of a class.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns A reference to the single custom attribute of type that is applied to , or if there is no such attribute.

public static Attribute GetCustomAttribute( ParameterInfo element, Type attributeType, bool inherit )

Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter.

  • element An object derived from the class that describes a parameter of a member of a class.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit If , specifies to also search the ancestors of for custom attributes.
  • Returns A reference to the single custom attribute of type that is applied to , or if there is no such attribute.

public static Attribute[] GetCustomAttributes( Assembly element )

Retrieves an array of the custom attributes applied to an assembly. A parameter specifies the assembly.

  • element An object derived from the class that describes a reusable collection of modules.
  • Returns An array that contains the custom attributes applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( Assembly element, bool inherit )

Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, and an ignored search option.

  • element An object derived from the class that describes a reusable collection of modules.
  • inherit This parameter is ignored, and does not affect the operation of this method.
  • Returns An array that contains the custom attributes applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( Assembly element, Type attributeType )

Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a reusable collection of modules.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns An array that contains the custom attributes of type applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( Assembly element, Type attributeType, bool inherit )

Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option.

  • element An object derived from the class that describes a reusable collection of modules.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit This parameter is ignored, and does not affect the operation of this method.
  • Returns An array that contains the custom attributes of type applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( MemberInfo element )

Retrieves an array of the custom attributes applied to a member of a type. A parameter specifies the member.

  • element An object derived from the class that describes a constructor, event, field, method, or property member of a class.
  • Returns An array that contains the custom attributes applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( MemberInfo element, bool inherit )

Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member.

  • element An object derived from the class that describes a constructor, event, field, method, or property member of a class.
  • inherit If , specifies to also search the ancestors of for custom attributes.
  • Returns An array that contains the custom attributes applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( MemberInfo element, Type attributeType )

Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a constructor, event, field, method, or property member of a class.
  • type The type, or a base type, of the custom attribute to search for.
  • Returns An array that contains the custom attributes of type applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( MemberInfo element, Type attributeType, bool inherit )

Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member.

  • element An object derived from the class that describes a constructor, event, field, method, or property member of a class.
  • type The type, or a base type, of the custom attribute to search for.
  • inherit If , specifies to also search the ancestors of for custom attributes.
  • Returns An array that contains the custom attributes of type applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( Module element )

Retrieves an array of the custom attributes applied to a module. A parameter specifies the module.

  • element An object derived from the class that describes a portable executable file.
  • Returns An array that contains the custom attributes applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( Module element, bool inherit )

Retrieves an array of the custom attributes applied to a module. Parameters specify the module, and an ignored search option.

  • element An object derived from the class that describes a portable executable file.
  • inherit This parameter is ignored, and does not affect the operation of this method.
  • Returns An array that contains the custom attributes applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( Module element, Type attributeType )

Retrieves an array of the custom attributes applied to a module. Parameters specify the module, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a portable executable file.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns An array that contains the custom attributes of type applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( Module element, Type attributeType, bool inherit )

Retrieves an array of the custom attributes applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option.

  • element An object derived from the class that describes a portable executable file.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit This parameter is ignored, and does not affect the operation of this method.
  • Returns An array that contains the custom attributes of type applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( ParameterInfo element )

Retrieves an array of the custom attributes applied to a method parameter. A parameter specifies the method parameter.

  • element An object derived from the class that describes a parameter of a member of a class.
  • Returns An array that contains the custom attributes applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( ParameterInfo element, bool inherit )

Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, and whether to search ancestors of the method parameter.

  • element An object derived from the class that describes a parameter of a member of a class.
  • inherit If , specifies to also search the ancestors of for custom attributes.
  • Returns An array that contains the custom attributes applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( ParameterInfo element, Type attributeType )

Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a parameter of a member of a class.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns An array that contains the custom attributes of type applied to , or an empty array if no such custom attributes exist.

public static Attribute[] GetCustomAttributes( ParameterInfo element, Type attributeType, bool inherit )

Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter.

  • element An object derived from the class that describes a parameter of a member of a class.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit If , specifies to also search the ancestors of for custom attributes.
  • Returns An array that contains the custom attributes of type applied to , or an empty array if no such custom attributes exist.

public static bool IsDefined( Assembly element, Type attributeType )

Determines whether any custom attributes are applied to an assembly. Parameters specify the assembly, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a reusable collection of modules.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns if a custom attribute of type is applied to ; otherwise, .

public static bool IsDefined( Assembly element, Type attributeType, bool inherit )

Determines whether any custom attributes are applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option.

  • element An object derived from the class that describes a reusable collection of modules.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit This parameter is ignored, and does not affect the operation of this method.
  • Returns if a custom attribute of type is applied to ; otherwise, .

public static bool IsDefined( MemberInfo element, Type attributeType )

Determines whether any custom attributes are applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a constructor, event, field, method, type, or property member of a class.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns if a custom attribute of type is applied to ; otherwise, .

public static bool IsDefined( MemberInfo element, Type attributeType, bool inherit )

Determines whether any custom attributes are applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member.

  • element An object derived from the class that describes a constructor, event, field, method, type, or property member of a class.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit If , specifies to also search the ancestors of for custom attributes.
  • Returns if a custom attribute of type is applied to ; otherwise, .

public static bool IsDefined( Module element, Type attributeType )

Determines whether any custom attributes of a specified type are applied to a module. Parameters specify the module, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a portable executable file.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns if a custom attribute of type is applied to ; otherwise, .

public static bool IsDefined( Module element, Type attributeType, bool inherit )

Determines whether any custom attributes are applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option.

  • element An object derived from the class that describes a portable executable file.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit This parameter is ignored, and does not affect the operation of this method.
  • Returns if a custom attribute of type is applied to ; otherwise, .

public static bool IsDefined( ParameterInfo element, Type attributeType )

Determines whether any custom attributes are applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for.

  • element An object derived from the class that describes a parameter of a member of a class.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • Returns if a custom attribute of type is applied to ; otherwise, .

public static bool IsDefined( ParameterInfo element, Type attributeType, bool inherit )

Determines whether any custom attributes are applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter.

  • element An object derived from the class that describes a parameter of a member of a class.
  • attributeType The type, or a base type, of the custom attribute to search for.
  • inherit If , specifies to also search the ancestors of for custom attributes.
  • Returns if a custom attribute of type is applied to ; otherwise, .

public bool Match( object obj )

When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

  • obj An to compare with this instance of .
  • Returns if this instance equals ; otherwise, .

public object TypeId { get; }

When implemented in a derived class, gets a unique identifier for this .

  • Returns An that is a unique identifier for the attribute.

public Type GetType( )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public bool IsDefaultAttribute( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.