public NewToApplicationWindow(IApplicationHotkeyService hotkeyService, IAppSettingService settingService, IActionService actionService) { InitializeComponent(); this.Title = "New to RecNForget?"; if (DesignerProperties.GetIsInDesignMode(this)) { this.hotkeyService = new DesignerApplicationHotkeyService(); this.actionService = new DesignerActionService(); SettingService = new DesignerAppSettingService(); return; } else { // ToDo: Evil Hack to have the cake (see actual design in design mode) and eat it too (have different styles at runtime) this.Resources = null; this.hotkeyService = hotkeyService; SettingService = settingService; this.actionService = actionService; this.KeyDown += Window_KeyDown; } }
public async Task <IActionResult> UpdateFormDocument(long id, FormDictionaryDto model, [FromServices] IActionService <IUpdateFormDictionaryAction> service) { model.Id = id; if (model.File != null && model.File.Length > 0) { FormDocumentFileHelper docHelper = new FormDocumentFileHelper(); string filePath = await docHelper.SaveFormDocument(model.Code, model.File, _enviroment); model.FileName = Path.Combine(Path.Combine(filePath, $"{model.Code}")); } service.RunBizAction(model); if (!service.Status.HasErrors) { return(new ObjectResult(new ResultResponseDto <String, long> { Key = HttpStatusCode.OK, Value = "FormDocument updated..", Subject = model.Id })); } var errors = service.Status.CopyErrorsToString(ModelState); return(new ObjectResult(new ResultResponseDto <String, long> { Key = HttpStatusCode.BadRequest, Value = errors, Subject = model.Id })); }
public IActionResult ChangeDelivery(WebChangeDeliveryDto dto, [FromServices] IActionService <IChangeDeliverAction> service) { if (!ModelState.IsValid) { //I have to reset the DTO, which will call SetupSecondaryData //to set up the values needed for the display service.ResetDto(dto); //return to the same view to show the errors return(View(dto)); } //This runs my business logic using the service injected in the //Action's service parameter service.RunBizAction(dto); if (!service.Status.HasErrors) { SetupTraceInfo(); //Used to update the logs //We copy the message from the business logic to show return(RedirectToAction("ConfirmOrder", "Orders", new { dto.OrderId, message = service.Status.Message })); } //Otherwise errors, so I need to redisplay the page to the user service.Status.CopyErrorsToModelState(ModelState, dto); //I reset the DTO, which will call SetupSecondaryData i set up the display props service.ResetDto(dto); SetupTraceInfo(); //Used to update the logs return(View(dto)); //redisplay the page, with the errors }
public IActionResult PlaceOrder(PlaceOrderInDto dto, [FromServices] IActionService <IRepository, IPlaceOrderAction> service) { if (!ModelState.IsValid) { //model errors so return to checkout page, showing the basket return(View("Index", FormCheckoutDtoFromCookie(HttpContext))); } //This runs my business logic using the service injected into the Action's parameters var orderDto = service.RunBizAction <OrderIdDto>(dto); if (!service.Status.HasErrors) { //If successful I need to clear the line items from the basket cookie ClearCheckoutCookie(HttpContext); SetupTraceInfo(); //Used to update the logs return(RedirectToAction("ConfirmOrder", "Orders", new { orderDto.OrderId, Message = "Your order is confirmed" })); } //Otherwise errors, so I need to redisplay the basket from the cookie var checkoutDto = FormCheckoutDtoFromCookie(HttpContext); //This copies the errors to the ModelState service.Status.CopyErrorsToModelState(ModelState, checkoutDto); SetupTraceInfo(); //Used to update the logs return(View("Index", checkoutDto)); }
public UserPetService(IUserPetRepository userPetRepo, IPetService petService, IUserService userService, IActionService actionService) { this.userPetRepo = userPetRepo; this.petService = petService; this.userService = userService; this.actionService = actionService; }
private void HandleFirstStartAndUpdates(IActionService actionService, IAppSettingService appSettingService, IApplicationHotkeyService hotkeyService, bool firstTimeUser) { if (appSettingService.CheckForUpdateOnStart) { Task.Run(() => { actionService.CheckForUpdates(showMessages: false); }); } var currentFileVersion = new Version(ThisAssembly.AssemblyFileVersion); Version lastInstalledVersion = appSettingService.LastInstalledVersion; appSettingService.LastInstalledVersion = currentFileVersion; hotkeyService.ResetAndReadHotkeysFromConfig(); if (firstTimeUser) { actionService.ShowNewToApplicationWindow(); } else if (currentFileVersion.CompareTo(lastInstalledVersion) > 0) { actionService.ShowNewToVersionDialog(currentFileVersion, lastInstalledVersion); } else if (appSettingService.ShowTipsAtApplicationStart) { actionService.ShowRandomApplicationTip(); } }
public HouseController(IHouseService houseService, IActionService actionService) { _houseService = houseService; _actionService = actionService; }
public AboutWindow() { DataContext = this; InitializeComponent(); if (DesignerProperties.GetIsInDesignMode(this)) { this.appSettingService = new DesignerAppSettingService(); this.actionService = new DesignerActionService(); return; } else { // ToDo: Evil Hack to have the cake (see actual design in design mode) and eat it too (have different styles at runtime) this.Resources = null; this.appSettingService = UnityHandler.UnityContainer.Resolve <IAppSettingService>(); this.actionService = UnityHandler.UnityContainer.Resolve <IActionService>(); } var assemblyInformationalVersion = appSettingService.RuntimeInformalVersionString; var assemblyFileVersion = new Version(appSettingService.RuntimeVersionString); AppNameAndVersion.Text = string.Format("RecNForget {0}", string.Format("{0}.{1}.{2}", assemblyFileVersion.Major, assemblyFileVersion.Minor, assemblyFileVersion.Build)); VersionLabel.Text = string.Format("{0} - v{1}", "Chili Garlic Shrimps", assemblyInformationalVersion); }
public RecordingAndPlaybackControl() { DataContext = this; InitializeComponent(); if (DesignerProperties.GetIsInDesignMode(this)) { this.actionService = new DesignerActionService(); this.appSettingService = new DesignerAppSettingService(); AudioPlaybackService = new DesignerAudioPlaybackService(); AudioRecordingService = new DesignerAudioRecordingService(); SelectedFileService = new DesignerSelectedFileService(); } else { // ToDo: Evil Hack to have the cake (see actual design in design mode) and eat it too (have different styles at runtime) this.Resources = null; this.actionService = UnityHandler.UnityContainer.Resolve <IActionService>(); this.appSettingService = UnityHandler.UnityContainer.Resolve <IAppSettingService>(); AudioPlaybackService = UnityHandler.UnityContainer.Resolve <IAudioPlaybackService>(); AudioRecordingService = UnityHandler.UnityContainer.Resolve <IAudioRecordingService>(); SelectedFileService = UnityHandler.UnityContainer.Resolve <ISelectedFileService>(); AudioPlaybackService.PropertyChanged += AudioPlaybackService_PropertyChanged; AudioRecordingService.PropertyChanged += AudioRecordingService_PropertyChanged; } }
public UsersController(IUserService service, IActionTimelineService actionTimelineService, IActionService actionService) : base(service) { this.service = service; this.actionTimelineService = actionTimelineService; this.actionService = actionService; }
public PartnerActionMapFactory(IPartnerActionMapService service, IPartnerService partnerService, IActionService actionService, IMapper mapper) { _service = service; _partnerService = partnerService; _actionService = actionService; _mapper = mapper; }
public void GetAllActionOk() { IActionService service = GetActionService(); string allActions = service.ActionsToString(); Assert.AreEqual("City,Road,Village,Country,County,AmenityType,AmenityName,Date,DateTime,Time,YearMonth,Noop", allActions); }
public OutputPathControl() { DataContext = this; InitializeComponent(); if (DesignerProperties.GetIsInDesignMode(this)) { this.actionService = new DesignerActionService(); this.appSettingService = new DesignerAppSettingService(); this.audioRecordingService = new DesignerAudioRecordingService(); this.selectedFileService = new DesignerSelectedFileService(); OutputPathWithFilePattern = audioRecordingService.GetTargetPathTemplateString(); return; } else { // ToDo: Evil Hack to have the cake (see actual design in design mode) and eat it too (have different styles at runtime) this.Resources = null; this.actionService = UnityHandler.UnityContainer.Resolve <IActionService>(); this.appSettingService = UnityHandler.UnityContainer.Resolve <IAppSettingService>(); this.audioRecordingService = UnityHandler.UnityContainer.Resolve <IAudioRecordingService>(); SelectedFileService = UnityHandler.UnityContainer.Resolve <ISelectedFileService>(); appSettingService.PropertyChanged += AppSettingService_PropertyChanged; UpdateOutputPathWithFileNamePattern(); } }
public RoleController(IRoleService roleService, IActionService actionService, IFunctionService functionService, IActionRoleService acctionRoleService) { _roleService = roleService; _actionService = actionService; _functionService = functionService; _acctionRoleService = acctionRoleService; }
public ClientController(IActionService As, IClientService clientservice, IResellerService resellerservice, IRoleService Rs, ISubscriptionsService SS) { this.ActionService = As; this.ClientService = clientservice; this.ResellerService = resellerservice; this.RoleService = Rs; this.SubscriptionService = SS; }
public void HasAllActionWithEmptyActions() { string[] actions = new string[0]; IActionService service = GetActionService(); bool hasAllAction = service.HasNoExistAction(actions); Assert.IsFalse(hasAllAction); }
public void HasAllActionKo() { string[] actions = new[] { "City", "Invented", "Road", "YearMonth" }; IActionService service = GetActionService(); bool hasAllAction = service.HasNoExistAction(actions); Assert.IsTrue(hasAllAction); }
public void HasAllActionWithVerticalBar() { string[] actions = new[] { $"Country{Config.AlternativeCharacter}City", "Road", "YearMonth" }; IActionService service = GetActionService(); bool hasAllAction = service.HasNoExistAction(actions); Assert.IsFalse(hasAllAction); }
public ApiController(IDBContext dbContext, IDiagramService diagramService, IActionService actionService, IMainNotifier mainNotifier, ILogger <ApiController> logger) { _dbContext = dbContext; _diagramService = diagramService; _actionService = actionService; _mainNotifier = mainNotifier; _logger = logger; }
public UsedActionFactory(IUsedActionService service, IPartnerService partnerService, IActionService actionService, IUserService userService, IMapper mapper) { _service = service; _partnerService = partnerService; _actionService = actionService; _mapper = mapper; _userService = userService; }
public ActionController(IActionService ActionService) { //_logger = logger; //_mediator = mediator; //_cache = cache; _ActionService = ActionService; }
public EngineService(IActionService actionService, IEngineConfiguration engineConfiguration) { _actionService = actionService; _engineConfiguration = engineConfiguration; _runtime = WorkflowRuntimeFactory(); }
public WorkOrderController(IWorkService workService, UserManager <AppUser> userManager, IActionService actionService, INotificationService notificationService, IMapper mapper) : base(userManager) { _workService = workService; _actionService = actionService; _notificationService = notificationService; _mapper = mapper; }
public PermissionController() { _spService = StructureMap.ObjectFactory.GetInstance <ISpService>(); _permissionService = StructureMap.ObjectFactory.GetInstance <IPermissionService>(); _rolePermissionService = StructureMap.ObjectFactory.GetInstance <IRolePermissionService>(); _actionCategoryService = StructureMap.ObjectFactory.GetInstance <IActionCategoryService>(); _actionService = StructureMap.ObjectFactory.GetInstance <IActionService>(); }
public AccountController(IActionService As, IRoleService Rs, IClientService Cs, IResellerService ResellerServ, ISubscriptionsService SS) { ActionService = As; roleService = Rs; ClientService = Cs; ResellerService = ResellerServ; SubscriptionsService = SS; }
public RentANewApartment(IProjectService projectService, IActionService actionService, IActionListService actionListService, IOutputSink output, ISomeSingletonService someSingletonService) { this.projectService = projectService; this.actionService = actionService; this.actionListService = actionListService; this.output = output; this.someSingletonService = someSingletonService; }
/// <summary> /// Creating constructor for users controller for accessing /// </summary> /// <param name="userService">userService</param> /// <param name="tourService">tourService</param> /// <param name="actionService">actionService</param> /// <param name="cachingService">cachingService</param> public UserController(IUserService userService, ITourService tourService, IActionService actionService, ICachingService cachingService, ICampaignService campaignService) { this.userService = userService; this.tourService = tourService; this.actionService = actionService; this.cachingService = cachingService; this.campaignService = campaignService; }
public SolutionListTreeViewService(IApplicationConfiguration applicationConfiguration, IApplicationStorageService applicationStorageService, IAreaTagCheckedListBoxService areaTagCheckedListBoxService, IActionService actionService) { _applicationStorageService = applicationStorageService; _areaTagCheckedListBoxService = areaTagCheckedListBoxService; _actionService = actionService; _areaTagCheckedListBoxService.AreaTagCheckedListBoxCheckChanged += AreaTagCheckedListBoxService_AreaTagCheckedListBoxCheckChanged; _actionService.ActionRun += ActionService_ActionRun; _actionService.ActionRefresh += ActionService_ActionRefresh; }
public HomeController(ILogger <HomeController> logger, IPropertyService propertySvc, ITenancyService tenancySvc, IPersonService personSvc, IActionService actionSvc, UserManager <ApplicationUser> userManager) { _logger = logger; _propertySvc = propertySvc; _tenancySvc = tenancySvc; _personSvc = personSvc; _actionSvc = actionSvc; _userManager = userManager; }
/// <summary> /// Default constructor for the background service. /// </summary> /// <param name="actionService"></param> /// <param name="options"></param> /// <param name="logger"></param> public ActionQueuingBackgroundService( IActionService actionService, IOptions <AutomationOptions> options, ILogger <ActionQueuingBackgroundService> logger) { _service = actionService; _options = options.Value; _logger = logger; }
public MakeStuffActionableViewModel(IMvxMessenger mvxMessenger, IInboxService inboxService, IProjectService projectService, IActionService actionService) { _mvxMessenger = mvxMessenger; _inboxService = inboxService; _projectService = projectService; _actionService = actionService; ReloadProjects(); // subscribe to Projects Changed messages to react to changes in project service _projectsChangedSubToken = _mvxMessenger.Subscribe<ProjectsChangedMessage>(OnProjectsChanged); _isSingleActionProject = true; }
public ActionController( IActionService actionService) { this.actionService = actionService; }
public RoleController( IRoleService roleservice,IActionService actionservice ) { this.roleService = roleservice; this.actionService = actionservice; }
public RoleService(IUnitOfWork db, IActionService ActionService) { this.db = db; this.ActionService = ActionService; }
public SearchActionViewModelFactory(IActionService actionService, IActionPlanService actionPlanService, IEmployeeService employeeService) { _actionService = actionService; _actionPlanService = actionPlanService; _employeeService = employeeService; }
public AssignActionPlanTaskCommand(IActionService actionService, IBusinessSafeSessionManager businessSafeSessionManager ) { _actionService = actionService; _businessSafeSessionManager = businessSafeSessionManager; }
public ReassignActionTaskViewModelFactory(IActionService actionService, IExistingDocumentsViewModelFactory existingDocumentsViewModelFactory, IActionTaskService actionTaskService) { _actionTaskService = actionTaskService; _actionService = actionService; _existingDocumentsViewModelFactory = existingDocumentsViewModelFactory; }