Beispiel #1
0
 public ViewModelBase()
 {
     DialogService       = ViewModelLocator.Resolve <IDialogService>();
     NavigationService   = ViewModelLocator.Resolve <INavigationService>();
     CancellationService = ViewModelLocator.Resolve <ICancellationService>();
     BackCommand         = new Command(async() => await NavigationService.GoBackAsync());
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CancellationPolicyController" /> class.
 /// </summary>
 /// <param name="configuration">Configuration</param>
 /// <param name="cancellationService">Cancellation Service</param>
 /// <param name="hostingEnvironment">Hosting Enviorment</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="hotel">Type of the hoteroom.</param>
 /// <param name="masterService">The master service.</param>
 /// <param name="vendorService">Vendor Service</param>
 public CancellationPolicyController(IConfiguration configuration, ICancellationService cancellationService, IHostingEnvironment hostingEnvironment, IMapper mapper, IHotelierService hotel, IMasterService masterService, IVendorService vendorService)
     : base(mapper, configuration)
 {
     this.cancellationService = cancellationService;
     this.hostingEnvironment  = hostingEnvironment;
     this.vendorService       = vendorService;
     this.hotelierServices    = hotel;
     this.masterService       = masterService;
 }
Beispiel #3
0
 public OrderService(IOrderRepository orderRepository, IServerClient <Order> serverClient, IServerClient <Batch> batchClient, IConfiguration config, ICancellationService cancellationService, ILogger <OrderService> logger)
 {
     _orderRepository           = orderRepository;
     _orderClient               = serverClient;
     _batchClient               = batchClient;
     _section                   = config.GetSection("ExternalService");
     _orders                    = new ObservableCollection <IModel>();
     _orders.CollectionChanged += HandleChange;
     _cancellationService       = cancellationService;
     _logger                    = logger;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="DocumentAnalyzerService"/> class.
        /// </summary>
        public DocumentAnalyzerService(
            IEditor editor,
            ICancellationServiceFactory cancellationServiceFactory)
        {
            if (cancellationServiceFactory is null)
            {
                throw new ArgumentNullException(nameof(cancellationServiceFactory));
            }

            _editor = editor ?? throw new ArgumentNullException(nameof(editor));
            _cancellationService = cancellationServiceFactory.Create();

            _syntaxAnalyzer = TreeAnalyzerFactory.Create(editor.ContentType);
            IsAnalyzeable   = _syntaxAnalyzer is object;

            _editor.ContentChanged += OnContentChanged;
            _structureDebouncer     = new Debouncer(Analysis, TimeSpan.FromSeconds(1.5));
            _structureDebouncer.Start();
        }
 public CancellationsController(IUserRepository userRepo, ICancellationService service, IShopSerivce _shopService)
 {
     userRepository      = userRepo;
     cancellationService = service;
     shopService         = _shopService;
 }
Beispiel #6
0
 public BatchesController(IOrderService orderService, ILogger <OrdersController> logger, ICancellationService cancellationService)
 {
     _orderService        = orderService;
     _logger              = logger;
     _cancellationService = cancellationService;
 }
Beispiel #7
0
 public MultiplierController(ILogger <MultiplierController> logger, IMultiplierService multiplierService, ICancellationService cancellationService)
 {
     _logger              = logger;
     _multiplierService   = multiplierService;
     _cancellationService = cancellationService;
 }
 public GeneratorController(ILogger <GeneratorController> logger, IGeneratorService generatorService, ICancellationService cancellationService)
 {
     _logger              = logger;
     _generatorService    = generatorService;
     _cancellationService = cancellationService;
 }