OperatorAdapter Class
- Namespace
- Kampute.DocToolkit.Metadata.Adapters
- Assembly
- Kampute.DocToolkit.dll
Definition
An adapter that wraps a MethodInfo representing an operator overload and provides metadata access.
public class OperatorAdapter : MethodBaseAdapter, IOperator- Inheritance
- Implements
Remarks
This class serves as a bridge between the reflection-based MethodInfo and the metadata representation defined by the IOperator interface. It provides access to operator-level information regardless of whether the assembly containing the operator's type 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
| OperatorAdapter(IType, MethodInfo) | Initializes a new instance of the OperatorAdapter class. |
Properties
| ImplementedOperator | Gets the interface operator that this operator implements, if any. |
| IsConversionOperator | Gets a value indicating whether the operator is a conversion operator. |
| IsUnsafe | Gets a value indicating whether this member is declared as unsafe. |
| MethodName | Gets the name of the operator method as defined by the reflection API. |
| Name | Gets the name of the metadata element. |
| Overloads | Gets all the overloads of the member, excluding the member itself. |
| OverriddenOperator | Gets the base operator that this operator overrides, if any. |
Methods
| FindGenericDefinition() | Searches for the generic definition of this member if it is a constructed generic member. |
| FindImplementedMember() | Searches the implemented interfaces for a member that this member implements. |
| GetCodeReferenceParts() | Retrieves the code reference parts for this member. |
| GetOperatorsWithSameName(IType, bool) | Retrieves operators from the specified type that have the same name as this operator. |
Extension Methods
| GetInheritedMember(this IMember) | Retrieves the member that this member directly inherits from. |
| GetMemberDefinition(this IMember) | Retrieves the definition of the member, resolving any constructed or decorated forms to their underlying definitions. |
| TryGetOwnTypeParameters(this IMember, out IEnumerable<ITypeParameter>) | Attempts to get the type parameters declared directly by the specified member if it is generic. |
