Class AheadOfTimeTypeDescriber

An ITypeDescriber that use (de)serializer that was generated ahead of time by using Cesil.SourceGenerator.

Inheritance
System.Object
AheadOfTimeTypeDescriber
Implements
ITypeDescriber
System.IEquatable<AheadOfTimeTypeDescriber>
Namespace: Cesil
Assembly: Cesil.dll
Syntax
public sealed class AheadOfTimeTypeDescriber : Object, ITypeDescriber, IEquatable<AheadOfTimeTypeDescriber>

Constructors

AheadOfTimeTypeDescriber()

Create a new AheadOfTimeTypeDescriber.

Note that a pre-allocated instance is also available on TypeDescribers.

Declaration
public AheadOfTimeTypeDescriber()

Methods

EnumerateMembersToDeserialize(TypeInfo)

Enumerate members which will be deserialized for the given type.

Note that these members are generated ahead of time with a source gneerator, and cannot be changed at runtime.

Declaration
public IEnumerable<DeserializableMember> EnumerateMembersToDeserialize(TypeInfo forType)
Parameters
Type Name Description
System.Reflection.TypeInfo forType
Returns
Type Description
System.Collections.Generic.IEnumerable<DeserializableMember>

EnumerateMembersToSerialize(TypeInfo)

Enumerate members which will be serialized for the given type.

Note that these members are generated ahead of time with a source gneerator, and cannot be changed at runtime.

Declaration
public IEnumerable<SerializableMember> EnumerateMembersToSerialize(TypeInfo forType)
Parameters
Type Name Description
System.Reflection.TypeInfo forType
Returns
Type Description
System.Collections.Generic.IEnumerable<SerializableMember>

Equals(AheadOfTimeTypeDescriber)

Returns true if this and the given AheadOfTimeTypeDescribers are equal

Declaration
public bool Equals(AheadOfTimeTypeDescriber typeDescriber)
Parameters
Type Name Description
AheadOfTimeTypeDescriber typeDescriber
Returns
Type Description
System.Boolean

Equals(Object)

Returns true if this AheadOfTimeTypeDescriber equals the given object

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean

GetCellsForDynamicRow(WriteContext, Object, Span<DynamicCellValue>)

This operation is not supported with AheadOfTimeTypeDescriber

Declaration
public int GetCellsForDynamicRow(in WriteContext context, object row, Span<DynamicCellValue> cells)
Parameters
Type Name Description
WriteContext context
System.Object row
System.Span<DynamicCellValue> cells
Returns
Type Description
System.Int32

GetDynamicCellParserFor(ReadContext, TypeInfo)

This operation is not supported with AheadOfTimeTypeDescriber

Declaration
public Parser GetDynamicCellParserFor(in ReadContext context, TypeInfo targetType)
Parameters
Type Name Description
ReadContext context
System.Reflection.TypeInfo targetType
Returns
Type Description
Parser

GetDynamicRowConverter(ReadContext, IEnumerable<ColumnIdentifier>, TypeInfo)

This operation is not supported with AheadOfTimeTypeDescriber

Declaration
public DynamicRowConverter GetDynamicRowConverter(in ReadContext context, IEnumerable<ColumnIdentifier> columns, TypeInfo targetType)
Parameters
Type Name Description
ReadContext context
System.Collections.Generic.IEnumerable<ColumnIdentifier> columns
System.Reflection.TypeInfo targetType
Returns
Type Description
DynamicRowConverter

GetHashCode()

Returns a hash code for this AheadOfTimeTypeDescriber

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

GetInstanceProvider(TypeInfo)

Returns an InstanceProvider that can be used to create new instance of the given type while deserializing.

Note that this InstanceProvider is generated ahead of time with a source gneerator, and cannot be changed at runtime.

Declaration
public InstanceProvider GetInstanceProvider(TypeInfo forType)
Parameters
Type Name Description
System.Reflection.TypeInfo forType
Returns
Type Description
InstanceProvider

ToString()

Returns a representation of this AheadOfTimeTypeDescriber object.

Only for debugging, this value is not guaranteed to be stable.

Declaration
public override string ToString()
Returns
Type Description
System.String

Operators

Equality(AheadOfTimeTypeDescriber, AheadOfTimeTypeDescriber)

Compare two AheadOfTimeTypeDescribers for equality

Declaration
public static bool operator ==(AheadOfTimeTypeDescriber a, AheadOfTimeTypeDescriber b)
Parameters
Type Name Description
AheadOfTimeTypeDescriber a
AheadOfTimeTypeDescriber b
Returns
Type Description
System.Boolean

Inequality(AheadOfTimeTypeDescriber, AheadOfTimeTypeDescriber)

Compare two AheadOfTimeTypeDescribers for inequality

Declaration
public static bool operator !=(AheadOfTimeTypeDescriber a, AheadOfTimeTypeDescriber b)
Parameters
Type Name Description
AheadOfTimeTypeDescriber a
AheadOfTimeTypeDescriber b
Returns
Type Description
System.Boolean

Explicit Interface Implementations

ITypeDescriber.GetCellsForDynamicRow(WriteContext, Object, Span<DynamicCellValue>)

Declaration
int ITypeDescriber.GetCellsForDynamicRow(in WriteContext context, object row, Span<DynamicCellValue> cells)
Parameters
Type Name Description
WriteContext context
System.Object row
System.Span<DynamicCellValue> cells
Returns
Type Description
System.Int32

ITypeDescriber.GetDynamicCellParserFor(ReadContext, TypeInfo)

Declaration
Parser ITypeDescriber.GetDynamicCellParserFor(in ReadContext context, TypeInfo targetType)
Parameters
Type Name Description
ReadContext context
System.Reflection.TypeInfo targetType
Returns
Type Description
Parser

ITypeDescriber.GetDynamicRowConverter(ReadContext, IEnumerable<ColumnIdentifier>, TypeInfo)

Declaration
DynamicRowConverter ITypeDescriber.GetDynamicRowConverter(in ReadContext context, IEnumerable<ColumnIdentifier> columns, TypeInfo targetType)
Parameters
Type Name Description
ReadContext context
System.Collections.Generic.IEnumerable<ColumnIdentifier> columns
System.Reflection.TypeInfo targetType
Returns
Type Description
DynamicRowConverter

Implements

ITypeDescriber
System.IEquatable<>
In This Article
Back to top Generated by DocFX