14 private string description;
34 if (value.Length == 0)
36 throw new ArgumentException(SR.GetString(
"InvalidNullEmptyArgument",
"value"),
"value");
98 arrayList.
AddRange(customAttributes);
100 for (
int i = 0; i < types.Length; i++)
102 GetAllRecursive(types[i], arrayList);
105 arrayList.
CopyTo(array, 0);
109 private static void GetAllRecursive(
Type type,
ArrayList switchAttribs)
111 GetAllRecursive((
MemberInfo)type, switchAttribs);
113 for (
int i = 0; i < members.Length; i++)
115 if (!(members[i] is
Type))
117 GetAllRecursive(members[i], switchAttribs);
125 switchAttribs.
AddRange(customAttributes);
Obtains information about the attributes of a member and provides access to member metadata.
string SwitchDescription
Gets or sets the description of the switch.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
Represents the base class for custom attributes.
virtual int Count
Gets the number of elements actually contained in the T:System.Collections.ArrayList.
BindingFlags
Specifies flags that control binding and the way in which the search for members and types is conduct...
abstract object [] GetCustomAttributes(bool inherit)
When overridden in a derived class, returns an array of all custom attributes applied to this member.
MemberInfo [] GetMembers()
Returns all the public members of the current T:System.Type.
virtual object [] GetCustomAttributes(bool inherit)
Gets all the custom attributes for this assembly.
string SwitchName
Gets or sets the display name of the switch.
virtual void AddRange(ICollection c)
Adds the elements of an T:System.Collections.ICollection to the end of the T:System....
Represents an assembly, which is a reusable, versionable, and self-describing building block of a com...
Represents type declarations: class types, interface types, array types, value types,...
SwitchAttribute(string switchName, Type switchType)
Initializes a new instance of the T:System.Diagnostics.SwitchAttribute class, specifying the name and...
virtual void CopyTo(Array array)
Copies the entire T:System.Collections.ArrayList to a compatible one-dimensional T:System....
Type SwitchType
Gets or sets the type of the switch.
virtual Type [] GetTypes()
Gets the types defined in this assembly.
AttributeTargets
Specifies the application elements on which it is valid to apply an attribute.
The exception that is thrown when one of the arguments provided to a method is not valid.
Identifies a switch used in an assembly, class, or member.
static SwitchAttribute [] GetAll(Assembly assembly)
Returns all switch attributes for the specified assembly.
Implements the T:System.Collections.IList interface using an array whose size is dynamically increase...