AttributeElement Class
An attribute applied to an assembly, a type, a member or a parameter.
public sealed class AttributeElementProperties
| Name | Description |
|---|---|
| ConstructorArguments | Gets the arguments of the constructor. A value is a primitive value, a String, a TypeReference for typeof, an IReadOnlyList<T> of values for an array, or null. The list is empty when the values cannot be decoded, for instance when an enum type cannot be found. |
| NamedArguments | Gets the values of the properties and fields set by the attribute, by name. The values have the same shape as AttributeElement.ConstructorArguments. |
| Type | Gets the type of the attribute. |
ConstructorArguments
AttributeElement.csGets the arguments of the constructor. A value is a primitive value, a String, a TypeReference for typeof, an IReadOnlyList<T> of values for an array, or null. The list is empty when the values cannot be decoded, for instance when an enum type cannot be found.
public IReadOnlyList<object?> ConstructorArguments { get; }Property value
NamedArguments
AttributeElement.csGets the values of the properties and fields set by the attribute, by name. The values have the same shape as AttributeElement.ConstructorArguments.
public IReadOnlyDictionary<string, object?> NamedArguments { get; }Property value
Methods
| Name | Description |
|---|---|
| ToString() | Returns the type of the attribute. |