Interface IObjectTypeShape
- Namespace
- PolyType.Abstractions
- Assembly
- PolyType.dll
Provides a strongly typed shape model for a .NET object.
public interface IObjectTypeShape : ITypeShape
- Inherited Members
Properties
HasConstructor
Gets a value indicating whether the current type includes a constructor shape.
bool HasConstructor { get; }
Property Value
HasProperties
Gets a value indicating whether the current type defines any property shapes.
bool HasProperties { get; }
Property Value
IsRecordType
Gets a value indicating whether the current shape represents a C# record type.
bool IsRecordType { get; }
Property Value
IsTupleType
Gets a value indicating whether the current shape represents a tuple type, either Tuple or ValueTuple.
bool IsTupleType { get; }
Property Value
Methods
GetConstructor()
Gets the constructor shape for the given type, if available.
IConstructorShape? GetConstructor()
Returns
- IConstructorShape
A IConstructorShape representation of the constructor.
GetProperties()
Gets all available property/field shapes for the given type.
IEnumerable<IPropertyShape> GetProperties()
Returns
- IEnumerable<IPropertyShape>
An enumeration of all available property/field shapes.