/// <summary> /// Initializes a new instance of the <see cref="EnumMessagePackSerializerProvider"/> class. /// </summary> /// <param name="enumType">A type of the enum.</param> /// <param name="serializer">The serializer implements <see cref="ICustomizableEnumSerializer"/>.</param> public EnumMessagePackSerializerProvider( Type enumType, ICustomizableEnumSerializer serializer ) { this._enumType = enumType; this._serializerForName = serializer.GetCopyAs( EnumSerializationMethod.ByName ); this._serializerForIntegral = serializer.GetCopyAs( EnumSerializationMethod.ByUnderlyingValue ); }
/// <summary> /// Initializes a new instance of the <see cref="EnumMessagePackSerializerProvider"/> class. /// </summary> /// <param name="enumType">A type of the enum.</param> /// <param name="serializer">The serializer implements <see cref="ICustomizableEnumSerializer"/>.</param> public EnumMessagePackSerializerProvider(Type enumType, ICustomizableEnumSerializer serializer) { this._enumType = enumType; this._serializerForName = serializer.GetCopyAs(EnumSerializationMethod.ByName); this._serializerForIntegral = serializer.GetCopyAs(EnumSerializationMethod.ByUnderlyingValue); }
public EnumTypedMessagePackSerializerWrapper(SerializationContext context, MessagePackSerializer underlying) : base(context, underlying) { this._underlyingEnumSerializer = underlying as ICustomizableEnumSerializer; }