Class GenericExtensions
Provides extension methods to work with generic declarations.
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public static class GenericExtensions : Object
Methods
Name | Description |
---|---|
ForTypeInstance(IConstructor, INamedType) | Returns a representation of the current IConstructor, but for a different generic instance of the declaring type. |
ForTypeInstance(IEvent, INamedType) | Returns a representation of the current IEvent, but for a different generic instance of the declaring type. |
ForTypeInstance(IField, INamedType) | Returns a representation of the current IField, but for a different generic instance of the declaring type. |
ForTypeInstance(IMethod, INamedType) | Returns a representation of the current IMethod, but for a different generic instance of the declaring type. |
ForTypeInstance(INamedType, INamedType) | Returns a representation of the current nested INamedType, but for a different generic instance of the declaring type. |
ForTypeInstance(IProperty, INamedType) | Returns a representation of the current IProperty, but for a different generic instance of the declaring type. |
GetOriginalDefinition(IConstructor) | Gets the original declaration of the IDeclaration, i.e. the declaration where all type parameters are unbound, including the ones of the containing types. |
GetOriginalDefinition(IDeclaration) | Gets the original declaration of the IDeclaration, i.e. the declaration where all type parameters are unbound, including the ones of the containing types. |
GetOriginalDefinition(IEvent) | Gets the original declaration of the IDeclaration, i.e. the declaration where all type parameters are unbound, including the ones of the containing types. |
GetOriginalDefinition(IMember) | Gets the original declaration of the IDeclaration, i.e. the declaration where all type parameters are unbound, including the ones of the containing types. |
GetOriginalDefinition(IMemberOrNamedType) | Gets the original declaration of the IDeclaration, i.e. the declaration where all type parameters are unbound, including the ones of the containing types. |
GetOriginalDefinition(IMethod) | Gets the original declaration of the IDeclaration, i.e. the declaration where all type parameters are unbound, including the ones of the containing types. |
GetOriginalDefinition(INamedType) | Gets the original declaration of the IDeclaration, i.e. the declaration where all type parameters are unbound, including the ones of the containing types. |
GetOriginalDefinition(IProperty) | Gets the original declaration of the IDeclaration, i.e. the declaration where all type parameters are unbound, including the ones of the containing types. |
IsSelfOrDeclaringTypeGeneric(IMemberOrNamedType) | Returns |
WithTypeArguments(IMethod, IType[]) | Constructs a generic instance of an IMethod, with type arguments given as IType. |
WithTypeArguments(IMethod, IReadOnlyList<IType>) | |
WithTypeArguments(IMethod, IReadOnlyList<Type>) | |
WithTypeArguments(IMethod, IReadOnlyList<Type>, IReadOnlyList<Type>) | |
WithTypeArguments(IMethod, Type[]) | Constructs a generic instance of an IMethod, with type arguments given as reflection Type. |
WithTypeArguments(IMethod, Type[], Type[]) | |
WithTypeArguments(INamedType, IType[]) | Constructs a generic instance of an INamedType, with type arguments given as IType. |
WithTypeArguments(INamedType, IReadOnlyList<Type>) | |
WithTypeArguments(INamedType, Type[]) | Constructs a generic instance of an INamedType, with type arguments given a reflection Type. |