Class SourceGenTypeShape<T>
- Namespace
- PolyType.SourceGenModel
- Assembly
- PolyType.dll
Source generator model for type shapes.
public abstract class SourceGenTypeShape<T> : ITypeShape<T>, ITypeShape
Type Parameters
T
The type that the shape describes.
- Inheritance
-
SourceGenTypeShape<T>
- Implements
-
ITypeShape<T>
- Derived
- Inherited Members
Properties
AssociatedTypeShapes
Gets the shape of an associated type, by its name.
public Func<string, ITypeShape?>? AssociatedTypeShapes { get; init; }
Property Value
CreateEventsFunc
Gets the factory method for creating event shapes.
public Func<IEnumerable<IEventShape>>? CreateEventsFunc { get; init; }
Property Value
CreateMethodsFunc
Gets the factory method for creating method shapes.
public Func<IEnumerable<IMethodShape>>? CreateMethodsFunc { get; init; }
Property Value
Events
Gets all available event shapes for the given type.
public IReadOnlyList<IEventShape> Events { get; }
Property Value
- IReadOnlyList<IEventShape>
An enumeration of all available method shapes.
Kind
Gets determines the TypeShapeKind that the current shape supports.
public abstract TypeShapeKind Kind { get; }
Property Value
Methods
Gets all available method shapes for the given type.
public IReadOnlyList<IMethodShape> Methods { get; }
Property Value
- IReadOnlyList<IMethodShape>
An enumeration of all available method shapes.
Provider
Gets the provider used to generate this instance.
public required ITypeShapeProvider Provider { get; init; }
Property Value
Methods
Accept(TypeShapeVisitor, object?)
Accepts a TypeShapeVisitor for type graph traversal.
public abstract object? Accept(TypeShapeVisitor visitor, object? state = null)
Parameters
visitor
TypeShapeVisitorThe visitor to accept.
state
objectThe state parameter to pass to the underlying visitor.