/// <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); } }
public AccountTransactionService(RouteLinks links, IDocumentSession documents, NEventStoreSession eventStore, AccountRepository repository) { this.links = links; this.documents = documents; this.eventStore = eventStore; this.repository = repository; }
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; }
/// <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); } }
public AccountQueryService(RouteLinks links, IDocumentSession documents, AccountRepository repository) { this.links = links; this.documents = documents; this.repository = repository; }
public HomeService(RouteLinks links) { this.links = links; }