Class UndocumentedContract
- Namespace
- ShapeShift.Schema
- Assembly
- ShapeShift.dll
Describes a value whose serialized representation is deliberately left unspecified.
public sealed class UndocumentedContract : DataContract
- Inheritance
-
UndocumentedContract
- Inherited Members
Remarks
ShapeShift emits this contract rather than guessing at a representation it cannot know. The most common cause is a custom ShapeShiftConverter<TEncoder, TDecoder> that does not override GetContract(ContractContext<TEncoder, TDecoder>).
Consumers should treat this as "any value" and surface Reason to their users so that the gap can be closed at its source.
Constructors
UndocumentedContract(Type, string)
Describes a value whose serialized representation is deliberately left unspecified.
public UndocumentedContract(Type dataType, string reason)
Parameters
dataTypeType- The .NET type that this contract describes.
reasonstringA human-readable explanation of why the representation is unknown.
Remarks
ShapeShift emits this contract rather than guessing at a representation it cannot know. The most common cause is a custom ShapeShiftConverter<TEncoder, TDecoder> that does not override GetContract(ContractContext<TEncoder, TDecoder>).
Consumers should treat this as "any value" and surface Reason to their users so that the gap can be closed at its source.
Properties
ConverterType
Gets the converter responsible for the representation, when one is known.
public Type? ConverterType { get; init; }
Property Value
Kind
Gets the kind of this contract, which identifies the concrete subclass.
public override DataContractKind Kind { get; }
Property Value
Reason
Gets a human-readable explanation of why the representation is unknown.
public string Reason { get; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.