Doublet Struct

Encapsulates the element type and the value transformation logic (sugarcoater) for a constructor parameter representing a child XML element.

C#
public readonly struct Doublet
Inheritance
Doublet

Remarks

This is used to determine the actual type of the object to be created for a child element and how to wrap it (e.g., with BindResult<T>) if necessary.

Properties

ElementType

Gets the element type (e.g., T or BindResult<T>).

Sugarcoater

Gets the sugarcoater.

Methods

Of(Type)

Creates a new Doublet for the specified constructor parameter type.

Equals(object) (Inherited from ValueType)
GetHashCode() (Inherited from ValueType)
ToString() (Inherited from ValueType)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)

Properties Detail

ElementType

Gets the element type (e.g., T or BindResult<T>).

C#
public Type ElementType { get; }

Property Value

Sugarcoater

Gets the sugarcoater.

C#
public Sugarcoater<object> Sugarcoater { get; }

Property Value

Methods Detail

Of(Type)

Creates a new Doublet for the specified constructor parameter type.

C#
public static Doublet Of(Type type)

Parameters

type
Type

The type.

Returns

The new doublet.