예제 #1
0
 private VPack(
     IDictionary <Type, IVPackSerializer> serializers,
     IDictionary <Type, IVPackDeserializer> deserializers,
     IDictionary <Type, IVPackInstanceCreator> instanceCreators,
     VPackBuilder.IBuilderOptions builderOptions,
     bool serializeNullValues,
     IVPackFieldNamingStrategy fieldNamingStrategy,
     IDictionary <string, IDictionary <Type, IVPackDeserializer> > deserializersByName)
 {
     this.serializers         = serializers;
     this.deserializers       = deserializers;
     this.instanceCreators    = instanceCreators;
     this.builderOptions      = builderOptions;
     this.serializeNullValues = serializeNullValues;
     this.deserializersByName = deserializersByName;
     this.keyMapAdapters      = new Dictionary <Type, IVPackKeyMapAdapter>();
     this.cache = new VPackCache(fieldNamingStrategy);
     this.serializationContext               = new _VPackSerializationContext_209(this);
     this.deserializationContext             = new _VPackDeserializationContext_216(this);
     this.keyMapAdapters[typeof(string)]     = VPackKeyMapAdapters.STRING;
     this.keyMapAdapters[typeof(bool)]       = VPackKeyMapAdapters.BOOLEAN;
     this.keyMapAdapters[typeof(int)]        = VPackKeyMapAdapters.INTEGER;
     this.keyMapAdapters[typeof(long)]       = VPackKeyMapAdapters.LONG;
     this.keyMapAdapters[typeof(short)]      = VPackKeyMapAdapters.SHORT;
     this.keyMapAdapters[typeof(double)]     = VPackKeyMapAdapters.DOUBLE;
     this.keyMapAdapters[typeof(float)]      = VPackKeyMapAdapters.FLOAT;
     this.keyMapAdapters[typeof(BigInteger)] = VPackKeyMapAdapters.BIG_INTEGER;
     this.keyMapAdapters[typeof(decimal)]    = VPackKeyMapAdapters.NUMBER;
     this.keyMapAdapters[typeof(char)]       = VPackKeyMapAdapters.CHARACTER;
 }
예제 #2
0
 public virtual Builder FieldNamingStrategy(IVPackFieldNamingStrategy fieldNamingStrategy)
 {
     this.fieldNamingStrategy = fieldNamingStrategy;
     return(this);
 }
예제 #3
0
 public VPackCache(IVPackFieldNamingStrategy fieldNamingStrategy)
 {
     this.cache               = new ConcurrentDictionary <Type, IDictionary <string, FieldInfo> >();
     this.fieldComparator     = new _Comparator_91();
     this.fieldNamingStrategy = fieldNamingStrategy;
 }