CustomAttributeAdapter Class
- Namespace
- Kampute.DocToolkit.Metadata.Adapters
- Assembly
- Kampute.DocToolkit.dll
Definition
An adapter that wraps a CustomAttributeData and provides metadata access.
public class CustomAttributeAdapter : ICustomAttribute- Inheritance
- object
- CustomAttributeAdapter
- Implements
Remarks
This class serves as a bridge between the reflection-based CustomAttributeData and the metadata representation defined by the ICustomAttribute interface. It provides access to attribute-level information regardless of whether the assembly containing the attribute was loaded via Common Language Runtime (CLR) or Metadata Load Context (MLC).
Thread Safety
All public members of the type are guaranteed to be thread-safe.
Constructors
| CustomAttributeAdapter(CustomAttributeData, AttributeTarget) | Initializes a new instance of the CustomAttributeAdapter class. |
Fields
| SystemAttributePatterns | The collection of patterns that identify attributes applied by the system/compiler. |
Properties
| ConstructorArguments | Gets the constructor arguments used to create the attribute. |
| IsImplicitlyApplied | Gets a value indicating whether the attribute is applied by the compiler. |
| NamedArguments | Gets the named arguments (properties and fields) set on the attribute. |
| Native | Gets the underlying CustomAttributeData instance. |
| Target | Gets the target of the attribute. |
| Type | Gets the type of the attribute. |
Methods
| CreateTypedValue(CustomAttributeTypedArgument) | Converts a custom attribute typed argument into a TypedValue, handling array arguments by wrapping element values in an array of TypedValue instances. |
| Represents(CustomAttributeData) | Determines whether this metadata adapter represents the specified reflection element. |
