Table of Contents

Interface IObjectTypeShape

Namespace
TypeShape.Abstractions
Assembly
TypeShape.dll

Provides a strongly typed shape model for a .NET object.

public interface IObjectTypeShape : ITypeShape
Inherited Members

Properties

HasConstructor

Determines whether the current type includes a constructor shape.

bool HasConstructor { get; }

Property Value

bool

HasProperties

Determines whether the current type defines any property shapes.

bool HasProperties { get; }

Property Value

bool

IsRecordType

Determines whether the current shape represents a C# record type.

bool IsRecordType { get; }

Property Value

bool

IsTupleType

Determines whether the current shape represents a tuple type, either Tuple or ValueTuple.

bool IsTupleType { get; }

Property Value

bool

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.