示例#1
0
 public DeliveriesPageViewModel(IDeliveryStopService deliveryStopService, IDeviceService deviceService, INavigationService navigationService, IPageDialogService pageDialogService)
     : base(deviceService, navigationService, pageDialogService)
 {
     if (deliveryStopService == null)
     {
         throw new ArgumentNullException(nameof(deliveryStopService));
     }
     _deliveryStopService = deliveryStopService;
 }
示例#2
0
        public Database(ISQLiteConnectionService sqLiteConnectionService, IProductService productService, ICustomerService customerService, IOrderService orderService, IDeliveryHistoryService deliveryHistoryService, IDeliveryStopService deliveryStopService)
        {
            if (sqLiteConnectionService == null)
            {
                throw new ArgumentNullException(nameof(sqLiteConnectionService));
            }

            if (productService == null)
            {
                throw new ArgumentNullException(nameof(productService));
            }

            if (customerService == null)
            {
                throw new ArgumentNullException(nameof(customerService));
            }

            if (orderService == null)
            {
                throw new ArgumentNullException(nameof(orderService));
            }

            if (deliveryHistoryService == null)
            {
                throw new ArgumentNullException(nameof(deliveryHistoryService));
            }

            if (deliveryStopService == null)
            {
                throw new ArgumentNullException(nameof(deliveryStopService));
            }

            _cn                     = sqLiteConnectionService.GetConnection();
            _productService         = productService;
            _customerService        = customerService;
            _orderService           = orderService;
            _deliveryHistoryService = deliveryHistoryService;
            _deliveryStopService    = deliveryStopService;
        }