public async Task RunExternalPostActions(ISolutionProjectModel model, IOperationService service, object result, IServiceSettings settings = null, CancellationToken cancellationToken = default(CancellationToken)) { if (cancellationToken.IsCancellationRequested) { return; } if (settings == null) { settings = settingsService.GetMainServiceSettings(); } await Task.WhenAll( RunPostServiceScriptFileForProjectAsync(service, model, result, settings, cancellationToken), Task.Run(() => { foreach (ICustomAction externalAction in CheckoutAndBuild2Package.GetExportedValues <ICustomAction>()) { if (cancellationToken.IsCancellationRequested) { break; } externalAction.RunPostAction(service, model, result, settings); } }, cancellationToken)); }
public OperationController( [FromServices] IContextFactory contextFactory, [FromServices] IOperationService operationService) { _operationService = operationService; _contextFactory = contextFactory; }
public HomeController(IOperationService operationService, ICurrencyService currencyService, ICategoryService categoryService) { _operationService = operationService; _categoryService = categoryService; _currencyService = currencyService; }
public AccountController( IOperationService operationService) //:this(new UserManager<AppUser,long>(new UserStore<AppUser,AppRole,long,AppLogin,AppUserRole,AppClaim>(new QLNSContext()))) { _operationService = operationService; //_cacheDatabase = cacheDatabase; }
public NavController(IHrDbContext context, INavService navService, IOperationService navOperation, INavOperationService navOperationService) { _context = context; _navService = navService; _operationService = navOperation; _navOperationService = navOperationService; }
private Task RunScriptFileForProjectAsync(string fileName, IOperationService service, ISolutionProjectModel project, object result = null, CancellationToken token = default(CancellationToken)) { if (File.Exists(fileName)) { Output.WriteLine($"Run Script {fileName}"); if (ScriptHelper.IsPowerShell(fileName)) { var parameters = new Dictionary <string, object> { { "service", service }, { "solutionPath", project.ItemPath }, { "solutionObject", project }, }; if (result != null) { parameters.Add("result", result); } return(ScriptHelper.ExecutePowershellScriptAsync(fileName, parameters, token)); } var buildResult = result as BuildResult; if (buildResult == null || buildResult.OverallResult == BuildResultCode.Success) { return(ScriptHelper.ExecuteScriptAsync(fileName, project.ItemPath, ScriptExecutionSettings.Default, cancellationToken: token)); } } return(Task.Delay(0, token)); }
public ReportService(IExaminationService examinationService, IRenovationService renovationService, IHospitalizationService hospitalizationService, IOperationService operationService) { _examinationService = examinationService; _renovationService = renovationService; _hospitalizationService = hospitalizationService; _operationService = operationService; }
public HomeController(IOperationService operationService, IRatesService ratesService, IItemsService itemsService, IAccountService accountService) { _operationService = operationService; _ratesService = ratesService; _itemsService = itemsService; _accountService = accountService; }
/// <summary> /// Constructor /// </summary> public OperationBaseController(IOperationService operationService) { if (operationService == null) { throw new ArgumentNullException("operationService"); } this.operationService = operationService; }
public CostWindow(string categoryName_, string login_, string password_) { InitializeComponent(); categoryName = categoryName_; operationService = new OperationService(); login = login_; password = password_; }
public OperationController(IOperationService operationService, IModuleService mooduleService, IMapper mapper, ILog Ilog) { _mapper = mapper; _operationService = operationService; _moduleService = mooduleService; _Ilog = Ilog; }
public PaymentService(IOperationService operationService, ICredentials credentials) { this.operationService = operationService; this.credentials = credentials; cashPaymentType = operationService .GetPaymentTypes() .Single(x => x.Kind == PaymentTypeKind.Cash); }
public OperationsController( IOperationService operationService, ILogger <OperationsController> logger ) { _operationService = operationService ?? throw new ArgumentNullException(nameof(operationService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public OperationModule(IOperationService operationService, IMapper mapper) : base(mapper, "operations") { Get("{requestId}", args => Fetch <GetOperation, Operation> (async x => await operationService.GetAsync(x.RequestId)) .MapTo <OperationDto>() .HandleAsync()); }
public OperationController(IGroupService groupService, IUserService userService, IOperationService operationService) { this.groupService = groupService; this.userService = userService; this.operationService = operationService; }
public PermissionController( IPermissionService permissionService, IOperationService operationService, RedisService redisService) { _permissionService = permissionService; _operationService = operationService; _redisService = redisService; }
public AuthController(SignInManager <User> signInManager, UserManager <User> userManager, IOptions <GeneralConfig> generalConfig, IAccountService accountService, IOperationService operationService, IListenerService listener) { _signInManager = signInManager; _userManager = userManager; _generalConfig = generalConfig.Value; _accountService = accountService; _operationService = operationService; _listener = listener; }
private static void NavigatingToPaymentScreen(IOrder order, IOperationService operationService) { var donationItem = order.Donations.LastOrDefault(); if (donationItem != null) { operationService.DeleteDonation(PluginContext.Operations.GetCredentials(), order, donationItem); } }
private void OnServiceChequePrinted(IOrder order, IOperationService service, IViewManager manager) { PluginContext.Log.Info("Printed precheck"); var json = OrderHelper.GetOrderPackageJson(order); HttpSender.AddTask(new HttpSenderTask { Url = HttpSender.PostChequeUrl, Json = json }); PluginContext.Log.Info(json); }
public ServiceTracked(IOperationService <P, R> innerOperation, int trackId, ITimeProvider timeProvider, IRepository <OperationModel> repository) { this.timeProvider = timeProvider; this.innerOperation = innerOperation; this.trackId = trackId; this.repository = repository; }
public BuildErrorsViewModel(IEnumerable <ErrorTask> tasks, IOperationService requestedOperation, ISolutionProjectModel project, IServiceProvider serviceProvider) : base(serviceProvider) { Errors = new ObservableCollection <ErrorTask>(tasks.ToList()); Title = string.Format("{1} Error for '{0}'", project.SolutionFileName, requestedOperation.OperationName); Message = string.Format("{0} errors for '{1}' occured", Errors.Count, project.SolutionFileName); RequestedOperation = requestedOperation; Project = project; Image = Images.BuildErrorList_7237.ToImageSource(); }
public OperationsController(IOperationService operationService, IAddressValidator addressValidator, IBroadcastService broadcastService, IObservableOperationService observableOperationService) { _operationService = operationService; _addressValidator = addressValidator; _broadcastService = broadcastService; _observableOperationService = observableOperationService; }
public Showcases(IOperationService operationService, ILog logger, string pin, IPaymentType cardPayment, IPaymentType bonusPayment) { this.operationService = operationService; this.logger = logger; var credentials = operationService.AuthenticateByPin(pin); paymentService = new PaymentService(operationService, credentials); cardPaymentType = cardPayment; bonusPaymentType = bonusPayment; }
public OperationsModel(IPiggyRepository repository, IOperationService operationService, IAccountService accountService, ICategoryService categoryService) { _repository = repository; _operationService = operationService; _accountService = accountService; _categoryService = categoryService; Operations = new List <IOperationModel>(); CurrentPageNumber = 1; _totalPages = 1; }
public CashierPresenter(ICashierView cashierView, ICurrencyService currencyService, IOperationService operationService) { _cashierView = cashierView; _currencyService = currencyService; _operationService = operationService; _cashierView.GetCurrencies += GetCurrencies; _cashierView.PerformOperation += PerformOperation; _currencyService.UpdateCurrencies += GetCurrencies; }
public OperationsController( IOperationService opService, IMessageService messageService, IEquipmentService equipmentService, IMapper mapper) { _opService = opService; _messageService = messageService; _equipmentService = equipmentService; _mapper = mapper; }
public OperationsController( IAuthentication authentication, DataContext context, IOperationService operationService, IHubContext <UpdateHub> hubContext) { _authentication = authentication; _context = context; _operationService = operationService; _hubContext = hubContext; }
public BankAccountController( [FromServices] IContextFactory contextFactory, [FromServices] IBankAccountService bankAccountService, [FromServices] IOperationTypeService operationTypeService, [FromServices] IOperationService operationService) { _service = bankAccountService; _operationTypeService = operationTypeService; _operationService = operationService; _contextFactory = contextFactory; }
public TodoItemsController( IAuthentication authentication, IOperationService operationService, IChangeTracker changeTracker, DataContext context) { _authentication = authentication; _operationService = operationService; _changeTracker = changeTracker; _context = context; }
private Task RunPostServiceScriptFileForProjectAsync(IOperationService service, ISolutionProjectModel project, object result, IServiceSettings settings, CancellationToken token = default(CancellationToken)) { var misc = settings.GetSettingsFromProvider <MiscellaneousSettings>(project); if (File.Exists(misc.PostServiceScriptFile)) { Output.WriteLine($"Run Post-{service.OperationName} Script for {project.SolutionFileName}"); } return(RunScriptFileForProjectAsync(misc.PostServiceScriptFile, service, project, result, token)); }
public void TestInitialize() { _operationService = A.Fake<IOperationService>(); _printService = A.Fake<IPrintService>(); }
public AccountService(IOperationService operationService, IPrintService printService) { _operationService = operationService; _printService = printService; }
private void TryConnectToService() { try { if (_service == null) { _service = ServiceFactory.GetCallbackServiceInstance<IOperationService>(this); } IList<int> operations = _service.GetOperationIds(Constants.OfpMaxAge, Constants.OfpOnlyNonAcknowledged, Constants.OfpLimitAmount); IsMissingServiceConnectionHintVisible = false; App.Current.Dispatcher.Invoke(() => DeleteOldOperations(operations)); if (operations.Count == 0) { return; } foreach (int operationId in operations) { if (ContainsEvent(operationId)) { continue; } Operation operation = _service.GetOperationById(operationId); if (ShouldAutomaticallyAcknowledgeOperation(operation)) { _service.AcknowledgeOperation(operation.Id); } else { App.Current.Dispatcher.Invoke(() => PushEvent(operation)); } } } catch (CommunicationObjectFaultedException) { IsMissingServiceConnectionHintVisible = true; } catch (EndpointNotFoundException) { IsMissingServiceConnectionHintVisible = true; } catch (Exception ex) { IsMissingServiceConnectionHintVisible = false; Logger.Instance.LogException(this, ex); } }