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
Methods
GetDerivedTypeFor(Type, DerivedTypeId)
Get the derived type for a target type.
Type GetDerivedTypeFor(Type targetType, DerivedTypeId derivedTypeId)
Parameters
targetTypeTypeTarget type to get for.
derivedTypeIdDerivedTypeIdThe 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
derivedTypeTypeDerived type to get from.
Returns
- Type
The target type.
HasDerivatives(Type)
Check if a type has derivative types.
bool HasDerivatives(Type type)
Parameters
typeTypeType 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
typeTypeType to check.
Returns
- bool
True if it is a derived type, false if not.