MsgPack.Serialization.PolymorphismSchema Class Reference

A provider parameter to support polymorphism. More...

Static Public Member Functions

static PolymorphismSchema ForPolymorphicObject (Type targetType)
 Creates a new instance of the PolymorphismSchema class for non-collection object which uses type embedding based polymorphism. More...
 
static PolymorphismSchema ForPolymorphicObject (Type targetType, Func< PolymorphicTypeVerificationContext, bool > typeVerifier)
 Creates a new instance of the PolymorphismSchema class for non-collection object which uses type embedding based polymorphism. More...
 
static PolymorphismSchema ForPolymorphicObject (Type targetType, IDictionary< string, Type > codeTypeMapping)
 Creates a new instance of the PolymorphismSchema class for non-collection object which uses ext-type code mapping based polymorphism. More...
 
static PolymorphismSchema ForContextSpecifiedCollection (Type targetType, PolymorphismSchema itemSchema)
 Creates a new instance of the PolymorphismSchema class for collection object which uses declared type or context specified concrete type. More...
 
static PolymorphismSchema ForPolymorphicCollection (Type targetType, PolymorphismSchema itemSchema)
 Creates a new instance of the PolymorphismSchema class for collection object which uses type embedding based polymorphism. More...
 
static PolymorphismSchema ForPolymorphicCollection (Type targetType, PolymorphismSchema itemSchema, Func< PolymorphicTypeVerificationContext, bool > typeVerifier)
 Creates a new instance of the PolymorphismSchema class for collection object which uses type embedding based polymorphism. More...
 
static PolymorphismSchema ForPolymorphicCollection (Type targetType, IDictionary< string, Type > codeTypeMapping, PolymorphismSchema itemSchema)
 Creates a new instance of the PolymorphismSchema class for collection object which uses ext-type code mapping based polymorphism. More...
 
static PolymorphismSchema ForContextSpecifiedDictionary (Type targetType, PolymorphismSchema keySchema, PolymorphismSchema valueSchema)
 Creates a new instance of the PolymorphismSchema class for dictionary object which uses declared type or context specified concrete type. More...
 
static PolymorphismSchema ForPolymorphicDictionary (Type targetType, PolymorphismSchema keySchema, PolymorphismSchema valueSchema)
 Creates a new instance of the PolymorphismSchema class for dictionary object which uses type embedding based polymorphism. More...
 
static PolymorphismSchema ForPolymorphicDictionary (Type targetType, PolymorphismSchema keySchema, PolymorphismSchema valueSchema, Func< PolymorphicTypeVerificationContext, bool > typeVerifier)
 Creates a new instance of the PolymorphismSchema class for dictionary object which uses type embedding based polymorphism. More...
 
static PolymorphismSchema ForPolymorphicDictionary (Type targetType, IDictionary< string, Type > codeTypeMapping, PolymorphismSchema keySchema, PolymorphismSchema valueSchema)
 Creates a new instance of the PolymorphismSchema class for dictionary object which uses ext-type code mapping based polymorphism. More...
 
static PolymorphismSchema ForPolymorphicTuple (Type targetType, PolymorphismSchema[] itemSchemaList)
 Creates a new instance of the PolymorphismSchema class for Tuple object. More...
 

Detailed Description

A provider parameter to support polymorphism.

Member Function Documentation

◆ ForContextSpecifiedCollection()

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForContextSpecifiedCollection ( Type  targetType,
PolymorphismSchema  itemSchema 
)
static

Creates a new instance of the PolymorphismSchema class for collection object which uses declared type or context specified concrete type.

Parameters
targetTypeThe type of the serialization target.
itemSchemaThe schema for collection items of the serialization target collection.
Returns
A new instance of the PolymorphismSchema class for collection object which uses declared type or context specified concrete type.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForContextSpecifiedDictionary()

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForContextSpecifiedDictionary ( Type  targetType,
PolymorphismSchema  keySchema,
PolymorphismSchema  valueSchema 
)
static

Creates a new instance of the PolymorphismSchema class for dictionary object which uses declared type or context specified concrete type.

Parameters
targetTypeThe type of the serialization target.
keySchemaThe schema for dictionary keys of the serialization target dictionary.
valueSchemaThe schema for dictionary values of the serialization target dictionary.
Returns
A new instance of the PolymorphismSchema class for dictionary object which uses declared type or context specified concrete type.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForPolymorphicCollection() [1/3]

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForPolymorphicCollection ( Type  targetType,
IDictionary< string, Type >  codeTypeMapping,
PolymorphismSchema  itemSchema 
)
static

Creates a new instance of the PolymorphismSchema class for collection object which uses ext-type code mapping based polymorphism.

Parameters
targetTypeThe type of the serialization target.
codeTypeMappingThe code type mapping which maps between ext-type codes and .NET Types.
itemSchemaThe schema for collection items of the serialization target collection.
Returns
A new instance of the PolymorphismSchema class for collection object which uses ext-type code mapping based polymorphism.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForPolymorphicCollection() [2/3]

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForPolymorphicCollection ( Type  targetType,
PolymorphismSchema  itemSchema 
)
static

Creates a new instance of the PolymorphismSchema class for collection object which uses type embedding based polymorphism.

Parameters
targetTypeThe type of the serialization target.
itemSchemaThe schema for collection items of the serialization target collection.
Returns
A new instance of the PolymorphismSchema class for collection object which uses type embedding based polymorphism.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForPolymorphicCollection() [3/3]

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForPolymorphicCollection ( Type  targetType,
PolymorphismSchema  itemSchema,
Func< PolymorphicTypeVerificationContext, bool >  typeVerifier 
)
static

Creates a new instance of the PolymorphismSchema class for collection object which uses type embedding based polymorphism.

Parameters
targetTypeThe type of the serialization target.
itemSchemaThe schema for collection items of the serialization target collection.
typeVerifierThe delegate which verifies loading type in runtime type polymorphism.
Returns
A new instance of the PolymorphismSchema class for collection object which uses type embedding based polymorphism.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForPolymorphicDictionary() [1/3]

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForPolymorphicDictionary ( Type  targetType,
IDictionary< string, Type >  codeTypeMapping,
PolymorphismSchema  keySchema,
PolymorphismSchema  valueSchema 
)
static

Creates a new instance of the PolymorphismSchema class for dictionary object which uses ext-type code mapping based polymorphism.

Parameters
targetTypeThe type of the serialization target.
codeTypeMappingThe code type mapping which maps between ext-type codes and .NET Types.
keySchemaThe schema for dictionary keys of the serialization target dictionary.
valueSchemaThe schema for dictionary values of the serialization target dictionary.
Returns
A new instance of the PolymorphismSchema class for dictionary object which uses ext-type code mapping based polymorphism.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForPolymorphicDictionary() [2/3]

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForPolymorphicDictionary ( Type  targetType,
PolymorphismSchema  keySchema,
PolymorphismSchema  valueSchema 
)
static

Creates a new instance of the PolymorphismSchema class for dictionary object which uses type embedding based polymorphism.

Parameters
targetTypeThe type of the serialization target.
keySchemaThe schema for dictionary keys of the serialization target dictionary.
valueSchemaThe schema for dictionary values of the serialization target dictionary.
Returns
A new instance of the PolymorphismSchema class for dictionary object which uses type embedding based polymorphism.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForPolymorphicDictionary() [3/3]

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForPolymorphicDictionary ( Type  targetType,
PolymorphismSchema  keySchema,
PolymorphismSchema  valueSchema,
Func< PolymorphicTypeVerificationContext, bool >  typeVerifier 
)
static

Creates a new instance of the PolymorphismSchema class for dictionary object which uses type embedding based polymorphism.

Parameters
targetTypeThe type of the serialization target.
keySchemaThe schema for dictionary keys of the serialization target dictionary.
valueSchemaThe schema for dictionary values of the serialization target dictionary.
typeVerifierThe delegate which verifies loading type in runtime type polymorphism.
Returns
A new instance of the PolymorphismSchema class for dictionary object which uses type embedding based polymorphism.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForPolymorphicObject() [1/3]

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForPolymorphicObject ( Type  targetType)
static

Creates a new instance of the PolymorphismSchema class for non-collection object which uses type embedding based polymorphism.

Parameters
targetTypeThe type of the serialization target.
Returns
A new instance of the PolymorphismSchema class for non-collection object which uses type embedding based polymorphism.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForPolymorphicObject() [2/3]

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForPolymorphicObject ( Type  targetType,
Func< PolymorphicTypeVerificationContext, bool >  typeVerifier 
)
static

Creates a new instance of the PolymorphismSchema class for non-collection object which uses type embedding based polymorphism.

Parameters
targetTypeThe type of the serialization target.
typeVerifierThe delegate which verifies loading type in runtime type polymorphism.
Returns
A new instance of the PolymorphismSchema class for non-collection object which uses type embedding based polymorphism.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForPolymorphicObject() [3/3]

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForPolymorphicObject ( Type  targetType,
IDictionary< string, Type >  codeTypeMapping 
)
static

Creates a new instance of the PolymorphismSchema class for non-collection object which uses ext-type code mapping based polymorphism.

Parameters
targetTypeThe type of the serialization target.
codeTypeMappingThe code-type mapping which maps between ext-type codes and .NET Types.
Returns
A new instance of the PolymorphismSchema class for non-collection object which uses ext-type code mapping based polymorphism.
Exceptions
System.ArgumentNullExceptiontargetType is null.

◆ ForPolymorphicTuple()

static PolymorphismSchema MsgPack.Serialization.PolymorphismSchema.ForPolymorphicTuple ( Type  targetType,
PolymorphismSchema[]  itemSchemaList 
)
static

Creates a new instance of the PolymorphismSchema class for Tuple object.

Parameters
targetTypeThe type of the serialization target.
itemSchemaListThe schema for collection items of the serialization target tuple. null or empty indicates all items do not have any polymorphism.
Returns
A new instance of the PolymorphismSchema class for Tuple object.
Exceptions
System.ArgumentNullExceptiontargetType is null.
System.ArgumentExceptionA count of itemSchemaList does not match for an arity of the tuple type specified as targetType .

The documentation for this class was generated from the following files:
  • MsgPackSources/Serialization/PolymorphismSchema.Constructors.cs
  • MsgPackSources/Serialization/PolymorphismSchema.cs
  • MsgPackSources/Serialization/PolymorphismSchema.Internals.cs