GetConcreteSerializer() public static méthode

public static GetConcreteSerializer ( SerializationContext context, PolymorphismSchema schema, Type abstractType, Type targetType, Type exampleType, ICollectionInstanceFactory &factory, MessagePackSerializer &serializer ) : void
context SerializationContext
schema PolymorphismSchema
abstractType System.Type
targetType System.Type
exampleType System.Type
factory ICollectionInstanceFactory
serializer MessagePackSerializer
Résultat void
Exemple #1
0
        public AbstractReadOnlyCollectionMessagePackSerializer(
            SerializationContext ownerContext,
            Type targetType,
            PolymorphismSchema schema
            )
            : base(ownerContext, schema)
        {
            MessagePackSerializer serializer;

            AbstractCollectionSerializerHelper.GetConcreteSerializer(
                ownerContext,
                schema,
                typeof(TCollection),
                targetType,
                typeof(EnumerableMessagePackSerializerBase <,>),
                out this._concreteCollectionInstanceFactory,
                out serializer
                );
            this._polymorphicDeserializer = serializer as IPolymorphicDeserializer;
            this._concreteDeserializer    = serializer;
        }
        public AbstractReadOnlyDictionaryMessagePackSerializer(
            SerializationContext ownerContext,
            Type targetType,
            PolymorphismSchema schema
            )
            : base(ownerContext, schema)
        {
            IMessagePackSingleObjectSerializer serializer;

            AbstractCollectionSerializerHelper.GetConcreteSerializer(
                ownerContext,
                schema,
                typeof(TDictionary),
                targetType,
                typeof(DictionaryMessagePackSerializer <, ,>),
                out this._concreteCollectionInstanceFactory,
                out serializer
                );
            this._polymorphicDeserializer = serializer as IPolymorphicDeserializer;
            this._concreteDeserializer    = serializer;
        }