Exemplo n.º 1
0
 public JsonBuilder(MapperContainer mappers, TypeContainer types, ConfigContainer config,
                    ConcurrentDictionary <Type, Action <object, StringBuilder> > serializerMapper, DictReflector dictReflector)
 {
     serializers        = serializerMapper;
     this.mappers       = mappers;
     this.types         = types;
     this.config        = config;
     this.dictReflector = dictReflector;
 }
Exemplo n.º 2
0
 public MapEngine(TypeContainer types, MapperContainer mappers, ConfigContainer configuration,
                  CollectionBuilder colBuilder, ConcurrentDictionary <Type, Func <Type, JValue, object> > deserializers, EnumCache enumCache, DictReflector dictReflector)
 {
     this.types         = types;
     this.mappers       = mappers;
     this.configuration = configuration;
     this.colBuilder    = colBuilder;
     this.deserializers = deserializers;
     this.dictReflector = dictReflector;
     this.enumCache     = enumCache;
 }
Exemplo n.º 3
0
        public MapContext()
        {
            Mappers            = new MapperContainer();
            Configuration      = new ConfigContainer();
            Types              = new TypeContainer();
            CollBuilder        = new CollectionBuilder();
            SerializerMapper   = new ConcurrentDictionary <Type, Action <object, StringBuilder> >();
            DeserializerMapper = new ConcurrentDictionary <Type, Func <Type, JValue, object> >();
            DictReflector      = new DictReflector();
            var enumCache = new EnumCache();

            MapEngine = new MapEngine(Types, Mappers, Configuration, CollBuilder, DeserializerMapper, enumCache, DictReflector);
        }