MsgPack.Serialization Namespace Reference

UNITY || MSGPACK_UNITY_FULL. More...

Classes

class  AotHelper
 
struct  CollectionTraits
 
struct  DataMemberContract
 Represents member's data contract.
 
class  DateTimeMessagePackSerializerHelpers
 This is intened to MsgPack for CLI internal use. Do not use this type from application directly. Helper methods for date time message pack serializer.
 
class  DefaultConcreteTypeRepository
 Repository of known concrete collection type for abstract collection type. More...
 
class  DictionaryKeyTransformers
 Defines built-in, out-of-box handlers for DictionarySerlaizationOptions.KeyTransformer.
 
class  DictionarySerlaizationOptions
 Defines dictionary (map) based serialization options. More...
 
class  EnumMessagePackSerializer
 Defines basic features for enum object serializers. More...
 
class  EnumMessagePackSerializerHelpers
 This is intened to MsgPack for CLI internal use. Do not use this type from application directly. Helper methods for enum message pack serializer.
 
class  EnumMessagePackSerializerProvider
 Implements MessagePackSerializerProvider for enums. This class accepts EnumSerializationMethod as a provider parameter.
 
class  EnumNameTransformers
 Defines built-in, out-of-box handlers for EnumSerializationOptions.NameTransformer.
 
class  EnumSerializationOptions
 Defines enum serialization options. More...
 
class  EnumTypedMessagePackSerializerWrapper
 Wraps non-generic MessagePackSerializer which implements ICustomizableEnumSerializer to avoid AOT issue.
 
class  ExtTypeCodeMapping
 Implements mapping table between known ext type codes and names. More...
 
interface  ICustomizableEnumSerializer
 Represents customizable enum serializer.
 
class  IdentifierUtility
 Utilities related to member/type ID.
 
interface  IMessagePackSerializer
 Defines non-generic message pack serializer interface. More...
 
interface  IMessagePackSingleObjectSerializer
 Defines non-generic message pack serializer interface for byte array which contains a single object. More...
 
interface  INilImplicationHandlerOnUnpackedParameter
 Defines common interface for parameter of NilImplicationHandler<TCondition,TPackingParameter,TAction,TUnpackedParameter>.OnUnpacked method and its template methods.
 
interface  INilImplicationHandlerParameter
 Defines common interface for parameter of NilImplicationHandler<TCondition,TPackingParameter,TAction,TUnpackedParameter>.OnPacking method and its template methods.
 
class  KeyNameTransformers
 
class  LazyDelegatingMessagePackSerializer
 Lazy initialized serializer which delegates actual work for the other serializer implementation.
 
class  MessagePackDateTimeMemberAttribute
 Marks that this DateTime or DateTimeOffset typed member has special characteristics on MessagePack serialization. More...
 
class  MessagePackDeserializationConstructorAttribute
 Marks this constructor used as deserialization constructor. More...
 
class  MessagePackEnumAttribute
 Marks that this enum type has special characteristics on MessagePack serialization. More...
 
class  MessagePackEnumMemberAttribute
 Marks that this enum typed member has special characteristics on MessagePack serialization. More...
 
class  MessagePackIgnoreAttribute
 Marks the field or the property should not be serialized/deserialized with MessagePack for CLI serialization mechanism. More...
 
class  MessagePackKnownCollectionItemTypeAttribute
 Marks that the runtime type of items/values of this collection/dictionary should be encoded with closed type codes for polymorphism. More...
 
class  MessagePackKnownDictionaryKeyTypeAttribute
 Marks that the runtime type of keys of this dictionary should be encoded with closed type codes for polymorphism. More...
 
class  MessagePackKnownTupleItemTypeAttribute
 Marks that the runtime type of specified item of the tuple should be encoded with closed type codes for polymorphism. More...
 
class  MessagePackKnownTypeAttribute
 Marks that the runtime type of this member should be encoded with closed type codes for polymorphism. More...
 
class  MessagePackMemberAttribute
 Marks a field or a property to be serialized with MessagePack Serializer and defines some required informations to serialize. More...
 
class  MessagePackRuntimeCollectionItemTypeAttribute
 Marks that the runtime type of items/values of this collection/dictionary should be encoded with type information for polymorphism. More...
 
class  MessagePackRuntimeDictionaryKeyTypeAttribute
 Marks that the runtime type of keys of this dictionary should be encoded with type information for polymorphism. More...
 
class  MessagePackRuntimeTupleItemTypeAttribute
 Marks that the runtime type of specified item of the tuple should be encoded with type information for polymorphism. More...
 
class  MessagePackRuntimeTypeAttribute
 Marks that the runtime type of this member should be encoded with type information for polymorphism. More...
 
class  MessagePackSerializer
 Defines non-generic interface of serializers and provides entry points for MessagePackSerializer<T> usage. More...
 
class  MessagePackSerializerExtensions
 Defines convinient extension methods for interfaces.
 
class  MessagePackSerializerProvider
 Defines basic features and interfaces for serializer provider which is stored in repository and controlls returning serializer with its own parameter.
 
class  NilImplicationHandler
 Defines base features to handle nil implication.
 
class  NonGenericMessagePackSerializer
 
class  NullTextWriter
 
class  PackHelpers
 This is intened to MsgPack for CLI internal use. Do not use this type from application directly. Defines serialization helper APIs.
 
struct  PackToArrayParameters
 Represents parameters of PackHelpers.PackToArray<TObject>(ref PackToArrayParameters<TObject>) method. More...
 
struct  PackToMapParameters
 Represents parameters of PackHelpers.PackToMap<TObject>(ref PackToMapParameters<TObject>) method. More...
 
struct  PolymorphicTypeVerificationContext
 Represents and encapsulates context informatino to verify actual type for runtime type polymorphism. More...
 
class  PolymorphismSchema
 A provider parameter to support polymorphism. More...
 
class  ReflectionExtensions
 
class  ReflectionHelpers
 This is intened to MsgPack for CLI internal use. Do not use this type from application directly. Defines serialization helper reflection APIs.
 
class  ResolveSerializerEventArgs
 Represents event information for SerializationContext.ResolveSerializer event. More...
 
class  SerializationCompatibilityOptions
 Represents compatibility options of serialization runtime. More...
 
class  SerializationContext
 This is intened to MsgPack for CLI internal use. Do not use this type from application directly. Represents serialization context information for internal serialization logic. More...
 
class  SerializationExceptions
 This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Defines common exception factory methods.
 
class  SerializationTarget
 Implements serialization target member extraction logics.
 
class  SerializerDebugging
 Holds debugging support information.
 
class  SerializerOptions
 Defines options for serializer generation. More...
 
class  SerializerRepository
 Repository of known MessagePackSerializer<T>s. More...
 
class  SerializerTypeKeyRepository
 Specialized TypeKeyRepository for serializers.
 
struct  SerializingMember
 Represents serializing member information.
 
class  Tracer
 
class  TypedMessagePackSerializerWrapper
 Wraps non-generic MessagePackSerializer to avoid AOT issue.
 
class  TypeKeyRepository
 Repository for key type with RWlock scheme.
 
struct  UnpackCollectionParameters
 Represents parameters of UnpackHelpers.UnpackCollection<T>(ref UnpackCollectionParameters<T>) method. More...
 
struct  UnpackFromArrayParameters
 Represents parameters of UnpackHelpers.UnpackFromArray<TContext, TResult>(ref UnpackFromArrayParameters<TContext, TResult>) method. More...
 
struct  UnpackFromMapParameters
 Represents parameters of UnpackHelpers.UnpackFromMap<TContext, TResult>(ref UnpackFromMapParameters<TContext, TResult>) method. More...
 
class  UnpackHelpers
 This is intened to MsgPack for CLI internal use. Do not use this type from application directly. Defines serialization helper APIs.
 
struct  UnpackMessagePackObjectValueParameters
 Represents parameters of UnpackHelpers.UnpackMessagePackObjectValue<TContext>(ref UnpackMessagePackObjectValueParameters<TContext>) method. More...
 
struct  UnpackNullableTypeValueParameters
 Represents parameters of UnpackHelpers.UnpackNullableTypeValue<TContext, TValue>(ref UnpackNullableTypeValueParameters<TContext, TValue>) method. More...
 
struct  UnpackReferenceTypeValueParameters
 Represents parameters of UnpackHelpers.UnpackReferenceTypeValue<TContext, TValue>(ref UnpackReferenceTypeValueParameters<TContext, TValue>) method. More...
 
struct  UnpackValueTypeValueParameters
 Represents parameters of UnpackHelpers.UnpackValueTypeValue<TContext, TValue>(ref UnpackValueTypeValueParameters<TContext, TValue>) method. More...
 

Enumerations

enum  DateTimeConversionMethod { DateTimeConversionMethod.Native = 0, DateTimeConversionMethod.UnixEpoc = 1, DateTimeConversionMethod.Timestamp = 2 }
 Defines behavior of built-in serializers to conversion of DateTime value. More...
 
enum  DateTimeMemberConversionMethod { DateTimeMemberConversionMethod.Default = 0, DateTimeMemberConversionMethod.Native = 1, DateTimeMemberConversionMethod.UnixEpoc = 2, DateTimeMemberConversionMethod.Timestamp = 3 }
 Defines behavior of built-in serializers to conversion of DateTime value for specific member. More...
 
enum  EnumMemberSerializationMethod { EnumMemberSerializationMethod.Default = 0, EnumMemberSerializationMethod.ByName = 0, EnumMemberSerializationMethod.ByUnderlyingValue = 1 }
 Represents individual enum typed member serialization method. More...
 
enum  EnumSerializationMethod { EnumSerializationMethod.ByName = 0, EnumSerializationMethod.ByUnderlyingValue }
 Represents enum type serialization method. More...
 
enum  NilImplication { NilImplication.MemberDefault = 0, NilImplication.Null, NilImplication.Prohibit }
 Specifies nil implication in serialization/deserialization. More...
 
enum  SerializationMethod { SerializationMethod.Array = 0, SerializationMethod.Map = 1 }
 Represents serialization method for complex types. More...
 
enum  SerializationMethodGeneratorOption { SerializationMethodGeneratorOption.CanDump, SerializationMethodGeneratorOption.CanCollect, SerializationMethodGeneratorOption.Fast }
 Define options of serializer generation. More...
 
enum  SerializerCapabilities { SerializerCapabilities.None = 0, SerializerCapabilities.PackTo = 0x1, SerializerCapabilities.UnpackFrom = 0x10, SerializerCapabilities.UnpackTo = 0x20 }
 Represents serializer capabilities. More...
 
enum  SerializerRegistrationOptions { SerializerRegistrationOptions.None = 0, SerializerRegistrationOptions.AllowOverride = 0x1, SerializerRegistrationOptions.WithNullable = 0x2 }
 Represents options for custom or pre-generated serializer registration. More...
 

Detailed Description

UNITY || MSGPACK_UNITY_FULL.

Enumeration Type Documentation

◆ DateTimeConversionMethod

Defines behavior of built-in serializers to conversion of DateTime value.

Enumerator
Native 

Uses DateTime.Ticks context, that is, Gregorian 0000-01-01 based, 100 nano seconds resolution. This value also preserves DateTimeKind.

As of 0.6 to 0.9, this value became default. This option prevents accidental data loss.

UnixEpoc 

Uses Unix epoc context, that is, Gregirian 1970-01-01 based, milliseconds resolution.

Many binding such as Java uses this resolution, so this option gives maximum interoperability.

Timestamp 

Uses MsgPack timestamp format, that is, Gregirian 1970-01-01 based, nanoseconds resolution, with reserved ext type format.

As of 1.0, this value became default.

This is best choice for interoperability and prevents accidental data loss, but old implementation does not recognize this type. For backward compability purposes, use Native or UnixEpoc instead.

Note that DateTime and DateTimeOffset cannot hold nanoseconds value. If you can depend on this assembly, consider Timestamp for date-time typed members to maximize interoperability for other languages.

◆ DateTimeMemberConversionMethod

Defines behavior of built-in serializers to conversion of DateTime value for specific member.

Enumerator
Default 

Uses systems default DateTimeConversionMethod value.

The systems default DateTimeConversionMethod.Native.

Native 

Uses DateTime.Ticks context, that is, Gregorian 0000-01-01 based, 100 nano seconds resolution. This value also preserves DateTimeKind.

As of 0.6, this value has been become default. This option prevents accidental data loss.

UnixEpoc 

Uses Unix epoc context, that is, Gregirian 1970-01-01 based, milliseconds resolution.

Many binding such as Java uses this resolution, so this option gives maximom interoperability.

Timestamp 

Uses MsgPack timestamp format, that is, Gregirian 1970-01-01 based, nanoseconds resolution, with reserved ext type format.

As of 1.0, this value became default.

This is best choice for interoperability and prevents accidental data loss, but old implementation does not recognize this type. For backward compability purposes, use Native or UnixEpoc instead.

Note that DateTime and DateTimeOffset cannot hold nanoseconds value. If you can depend on this assembly, consider Timestamp for date-time typed members to maximize interoperability for other languages.

◆ EnumMemberSerializationMethod

Represents individual enum typed member serialization method.

Enumerator
Default 

Respects setting in enum type itself or system default.

ByName 

Enums are serialized with their name. It is more torelant to versioning but less efficient.

ByUnderlyingValue 

Enums are serialized with their underlying value. It is more efficient but less torelant to versioning.

◆ EnumSerializationMethod

Represents enum type serialization method.

Enumerator
ByName 

Enums are serialized with their name. It is more torelant to versioning but less efficient.

ByUnderlyingValue 

Enums are serialized with their underlying value. It is more efficient but less torelant to versioning.

◆ NilImplication

Specifies nil implication in serialization/deserialization.

Enumerator
MemberDefault 

A nil is interpreted as default value of the member.

This value affects only deserialization.

If the unpacking value is nil, the serializer will not set any value to the member.

This value corresponds to optional on the IDL.

<note> This is default option because the most safe option. </note>

Null 

A nil is interpreted as null.

This value affects only deserialization.

If the unpacking value is nil, the serializer will set null to the member. If the member is non-nullable value type and the packed value is nil, then System.Runtime.Serialization.SerializationException will be thrown.

This value corresponds to nullable required on the IDL.

<note> If the destination end point sends nil for the value type member like Int32 type, you can avoid the exception with change the type of the member to nullable value type. </note>

Prohibit 

A nil is prohibitted.

This value affects both of serialization and deserialization.

If the packing value is null or the unpacking value is nil, the serializer will throw exception.

This value corresponds to required on the IDL.

<note> When you specify this value to newly added member, it means that you BREAK backword compatibility. </note>

◆ SerializationMethod

Represents serialization method for complex types.

Enumerator
Array 

The object will be serialized as array which is ordered by member ID. This is default and more interoperable option.

Map 

The object will be serialized as map which is ordered by member ID. This is a bit slower than array, but more stable for forward/backward compatibility.

◆ SerializationMethodGeneratorOption

Define options of serializer generation.

Enumerator
CanDump 

The generated method IL can be dumped to the current directory. It is intended for the runtime, you cannot use this option.

CanCollect 

The entire generated method can be collected by GC when it is no longer used.

Fast 

Prefer performance. This options is default.

◆ SerializerCapabilities

Represents serializer capabilities.

Enumerator
None 

None.

PackTo 

Caller can call Pack and PackTo method safely. If this flag is not set, the serializer may be deserialize only serializer.

UnpackFrom 

Caller can call Unpack and UnpackFrom method safely. If this flag is not set, the serializer may be serialize only serializer.

UnpackTo 

Caller can call UnpackTo method safely. If this flag is not set, the serializer should not be for mutable collection type.

◆ SerializerRegistrationOptions

Represents options for custom or pre-generated serializer registration.

Enumerator
None 

None of options are applied.

AllowOverride 

Overrides existing registration with specified serializer.

WithNullable 

For non-nullable value type, registering nullable companion simulary.