コード例 #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public DefaultRoutesController(IDataObjectCollection <Route> routes)
        {
            // Check input parameter.
            Debug.Assert(routes != null);

            // Save routes as old default collection.
            _oldDefaultRoutes     = new List <Route>();
            _oldDefaultRouteLinks = new List <RouteLinks>();
            foreach (Route route in routes)
            {
                var tempRoute = route.CloneNoResults() as Route;
                _oldDefaultRoutes.Add(tempRoute);

                // Workaround: when application will call Project.Save method next time
                // all reference properties of tempRoute which points on database object
                // will be set to null, so we need to remeber this links. Do it by using
                // special structure with corresponding fields.
                RouteLinks tempRouteLinks = new RouteLinks();
                tempRouteLinks.StartLocation    = route.StartLocation;
                tempRouteLinks.EndLocation      = route.EndLocation;
                tempRouteLinks.Vehicle          = route.Vehicle;
                tempRouteLinks.Driver           = route.Driver;
                tempRouteLinks.Zones            = route.Zones;
                tempRouteLinks.RenewalLocations = route.RenewalLocations;
                tempRouteLinks.savedRouteID     = tempRoute.Id;
                _oldDefaultRouteLinks.Add(tempRouteLinks);
            }
        }
コード例 #2
0
 public AccountTransactionService(RouteLinks links, IDocumentSession documents, NEventStoreSession eventStore, AccountRepository repository)
 {
     this.links = links;
     this.documents = documents;
     this.eventStore = eventStore;
     this.repository = repository;
 }
コード例 #3
0
        public AccountAdministrationService(
			RouteLinks links, IDocumentSession documents, NEventStoreSession eventStore, AccountFactory factory, AccountRepository repository)
        {
            this.links = links;
            this.documents = documents;
            this.eventStore = eventStore;
            this.factory = factory;
            this.repository = repository;
        }
コード例 #4
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public DefaultRoutesController(IDataObjectCollection<Route> routes)
        {
            // Check input parameter.
            Debug.Assert(routes != null);

            // Save routes as old default collection.
            _oldDefaultRoutes = new List<Route>();
            _oldDefaultRouteLinks = new List<RouteLinks>();
            foreach (Route route in routes)
            {
                var tempRoute = route.CloneNoResults() as Route;
                _oldDefaultRoutes.Add(tempRoute);

                // Workaround: when application will call Project.Save method next time
                // all reference properties of tempRoute which points on database object
                // will be set to null, so we need to remeber this links. Do it by using
                // special structure with corresponding fields.
                RouteLinks tempRouteLinks = new RouteLinks();
                tempRouteLinks.StartLocation = route.StartLocation;
                tempRouteLinks.EndLocation = route.EndLocation;
                tempRouteLinks.Vehicle = route.Vehicle;
                tempRouteLinks.Driver = route.Driver;

                tempRouteLinks.Zones = tempRoute.Zones;
                tempRouteLinks.RenewalLocations = tempRoute.RenewalLocations;
                tempRouteLinks.savedRouteID = tempRoute.Id;
                _oldDefaultRouteLinks.Add(tempRouteLinks);
            }
        }
コード例 #5
0
 public AccountQueryService(RouteLinks links, IDocumentSession documents, AccountRepository repository)
 {
     this.links = links;
     this.documents = documents;
     this.repository = repository;
 }
コード例 #6
0
ファイル: HomeService.cs プロジェクト: pete-restall/Ichnaea
 public HomeService(RouteLinks links)
 {
     this.links = links;
 }