Class ManualTypeDescriber

An ITypeDescriber that takes lets you register explicit members to return when one of the EnumerateXXX() methods are called.

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

Methods

CreateBuilder()

Create a new ManualTypeDescriberBuilder which fallbacks to TypeDescribers.Default when a type with no registered members is requested.

Declaration
public static ManualTypeDescriberBuilder CreateBuilder()
Returns
Type Description
ManualTypeDescriberBuilder

CreateBuilder(ManualTypeDescriber)

Create a new ManualTypeDescriberBuilder that copies it's initial values from the given ManualTypeDescriber.

Declaration
public static ManualTypeDescriberBuilder CreateBuilder(ManualTypeDescriber typeDescriber)
Parameters
Type Name Description
ManualTypeDescriber typeDescriber
Returns
Type Description
ManualTypeDescriberBuilder

CreateBuilder(ManualTypeDescriberFallbackBehavior)

Create a new empty ManualTypeDescriberBuilder with the given fallback behavior, and a fallback ITypeDescriber of TypeDescribers.Default.

Declaration
public static ManualTypeDescriberBuilder CreateBuilder(ManualTypeDescriberFallbackBehavior fallbackBehavior)
Parameters
Type Name Description
ManualTypeDescriberFallbackBehavior fallbackBehavior
Returns
Type Description
ManualTypeDescriberBuilder

CreateBuilder(ManualTypeDescriberFallbackBehavior, ITypeDescriber)

Create a new empty ManualTypeDescriberBuilder with the given fallback behavior.

Declaration
public static ManualTypeDescriberBuilder CreateBuilder(ManualTypeDescriberFallbackBehavior fallbackBehavior, ITypeDescriber fallbackTypeDescriber)
Parameters
Type Name Description
ManualTypeDescriberFallbackBehavior fallbackBehavior
ITypeDescriber fallbackTypeDescriber
Returns
Type Description
ManualTypeDescriberBuilder

EnumerateMembersToDeserialize(TypeInfo)

Enumerate all the members on forType to deserialize.

If no members has been registered, will either delegate to a fallback ITypeProvider or throw an exception depending on configuration.

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 all the members on forType to serialize.

If no members has been registered, will either delegate to a fallback ITypeProvider or throw an exception depending on configuration.

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

Equals(ManualTypeDescriber)

Returns true if this ManualTypeDescriber equals the given ManualTypeDescriber.

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

Equals(Object)

Returns true if this ManualTypeDescriber 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>)

Operation not supported, raises exception if used.

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)

Operation not supported, raises exception if used.

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)

Operation not supported, raises exception if used.

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 stable hash for this ManualTypeDescriber.

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

GetInstanceProvider(TypeInfo)

Returns the registered InstanceProvider for the given TypeInfo.

If no provider has been registered, will either delegate to a fallback ITypeProvider or throw an exception depending on configuration.

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

ToString()

Returns a representation of this ManualTypeDescriber object.

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

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

Operators

Equality(ManualTypeDescriber, ManualTypeDescriber)

Compare two ManualTypeDescriber for equality

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

Inequality(ManualTypeDescriber, ManualTypeDescriber)

Compare two ManualTypeDescriber for inequality

Declaration
public static bool operator !=(ManualTypeDescriber a, ManualTypeDescriber b)
Parameters
Type Name Description
ManualTypeDescriber a
ManualTypeDescriber 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