public static ConfigurationBuilderCachePart TestSerializer(this ConfigurationBuilderCachePart part, Serializer serializer)
        {
            switch (serializer)
            {
            case Serializer.Binary:
                break;

            case Serializer.GzJson:
                part.WithGzJsonSerializer();
                break;

            case Serializer.Json:
                part.WithJsonSerializer();
                break;

            case Serializer.Proto:
                part.WithProtoBufSerializer();
                break;

            case Serializer.BondBinary:
                part.WithBondCompactBinarySerializer(2048);
                break;
            }
            return(part);
        }
Ejemplo n.º 2
0
        public static ConfigurationBuilderCachePart TestSerializer(this ConfigurationBuilderCachePart part, Serializer serializer)
        {
            switch (serializer)
            {
            case Serializer.Binary:
                break;

            case Serializer.GzJson:
                part.WithGzJsonSerializer();
                break;

            case Serializer.Json:
                part.WithJsonSerializer();
                break;

            case Serializer.Proto:
                part.WithProtoBufSerializer();
                break;

            case Serializer.BondBinary:
                part.WithBondCompactBinarySerializer(2048);
                break;

            case Serializer.DataContract:
                part.WithDataContractSerializer();
                break;

            case Serializer.DataContractBinary:
                part.WithDataContractBinarySerializer();
                break;

            case Serializer.DataContractGzJson:
                part.WithDataContractGzJsonSerializer();
                break;

            case Serializer.DataContractJson:
                part.WithDataContractJsonSerializer();
                break;

            default:
                throw new InvalidOperationException("Unknown serializer");
            }
            return(part);
        }