Interface IDerivedTypes

Namespace
Cratis.Serialization
Assembly
Cratis.Fundamentals.dll

Defines a system that tracks derived types and the target type they represents.

public interface IDerivedTypes
Extension Methods

Properties

TypesWithDerivatives

Gets all the types that has derivatives.

IEnumerable<Type> TypesWithDerivatives { get; }

Property Value

IEnumerable<Type>

Methods

GetDerivedTypeFor(Type, DerivedTypeId)

Get the derived type for a target type.

Type GetDerivedTypeFor(Type targetType, DerivedTypeId derivedTypeId)

Parameters

targetType Type

Target type to get for.

derivedTypeId DerivedTypeId

The unique identifier of the derived type.

Returns

Type

The derived type.

GetTargetTypeFor(Type)

Get the target type from a derived type.

Type GetTargetTypeFor(Type derivedType)

Parameters

derivedType Type

Derived type to get from.

Returns

Type

The target type.

HasDerivatives(Type)

Check if a type has derivative types.

bool HasDerivatives(Type type)

Parameters

type Type

Type to check.

Returns

bool

True if it has derivatives, false if not.

IsDerivedType(Type)

Check if a type is a derived type.

bool IsDerivedType(Type type)

Parameters

type Type

Type to check.

Returns

bool

True if it is a derived type, false if not.