Beispiel #1
0
        public static void Init()
        {
            if (Inited == false)
            {
                Inited = true;
                IRouteRepository             _IRouteRepository             = new RouteRepository();
                IRouteService                _IRouteService                = new RouteService(_IRouteRepository);
                IConnectionRepository        _IConnectionRepository        = new ConnectionRepository();
                IConnectionService           _IConnectionService           = new ConnectionService(_IConnectionRepository);
                IStationRepository           _IStationRepository           = new StationRepository();
                IStationService              _IStationService              = new StationService(_IStationRepository, _IConnectionRepository);
                IWalkingConnectionRepository _IWalkingConnectionRepository = new WalkingConnectionRepository();
                IWalkingConnectionService    _IWalkingConnectionService    = new WalkingConnectionService(_IWalkingConnectionRepository);

                oldStationList           = _IStationService.GetAllStation();
                oldConnectionList        = _IConnectionService.GetAllConnection();
                oldWalkingConnectionList = _IWalkingConnectionService.GetAllWalkingConnection();
                oldRouteList             = _IRouteService.GetRoute();
                newConnectionList        = new List <ViewModelNewConnection>();
                newStationList           = new List <ViewModelNewStation>();
                fanOut = new Dictionary <int, List <Vertex> >();
                //Graph.CreateNewGraph();
                Graph.CreateNewWalkingGraph();
                InitCompleted = true;
                _IRouteRepository.Dispose();
                _IConnectionRepository.Dispose();
                _IStationRepository.Dispose();
            }
        }