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 : TypeMemberAdapter<MethodInfo>, 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
| IsConversionOperator | Gets a value indicating whether the method is a conversion operator. |
| IsSpecialName | Gets a value indicating whether the member is a special name. |
| IsStatic | Gets a value indicating whether the member is static. |
| IsUnsafe | Gets a value indicating whether this member is declared as unsafe. |
| Name | Gets the name of the metadata element. |
| Overloads | Gets all the overloads of the member, excluding the member itself. |
| Parameters | Gets all the parameters declared by the member. |
| Return | Gets the return parameter of the member. |
Methods
| GetCodeReferenceParts() | Retrieves the code reference parts for this member. |
| GetMemberVisibility() | Retrieves the visibility of the member. |
| GetParameters() | Retrieves the parameters of the operator overload. |
| GetReturnParameter() | Retrieves the return parameter of the operator overload. |
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. |
