예제 #1
0
        private void Load()
        {
            _fiberCableInfos      = new Dictionary <Guid, FiberCableInfo>();
            _pointOfInterestIndex = new PointOfInterestIndex(_routeNetworkQueryService);

            using (var session = _documentStore.LightweightSession())
            {
                // Fetch everything into memory for fast access
                var fiberCables = session.Query <FiberCableInfo>();

                foreach (var fiberCable in fiberCables)
                {
                    UpdateFiberCableInfo(fiberCable);
                }
            }
        }
예제 #2
0
        public FiberNetworkQueryService(IDocumentStore documentStore, IRouteNetworkState routeNetworkQueryService)
        {
            this._documentStore            = documentStore;
            this._routeNetworkQueryService = routeNetworkQueryService;
            this._pointOfInterestIndex     = new PointOfInterestIndex(routeNetworkQueryService);


            var config = new MapperConfiguration(cfg => {
                cfg.CreateMap <FiberCableInfo, FiberCableInfo>();
            });


            _mapper = config.CreateMapper();

            Load();
        }