Class SourceGenMethodShape<TDeclaringType, TArgumentState, TResult>
- Namespace
- PolyType.SourceGenModel
- Assembly
- PolyType.dll
Source generator model for method shapes.
public sealed class SourceGenMethodShape<TDeclaringType, TArgumentState, TResult> : IMethodShape<TDeclaringType, TArgumentState, TResult>, IMethodShape where TArgumentState : IArgumentState
Type Parameters
TDeclaringTypeThe type declaring the method.
TArgumentStateThe mutable state type used for aggregating method arguments.
TResultThe return type of the underlying method.
- Inheritance
-
SourceGenMethodShape<TDeclaringType, TArgumentState, TResult>
- Implements
-
IMethodShape<TDeclaringType, TArgumentState, TResult>
- Inherited Members
Properties
ArgumentStateConstructor
Gets a delegate for creating argument state constructor.
public required Func<TArgumentState> ArgumentStateConstructor { get; init; }
Property Value
- Func<TArgumentState>
AttributeFactory
Gets a constructor delegate for the custom attribute provider of the method.
public Func<SourceGenAttributeInfo[]>? AttributeFactory { get; init; }
Property Value
DeclaringType
Gets the shape of the declaring type for the method.
public required ITypeShape<TDeclaringType> DeclaringType { get; init; }
Property Value
- ITypeShape<TDeclaringType>
IsAsync
public bool IsAsync { get; init; }
Property Value
IsPublic
Gets a value indicating whether the method is declared public.
public bool IsPublic { get; init; }
Property Value
IsStatic
Gets a value indicating whether the method is static.
public bool IsStatic { get; init; }
Property Value
IsVoidLike
public bool IsVoidLike { get; init; }
Property Value
Remarks
When true the ReturnType is reported as Unit,
MethodBaseFactory
Gets the method base resolver factory.
public Func<MethodBase?>? MethodBaseFactory { get; init; }
Property Value
MethodInvoker
Gets a delegate for invoking the method.
public required MethodInvoker<TDeclaringType?, TArgumentState, TResult> MethodInvoker { get; init; }
Property Value
- MethodInvoker<TDeclaringType, TArgumentState, TResult>
Name
Gets the name of the method.
public required string Name { get; init; }
Property Value
ParametersFactory
Gets a factory method for creating parameter shapes.
public Func<IEnumerable<IParameterShape>>? ParametersFactory { get; init; }
Property Value
ReturnType
Gets the shape of the return type of the method.
public required ITypeShape<TResult> ReturnType { get; init; }
Property Value
- ITypeShape<TResult>