Example #1
0
 public OrderController(IBikeRepository bikeRepository, IOfficeRepository officeRepository, IClientRepository clientRepository, IOrderRepository orderRepository)
 {
     this._bikeRepository   = bikeRepository;
     this._officeRepository = officeRepository;
     this._clientRepository = clientRepository;
     this._orderRepository  = orderRepository;
 }
Example #2
0
 public BikeService(IOmniaContext omniaContext,
                    IUserService userService,
                    IBikeRepository bikeRepository)
 {
     this.OmniaContext = omniaContext;
     this.UserService  = userService;
     BikeRepository    = bikeRepository;
 }
        protected override BikeSearchResult ExecuteCommand(BikeSearchCommand command)
        {
            IBikeRepository repo = RepositoryManager.CreateRepository <IBikeRepository>();


            BikeSearchResult result = new BikeSearchResult();

            result.Result = repo.SearchBikes(command.RegNumber, command.Colour, command.Producer) as List <Bike>;

            return(result);
        }
        protected override BikeSearchResult ExecuteCommand(BikeSearchCommand command)
        {
            IBikeRepository repo    = RepositoryManager.CreateRepository <IBikeRepository>();
            IUserRepository usrRepo = RepositoryManager.CreateRepository <IUserRepository>();

            BikeSearchResult result = new BikeSearchResult();

            result.Result = repo.SearchBikes() as List <Bike>;
            //
            return(result);
        }
Example #5
0
 public BikeService(IMapper mapper,
                    IBikeRepository bikeRepository,
                    IBikeHistoryService historyService,
                    IHistoryNoteService historyNoteService,
                    IObjectInspectionService inspectionService)
 {
     _mapper             = mapper;
     _bikeRepository     = bikeRepository;
     _historyService     = historyService;
     _historyNoteService = historyNoteService;
     _inspectionService  = inspectionService;
 }
 public BikeController(ComicsDbContext context, UserManager <User> userManager, ComicsDbContext db, IWebHostEnvironment appEnviroment, IBikeRepository bikeRepository, ICommentsRepository commentRepository, IUserRepository userRepository, ImageManagment imageManagment, IHubContext <UpdateHub> updateHub)
 {
     _context           = context;
     _userManager       = userManager;
     _db                = db;
     _appEnviroment     = appEnviroment;
     _bikeRepository    = bikeRepository;
     _commentRepository = commentRepository;
     _userRepository    = userRepository;
     _imageManagment    = imageManagment;
     _updateHub         = updateHub;
 }
Example #7
0
 public LockService(
     IFirestoreContext context,
     ILockRepository lockRepository,
     IBikeRepository bikeRepository,
     ILockControlService lockControlService,
     INavigationService navigationService)
 {
     _context            = context;
     _lockRepository     = lockRepository;
     _bikeRepository     = bikeRepository;
     _lockControlService = lockControlService;
     _navigationService  = navigationService;
 }
Example #8
0
        public PhotosController(IBikeRepository bikeRepo, IMapper mapper, IOptions <CloudinarySettings> cloudinaryConfig)
        {
            _bikeRepo         = bikeRepo;
            _cloudinaryConfig = cloudinaryConfig;
            _mapper           = mapper;

            Account acc = new Account(
                _cloudinaryConfig.Value.CloudName,
                _cloudinaryConfig.Value.ApiKey,
                _cloudinaryConfig.Value.ApiSecret
                );

            _cloudinary = new Cloudinary(acc);
        }
        public BikeApplicationService(
            IBikeRepository bikeRepository,
            IBorrowRepository borrowRepository,
            IPriceRepository priceRepository,
            IIdentityInterop identityInterop,
            IBusManager busManager)
        {
            EnsureArg.IsNotNull(bikeRepository);
            EnsureArg.IsNotNull(borrowRepository);
            EnsureArg.IsNotNull(priceRepository);

            _bikeRepository   = bikeRepository;
            _borrowRepository = borrowRepository;
            _priceRepository  = priceRepository;
            _identityInterop  = identityInterop;
            _busManager       = busManager;
        }
 public BikeController(StoreDbContext context,
                       IBikeRepository bikeRepository,
                       ILogger <BikeController> logger,
                       IMapper mapper,
                       IRepo <BikesColors> bikesColorsRepo,
                       IRepo <BikesSizes> bikesSizesRepo,
                       IRepo <StoreImages> storeImgRepo,
                       IRepo <ImgContent> imgContentRepo
                       )
 {
     _context         = context ?? throw new ArgumentNullException(nameof(context));
     _bikeRepository  = bikeRepository ?? throw new ArgumentNullException(nameof(bikeRepository));
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _mapper          = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _bikesColorsRepo = bikesColorsRepo ?? throw new ArgumentNullException(nameof(bikesColorsRepo));
     _bikesSizesRepo  = bikesSizesRepo ?? throw new ArgumentNullException(nameof(bikesSizesRepo));
     _storeImgRepo    = storeImgRepo ?? throw new ArgumentNullException(nameof(storeImgRepo));
     _imgContentRepo  = imgContentRepo ?? throw new ArgumentNullException(nameof(imgContentRepo));
 }
 public AdminController(IBikeRepository bikeRepository,
                        ILogger <AdminController> logger,
                        IRepo <Size> sizeRepository,
                        IRepo <Color> colorRepository,
                        ICategoryRepository categoryRepository,
                        ISpecificationRepository specificaionRepository,
                        IRepo <SpecificationCategory> specificationCategoryRepository,
                        IRepo <ImgContent> imgRepo,
                        IMapper mapper)
 {
     _bikeRepo                  = bikeRepository ?? throw new ArgumentNullException(nameof(bikeRepository));
     _logger                    = logger ?? throw new ArgumentNullException(nameof(logger));
     _colorRepo                 = colorRepository ?? throw new ArgumentNullException(nameof(colorRepository));
     _sizeRepo                  = sizeRepository ?? throw new ArgumentNullException(nameof(sizeRepository));
     _categoryRepo              = categoryRepository ?? throw new ArgumentNullException(nameof(categoryRepository));
     _specificaionRepo          = specificaionRepository ?? throw new ArgumentNullException(nameof(specificaionRepository));
     _specificationCategoryRepo = specificationCategoryRepository ?? throw new ArgumentNullException(nameof(specificationCategoryRepository));
     _mapper                    = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _imgRepo                   = imgRepo ?? throw new ArgumentNullException(nameof(imgRepo));
 }
 public BikeService(
     IFirestoreContext context,
     IBikeRepository bikeRepository,
     IAuthService authService,
     IMembershipRepository membershipRepository,
     ILocationService locationService,
     IStationRepository stationRepository,
     ICommunityRepository communityRepository,
     ILockRepository lockRepository,
     ILockService lockService)
 {
     _context              = context;
     _bikeRepository       = bikeRepository;
     _authService          = authService;
     _membershipRepository = membershipRepository;
     _locationService      = locationService;
     _stationRepository    = stationRepository;
     _communityRepository  = communityRepository;
     _lockRepository       = lockRepository;
     _lockService          = lockService;
 }
 public HomeController(IBikeRepository bikeRepository)
 {
     _bikeRepository = bikeRepository;
 }
 public BikeApplication()
 {
     bikeRepository = Factory.Instance.Resolve<IBikeRepository>();
     lineRepository = Factory.Instance.Resolve <IRepository<Line, int>>();
 }
 public BikeController(ICategoryRepository categoryRepository, IBikeRepository bikeRepository)
 {
     _bikeRepository     = bikeRepository;
     _categoryRepository = categoryRepository;
 }
Example #16
0
 //   C O N T R O L L E R S
 public BikeController(IBikeRepository repository)
 {
     _repository = repository;
 }
 public BikesController(IBikeRepository bikeRepository)
 {
     _bikeRepository = bikeRepository;
 }
Example #18
0
 public BikeService(IBikeRepository bikeRepository)
 {
     _bikeRepository = bikeRepository;
 }
 public BorrowApplicationService(IBorrowRepository borrowRepository, IPriceRepository priceRepository, IBikeRepository bikeRepository)
 {
     _borrowRepository = borrowRepository;
     _priceRepository  = priceRepository;
     _bikeRepository   = bikeRepository;
 }
 public BikeController(IBikeRepository bikeRepo)
 {
     _bikeRepo = bikeRepo;
 }
Example #21
0
 public BikeService(IBikeRepository bikeRepository, IHomeBaseService homeBaseService)
 {
     _bikeRepository  = bikeRepository;
     _homeBaseService = homeBaseService;
 }
Example #22
0
 public BikeController(IBikeRepository bikerepository)
 {
     _BikeRepository = bikerepository;
 }
        public StationService(
            IFirestoreContext context,
            IStationRepository stationRepository,
            IBikeRepository bikeRepository,
            IMembershipService membershipService)
        {
            _context           = context;
            _stationRepository = stationRepository;
            _bikeRepository    = bikeRepository;

            _availableStations = new Lazy <ObservableCollection <Station> >(() =>
            {
                IDictionary <string, ObservableCollection <Station> > allStations =
                    new Dictionary <string, ObservableCollection <Station> >();

                IDictionary <string, IDisposable> subscriptions = new Dictionary <string, IDisposable>();

                ObservableCollection <Station> result = new ObservableCollection <Station>();

                var communities = membershipService.ObserveMemberships();

                communities.CollectionChanged += (sender, args) =>
                {
                    switch (args.Action)
                    {
                    case NotifyCollectionChangedAction.Add:
                        foreach (CommunityMembership membership in args.NewItems)
                        {
                            ObservableCollection <Station> communityStations = new ObservableCollection <Station>();

                            var subscription = _stationRepository
                                               .ObserveStationsFromCommunity(membership.CommunityId)
                                               .Subscribe(stations =>
                            {
                                communityStations.Clear();

                                foreach (var station in stations)
                                {
                                    communityStations.Add(station);
                                }
                            }, exception =>
                            {
                                communityStations.Clear();
                            });

                            subscriptions[membership.CommunityId] = subscription;

                            communityStations.CollectionChanged += StationsChanged;
                            allStations[membership.Id]           = communityStations;
                        }
                        break;

                    case NotifyCollectionChangedAction.Remove:
                        foreach (CommunityMembership membership in args.OldItems)
                        {
                            allStations[membership.CommunityId].CollectionChanged -= StationsChanged;
                            subscriptions[membership.CommunityId].Dispose();
                        }
                        break;

                    case NotifyCollectionChangedAction.Reset:
                        allStations.Clear();

                        foreach (var subscription in subscriptions.Values)
                        {
                            subscription.Dispose();
                        }

                        subscriptions.Clear();
                        break;

                    case NotifyCollectionChangedAction.Move:
                        break;

                    case NotifyCollectionChangedAction.Replace:
                        throw new NotImplementedException();

                    default:
                        throw new NotImplementedException();
                    }
                };

                return(result);

                void StationsChanged(object sender, NotifyCollectionChangedEventArgs args)
                {
                    result.Clear();

                    foreach (var station in allStations.Values.SelectMany(bikes => bikes))
                    {
                        result.Add(station);
                    }
                }
            });
        }
Example #24
0
 public BikeBll(IBikeRepository repository) : base(repository)
 {
 }
Example #25
0
 public BikesController(IBikeRepository bikeRepo, IMapper mapper)
 {
     _bikeRepo = bikeRepo;
     _mapper   = mapper;
 }
Example #26
0
 public BikeService(IBikeRepository bikeRepository) => this._bikeRepository = bikeRepository;
Example #27
0
 public CartController(IBikeRepository bikeRepository, ShoppingCart shoppingCart)
 {
     _bikeRepository = bikeRepository;
     _shoppingCart   = shoppingCart;
 }
Example #28
0
 public Edit_bikesController(IBikeRepository bikeRepo, IAuthRepository authRepo, IMapper mapper)
 {
     _authRepo = authRepo;
     _bikeRepo = bikeRepo;
     _mapper   = mapper;
 }
Example #29
0
 public BikeService(IBikeRepository bikeRepository, ICommitProvider commitProvider, IUserManagerService userManagerService)
 {
     _bikeRepository     = bikeRepository;
     _commitProvider     = commitProvider;
     _userManagerService = userManagerService;
 }
Example #30
0
 public CategoryController(IBikeCategory bikeCategory, IBikeRepository bikeRepository, AppDBContent appDbContent)
 {
     _bikeCategory   = bikeCategory;
     _bikeRepository = bikeRepository;
     _appDbContent   = appDbContent;
 }
Example #31
0
 public OrderController(IOrderRepository orderRepository, IBikeRepository bikerepo)
 {
     _orderRepository = orderRepository;
     _bikerepo        = bikerepo;
 }