/// <summary>
 /// Creates a new instance of the LocationsController class.
 /// </summary>
 /// <param name="locationsRepo"></param>
 /// <param name="logger"></param>
 public LocationsController(ILocationsRepository locationsRepo, IDeliverersRepository deliverersRepo, ILogger logger)
 {
     _logger                = logger;
     _locationsService      = new LocationsService(locationsRepo, _logger);
     _deliverersService     = new DeliverersService(deliverersRepo, _logger);
     _authorizationsService = new AuthenticationsService(_logger);
 }
        public CustomerAddressPartHandler(
            ICustomersService customersService,
            ILocationsService locationService,
            IRepository<CustomerAddressPartRecord> repository
            )
        {
            _customersService = customersService;
            _locationService = locationService;

            Filters.Add(StorageFilter.For(repository));

            OnActivated<CustomerAddressPart>((context, part) => {
                part._customer.Loader(customer => _customersService.GetCustomer(part.CustomerId));
                part._customer.Setter(customer => {
                    part.CustomerId = customer != null ? customer.Id : 0;
                    return customer;
                });

                part._country.Loader(country => _locationService.GetCountry(part.CountryId));
                part._country.Setter(country => {
                    part.CountryId = country != null ? country.Id : 0;
                    return country;
                });

                part._state.Loader(state => _locationService.GetState(part.StateId));
                part._state.Setter(state => {
                    part.StateId = state != null ? state.Id : 0;
                    return state;
                });
            });
        }
示例#3
0
 public MainViewModel(ILocationsService locationsService, IAppSettingsService settingsService)
 {
     this.locationsService = locationsService;
     this.settingsService  = settingsService;
     locationValidator     = new LocationItemValidator();
     Inactive = false;
 }
示例#4
0
 public LoadLocationsService(ILogger <LoadLocationsService> logger, ILocationsService locationsService, ISearchIndexService searchIndexService, IMapper mapper)
 {
     this.logger             = logger;
     this.locationsService   = locationsService;
     this.searchIndexService = searchIndexService;
     this.mapper             = mapper;
 }
示例#5
0
 public OrdersService(ILocationsService locationsService, IPaymentService paymentService)
 {
     _orders = new ConcurrentDictionary<OrderModel, List<OrderDetail>>();
     _locationsService = locationsService;
     _paymentService = paymentService;
     _carts = new ConcurrentDictionary<string, List<OrderDetail>>();
 }
示例#6
0
 public OrdersService(ILocationsService locationsService, IPaymentService paymentService)
 {
     _orders           = new ConcurrentDictionary <OrderModel, List <OrderDetail> >();
     _locationsService = locationsService;
     _paymentService   = paymentService;
     _carts            = new ConcurrentDictionary <string, List <OrderDetail> >();
 }
 public LocationsController(ILocationsService locationsService, ITownsService townsService,
                            ILocationTypesService locationTypesService)
 {
     this.locationsService     = locationsService;
     this.townsService         = townsService;
     this.locationTypesService = locationTypesService;
 }
        public MainWindowViewModel(IRegionManager regionManager,
                                   IAuthenticator authenticator,
                                   ISportsService sportsService,
                                   IGamesService gamesService,
                                   ILocationsService locationsService)
        {
            this.Authenticator = authenticator;
            this.Authenticator.CurrentUserChanged += AuthenticatorCurrentUserChanged;

            this.sportsService    = sportsService;
            this.gamesService     = gamesService;
            this.locationsService = locationsService;

            this.NavigationItems = new ObservableCollection <NavigationItem>();
            this.NavigationItems.Add(new NavigationItem("Login", "&#xf2f6;", nameof(LoginView)));
            this.NavigationItems.Add(new NavigationItem("Register", "&#xf234;", nameof(RegistrationView)));
            this.NavigationItems.Add(new NavigationItem("Sports", "&#xf1e3;", nameof(SportsView)));
            this.NavigationItems.Add(new NavigationItem("Locations", "&#xf3c5;", nameof(LocationsView)));
            this.NavigationItems.Add(new NavigationItem("Games", "&#xf073;", nameof(GamesView)));

            this.SelectedNavigationItemChangedCommand = new DelegateCommand(OnSelectedNavigationItemChanged);

            this.regionManager = regionManager;
            this.regionManager.Regions.CollectionChanged += OnRegionsCollectionChanged;

            this.SelectedView = nameof(LoginView);
        }
 public HomeController(IArticlesService articlesService,
                       ILocationsService locationsService,
                       IUsersService usersService)
 {
     this.articlesService  = articlesService;
     this.locationsService = locationsService;
     this.usersService     = usersService;
 }
示例#10
0
 public DirectionService(ITransitDirectionProvider transitDirectionProvider,
                         ILocationsService locationsService,
                         IDirectionsCache directionsCache)
 {
     this.transitDirectionProvider = transitDirectionProvider;
     this.locationsService         = locationsService;
     this.directionsCache          = directionsCache;
 }
 public QuestionsController(IQuestionsService questionsService
                            , ILocationsService locationsService
                            , IQuestionsMap questionsMap)
 {
     _questionsService = questionsService;
     _locationsService = locationsService;
     _questionsMap     = questionsMap;
 }
示例#12
0
 /// <summary>
 /// Public constructor, unavailable outside this class
 /// </summary>
 /// <param name="deliverersRepo"></param>
 /// <param name="notificationsRepo"></param>
 /// <param name="locationsRepo"></param>
 /// <param name="deliveriesRepo"></param>
 /// <param name="logger"></param>
 public NotificationsService(IDeliverersRepository deliverersRepo, IDeliveriesRepository deliveriesRepo, INotificationsRepository notificationsRepo, ILocationsRepository locationsRepo, ILogger logger)
 {
     this._notificationsRepo = notificationsRepo;
     this._logger            = logger;
     this.rnd = new Random();
     this._locationsService  = new LocationsService(locationsRepo, _logger);
     this._deliverersService = new DeliverersService(deliverersRepo, _logger);
     this._deliveriesService = new DeliveriesService(deliveriesRepo, locationsRepo, _logger);
 }
示例#13
0
        public LocationsController(ILocationsService locationsService)
        {
            if (locationsService == null)
            {
                throw new ArgumentNullException("Locations service cannot be null");
            }

            this.locationsService = locationsService;
        }
示例#14
0
 public LocationFieldDriver(
     ILocationsService locationService,
     IHttpContextAccessor httpContextAccessor
     )
 {
     _locationService     = locationService;
     _httpContextAccessor = httpContextAccessor;
     T = NullLocalizer.Instance;
 }
 /// <summary>
 /// Creates a new instance of the DeliveriesController class.
 /// </summary>
 /// <param name="notificationsRepo"></param>
 /// <param name="deliveriesRepo"></param>
 /// <param name="deliverersRepo"></param>
 /// <param name="locationsRepo"></param>
 /// <param name="feedbackRepo"></param>
 /// <param name="logger"></param>
 public DeliveriesController(INotificationsRepository notificationsRepo, IDeliveriesRepository deliveriesRepo, IDeliverersRepository deliverersRepo, ILocationsRepository locationsRepo, IFeedbackRepository feedbackRepo, ILogger logger)
 {
     _logger = logger;
     _notificationsService  = new NotificationsService(deliverersRepo, deliveriesRepo, notificationsRepo, locationsRepo, _logger);
     _deliverersService     = new DeliverersService(deliverersRepo, _logger);
     _authorizationsService = new AuthenticationsService(_logger);
     _deliveriesService     = new DeliveriesService(deliveriesRepo, locationsRepo, _logger);
     _locationsService      = new LocationsService(locationsRepo, _logger);
     _feedbackService       = new FeedbackService(feedbackRepo, _logger);
 }
 public LocationsViewModel(ILocationsService locationsService)
 {
     this.locationsService    = locationsService;
     this.locations           = new ObservableCollection <Location>(this.locationsService.GetAll());
     this.mapItems            = this.locations.Select(l => new MapItem(l));
     this.SelectCenterCommand = new DelegateCommand(SelectCenter);
     this.SelectPinCommand    = new DelegateCommand(SelectPin);
     this.CenterLocation      = this.mapItems.First().Location;
     this.SelectedLocation    = this.mapItems.First();
 }
示例#17
0
 public LocationsCacheService(
     IMemoryCache memoryCache,
     ILogger <LocationsCacheService> logger,
     ILocationsService locationsService)
 {
     _memoryCache      = memoryCache;
     _logger           = logger;
     _locationsService = locationsService;
     _typeName         = GetType().Name;
 }
示例#18
0
 public OrdersService(CarRentalDbContext dbContext, IUsersService usersService, IMapper mapper,
                      ILocationsService locationsService, ICarsService carsService, IVouchersService vouchersService)
 {
     this.dbContext        = dbContext;
     this.usersService     = usersService;
     this.mapper           = mapper;
     this.locationsService = locationsService;
     this.carsService      = carsService;
     this.vouchersService  = vouchersService;
 }
示例#19
0
        public LocationListViewModel(ILocationsService service, IMvxNavigationService navigationService)
        {
            _service           = service;
            _navigationService = navigationService;

            LoadData().ConfigureAwait(false);

            MapVisible  = true;
            ListVisible = false;
        }
示例#20
0
 public ExperiencesController(IUserFavouritesService userFavouritesService, IRatingService ratingService, ILocationsService locationService, IExperiencesService experiencesService, IImagesService imagesService, UserManager <ApplicationUser> userManager, IWebHostEnvironment env)
 {
     this.userFavouritesService = userFavouritesService;
     this.ratingService         = ratingService;
     this.locationService       = locationService;
     this.experiencesService    = experiencesService;
     this.imagesService         = imagesService;
     this.userManager           = userManager;
     this.env = env;
 }
示例#21
0
 public CustomerAddressPartDriver(
     ILocationsService locationService,
     ICustomersService customersService,
     IOrchardServices orchardServices
     )
 {
     _locationService  = locationService;
     _customersService = customersService;
     Services          = orchardServices;
     T = NullLocalizer.Instance;
 }
示例#22
0
 public AuthController(
     ILogger logger,
     IDeliverersRepository deliverersRepository,
     ILocationsRepository locationsRepository
     )
 {
     _logger = logger;
     _deliverersRepository   = deliverersRepository;
     _locationsService       = new LocationsService(locationsRepository, logger);
     _authenticationsService = new AuthenticationsService(logger);
 }
示例#23
0
 public SearchController(IIndustriesService industriesService,
                         ILocationsService locationsService,
                         IJobsService jobsService,
                         ISearchService searchService,
                         UserManager <ApplicationUser> userManager)
 {
     this.industriesService = industriesService;
     this.locationsService  = locationsService;
     this.jobsService       = jobsService;
     this.searchService     = searchService;
     this.userManager       = userManager;
 }
示例#24
0
 public ShoppingCartController(
     IShoppingCartService shoppingCartService,
     IEnumerable<ICheckoutProvider> checkoutProviders,
     IShapeFactory shapeFactory,
     ILocationsService locationService = null,
     IShippingService shippingService = null)
 {
     _shoppingCartService = shoppingCartService;
     _checkoutProviders = checkoutProviders;
     _shapeFactory = shapeFactory;
     _locationService = locationService;
     _shippingService = shippingService;
 }
        /// <summary>
        /// 
        /// Main initialization point
        /// 
        /// </summary>
        private LocationData()
        {
            _locationsService = new LocationsService();
            Locations = new ObservableCollection<WpfLocation>();

            foreach( var location in _locationsService.GetLocations() ) {
                Locations.Add( location );
            }

            AddLocationCommand = new AddLocationCommand();
            UpdateLocationCommand = new UpdateLocationCommand();
            DeleteLocationCommand = new DeleteLocationCommand();
        }
示例#26
0
 public LocationResolver(
     ILocationsService locationsService)
 {
     _locationsService = locationsService;
 }
示例#27
0
 public LocationsController(ILocationsService locationService)
 {
     _locationService = locationService;
 }
示例#28
0
 public EditController(IUsersService users, ITripsService trips, ILocationsService locations)
 {
     this.users = users;
     this.trips = trips;
     this.locations = locations;
 }
示例#29
0
 public TripsGridController(ITripsService trips, ILocationsService locations)
 {
     this.trips = trips;
     this.locations = locations;
 }
示例#30
0
 public LocationsController(ILocationsService locations)
 {
     this.locations = locations;
 }
示例#31
0
 public CreateTripController(ITripsService trips, ILocationsService locations)
 {
     this.trips = trips;
     this.locations = locations;
 }
 public LocationsController(ILocationsService service)
 {
     _locationsService = service;
 }