public void Initialize()
        {
            // Composition root, manual setup
            //memoryDatabase = memoryDatabase ?? new MemoryDatabase("TestData/Points.csv");
            //mapService = mapService ?? new MapService(memoryDatabase);

            // Composition root-ish, using same setup as web
            bootstrap = bootstrap ?? new Bootstrap();
            bootstrap.Configure("TestData/Points.csv");
            memoryDatabase = memoryDatabase ?? bootstrap.Container.Resolve <IPointsDatabase>();
            mapService     = mapService ?? bootstrap.Container.Resolve <IMapService>();
        }
        public void Initialize()
        {
            // Composition root, manual setup
            //memoryDatabase = memoryDatabase ?? new MemoryDatabase("TestData/Points.csv");
            //mapService = mapService ?? new MapService(memoryDatabase);

            // Composition root-ish, using same setup as web
            bootstrap = bootstrap ?? new Bootstrap();
            bootstrap.Configure("TestData/Points.csv");
            memoryDatabase = memoryDatabase ?? bootstrap.Container.Resolve<IPointsDatabase>();
            mapService = mapService ?? bootstrap.Container.Resolve<IMapService>();
        }
Beispiel #3
0
 public MapService(IPointsDatabase pointsDatabase, IMemCache memCache)
 {
     _pointsDatabase = pointsDatabase;
     _memCache       = memCache;
 }