public MasterDataController(IMasterDataService masterDataService, ILanguageService languageService, IFrameworkService frameworkService) { _masterDataService = masterDataService; _languageService = languageService; _frameworkService = frameworkService; }
public LearningPortalController( ICentresDataService centresDataService, ICourseDataService courseDataService, ISelfAssessmentService selfAssessmentService, ISupervisorService supervisorService, IFrameworkService frameworkService, INotificationService notificationService, IFrameworkNotificationService frameworkNotificationService, ILogger <LearningPortalController> logger, IConfiguration config, IActionPlanService actionPlanService, ICandidateAssessmentDownloadFileService candidateAssessmentDownloadFileService, ISearchSortFilterPaginateService searchSortFilterPaginateService, IMultiPageFormService multiPageFormService ) { this.centresDataService = centresDataService; this.courseDataService = courseDataService; this.selfAssessmentService = selfAssessmentService; this.supervisorService = supervisorService; this.frameworkService = frameworkService; this.notificationService = notificationService; this.frameworkNotificationService = frameworkNotificationService; this.logger = logger; this.config = config; this.actionPlanService = actionPlanService; this.candidateAssessmentDownloadFileService = candidateAssessmentDownloadFileService; this.searchSortFilterPaginateService = searchSortFilterPaginateService; this.multiPageFormService = multiPageFormService; }
public FrameworksController(IProjectFrameworkService projectFramework, IPermissionService permission, ILanguageService language, IFrameworkService framework, IErrorHandlerService errorHandler, IJwtAuthService jwtAuth) : base(errorHandler, jwtAuth) { _projectFramework = projectFramework; _permission = permission; _language = language; _framework = framework; }
public SupervisorController( ISupervisorService supervisorService, ICommonService commonService, IFrameworkNotificationService frameworkNotificationService, ISelfAssessmentService selfAssessmentService, IFrameworkService frameworkService, IConfigDataService configDataService, ICentreRegistrationPromptsService centreRegistrationPromptsService, IUserDataService userDataService, ILogger <SupervisorController> logger, IConfiguration config, ISearchSortFilterPaginateService searchSortFilterPaginateService, IMultiPageFormService multiPageFormService, IRegistrationService registrationService ) { this.supervisorService = supervisorService; this.commonService = commonService; this.frameworkNotificationService = frameworkNotificationService; this.selfAssessmentService = selfAssessmentService; this.frameworkService = frameworkService; this.configDataService = configDataService; this.centreRegistrationPromptsService = centreRegistrationPromptsService; this.userDataService = userDataService; this.logger = logger; this.config = config; this.searchSortFilterPaginateService = searchSortFilterPaginateService; this.multiPageFormService = multiPageFormService; this.registrationService = registrationService; }
public void SetUp() { actionPlanService = A.Fake <IActionPlanService>(); centresDataService = A.Fake <ICentresDataService>(); courseDataService = A.Fake <ICourseDataService>(); selfAssessmentService = A.Fake <ISelfAssessmentService>(); supervisorService = A.Fake <ISupervisorService>(); frameworkService = A.Fake <IFrameworkService>(); notificationService = A.Fake <INotificationService>(); frameworkNotificationService = A.Fake <IFrameworkNotificationService>(); candidateAssessmentDownloadFileService = A.Fake <ICandidateAssessmentDownloadFileService>(); var logger = A.Fake <ILogger <LearningPortalController> >(); config = A.Fake <IConfiguration>(); filteredApiHelperService = A.Fake <IFilteredApiHelperService>(); searchSortFilterPaginateService = A.Fake <ISearchSortFilterPaginateService>(); A.CallTo(() => config["CurrentSystemBaseUrl"]).Returns(BaseUrl); var user = new ClaimsPrincipal( new ClaimsIdentity( new[] { new Claim("learnCandidateID", CandidateId.ToString()), new Claim("UserCentreID", CentreId.ToString()), }, "mock" ) ); controller = new LearningPortalController( centresDataService, courseDataService, selfAssessmentService, supervisorService, frameworkService, notificationService, frameworkNotificationService, logger, config, actionPlanService, candidateAssessmentDownloadFileService, searchSortFilterPaginateService, multiPageFormService ); controller.ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { User = user } }; controller = controller.WithMockTempData(); }
public FrameworkNotificationService( IFrameworkService frameworkService, IConfigDataService configDataService, IEmailService emailService, IRoleProfileService roleProfileService, ISupervisorService supervisorService, ISelfAssessmentDataService selfAssessmentDataService ) { this.frameworkService = frameworkService; this.configDataService = configDataService; this.emailService = emailService; this.roleProfileService = roleProfileService; this.supervisorService = supervisorService; this.selfAssessmentDataService = selfAssessmentDataService; }
public FrameworksController( IFrameworkService frameworkService, ICommonService commonService, IFrameworkNotificationService frameworkNotificationService, ILogger <FrameworksController> logger, IImportCompetenciesFromFileService importCompetenciesFromFileService, ICompetencyLearningResourcesDataService competencyLearningResourcesDataService ) { this.frameworkService = frameworkService; this.commonService = commonService; this.frameworkNotificationService = frameworkNotificationService; this.logger = logger; this.importCompetenciesFromFileService = importCompetenciesFromFileService; this.competencyLearningResourcesDataService = competencyLearningResourcesDataService; }
public void SetUp() { frameworkService = A.Fake <IFrameworkService>(); frameworkNotificationService = A.Fake <IFrameworkNotificationService>(); commonService = A.Fake <ICommonService>(); var logger = A.Fake <ILogger <FrameworksController> >(); config = A.Fake <IConfiguration>(); importCompetenciesFromFileService = A.Fake <IImportCompetenciesFromFileService>(); competencyLearningResourcesDataService = A.Fake <ICompetencyLearningResourcesDataService>(); learningHubApiClient = A.Fake <ILearningHubApiClient>(); searchSortFilterPaginateService = A.Fake <ISearchSortFilterPaginateService>(); multiPageFormService = A.Fake <IMultiPageFormService>(); A.CallTo(() => config["CurrentSystemBaseUrl"]).Returns(BaseUrl); var user = new ClaimsPrincipal( new ClaimsIdentity( new[] { new Claim("UserAdminId", AdminId.ToString()), new Claim("UserCentreID", CentreId.ToString()), new Claim("IsFrameworkDeveloper", "True"), }, "mock" ) ); controller = new FrameworksController( frameworkService, commonService, frameworkNotificationService, logger, importCompetenciesFromFileService, competencyLearningResourcesDataService, learningHubApiClient, searchSortFilterPaginateService, multiPageFormService ) { ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { User = user } }, }; }
public FrameworksController( IFrameworkService frameworkService, ICommonService commonService, IFrameworkNotificationService frameworkNotificationService, ILogger <FrameworksController> logger, IImportCompetenciesFromFileService importCompetenciesFromFileService, ICompetencyLearningResourcesDataService competencyLearningResourcesDataService, ILearningHubApiClient learningHubApiClient, ISearchSortFilterPaginateService searchSortFilterPaginateService, IMultiPageFormService multiPageFormService ) { this.frameworkService = frameworkService; this.commonService = commonService; this.frameworkNotificationService = frameworkNotificationService; this.logger = logger; this.importCompetenciesFromFileService = importCompetenciesFromFileService; this.competencyLearningResourcesDataService = competencyLearningResourcesDataService; this.learningHubApiClient = learningHubApiClient; this.searchSortFilterPaginateService = searchSortFilterPaginateService; this.multiPageFormService = multiPageFormService; }
/// <summary> /// Frameworks controller constructor /// </summary> public FrameworksController(IFrameworkService frameworkService) : base() { _frameworkService = frameworkService; }
public CaptchaController(IClientService clientService, IFrameworkService frameworkService) { this.frameworkService = frameworkService; this.clientService = clientService; }
public FrameworksController(IFrameworkService framework, IErrorHandlerService errorHandler, IJwtAuthService jwtAuth) : base(errorHandler, jwtAuth) { _framework = framework; }
#pragma warning restore CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable. public MainWindowViewModel(IFrameworkService framework, LogCollector?logCollector = null) { Framework = framework; this.logCollector = logCollector; RxApp.DefaultExceptionHandler = new ExceptionHandler(this); if (logCollector != null) { logViewerViewModel = new LogViewerViewModel(logCollector); } // True when one or more items have been selected in the openFilesList. var hasSelectedItem = this.WhenAnyValue(x => x.ContentViewModel).Select(x => x != null); var hasSelectedFile = this.WhenAnyValue(x => x.ContentViewModel).Select(x => x != null && typeof(IExplorerFileItem).IsAssignableFrom(x.GetType())); // True when the OpenFiles list has at least 1 item. var hasItems = openItemsList.CountChanged.Select(x => x > 0); var hasFiles = openItemsList.CountChanged.Select(x => openItemsList.Items.OfType <IExplorerFileItem>().FirstOrDefault() != null); // Probaby not the best way... OpenFileCommand = ReactiveCommand.CreateFromTask <string[]?, IList <IExplorerFileItem> >(ShowOpenFileDialog); OpenFolderCommand = ReactiveCommand.CreateFromTask(ShowOpenFolderDialog); SaveSelectedFileCommand = ReactiveCommand.CreateFromTask(SaveSelectedFile, hasSelectedFile); SaveSelectedFileAsCommand = ReactiveCommand.CreateFromTask(SaveSelectedFileAs, hasSelectedFile); SaveAllFilesCommand = ReactiveCommand.CreateFromTask(SaveAllFiles, hasFiles); CloseSelectedItemCommand = ReactiveCommand.Create(CloseSelectedItem, hasSelectedItem); CloseAllItemsCommand = ReactiveCommand.Create(CloseAllItems, hasItems); ShowLogViewerCommand = ReactiveCommand.Create(ShowLogViewer); ShowBatchToolCommand = ReactiveCommand.Create(ShowOpenBatchTool); CloseItemCommand = ReactiveCommand.Create <IExplorerItem>(CloseItem); // The below commands have a hasSelectedFile because they always get openFileListBox.SelectedItems passed as CommandParameter SaveFilesCommand = ReactiveCommand.CreateFromTask <IList <IExplorerFileItem> >(SaveFiles, hasSelectedFile); SaveFilesAsCommand = ReactiveCommand.CreateFromTask <IList <IExplorerFileItem> >(SaveFilesAs, hasSelectedFile); CloseItemsCommand = ReactiveCommand.Create <IList <IExplorerItem> >(CloseItems, hasSelectedItem); // GMD Commands var hasGmdSelected = this.WhenAnyValue(x => x.ContentViewModel).Select(x => x is GmdViewModel); ImportFromCsvCommand = ReactiveCommand.Create(() => { if (ContentViewModel is GmdViewModel vm) { vm.ImportFromCsvCommand.Execute().Subscribe(); } }, hasGmdSelected); ExportToCsvCommand = ReactiveCommand.Create(() => { if (ContentViewModel is GmdViewModel vm) { vm.ExportToCsvCommand.Execute().Subscribe(); } }, hasGmdSelected); AddEntryCommand = ReactiveCommand.Create(() => { if (ContentViewModel is GmdViewModel vm) { vm.AddEntryCommand.Execute().Subscribe(); } }, hasGmdSelected); AddPaddingEntryCommand = ReactiveCommand.Create(() => { if (ContentViewModel is GmdViewModel vm) { vm.AddPaddingEntryCommand.Execute().Subscribe(); } }, hasGmdSelected); openItemsList.Connect() .ObserveOn(RxApp.MainThreadScheduler) .Bind(out openItemsBinding) .DisposeMany() .Subscribe(); flashMessages.Connect() .ObserveOn(RxApp.MainThreadScheduler) .Bind(out flashMessagesBinding) .DisposeMany() .Subscribe(); this.WhenAnyValue(x => x.ContentViewModel) .Select(x => x == null ? "Cirilla Toolkit" : $"{x.Title} - Cirilla Toolkit") .ToPropertyEx(this, x => x.Title); var shouldShowFlashAlert = flashMessages.CountChanged .Select(x => x > 0); shouldShowFlashAlert .Select(x => x ? (double)framework.FindResource("ThemeDisabledOpacity") ! : 1.0) .ToPropertyEx(this, x => x.ContentOpacity); if (this.logCollector != null) { this.logCollector.Events .ToObservableChangeSet() .OnItemAdded(x => StatusText = x.Message) .Subscribe(); } }
public ImportCompetenciesFromFileService( IFrameworkService frameworkService ) { this.frameworkService = frameworkService; }
public CataloogController() { _deviceService = new DeviceService(); _osService = new OSService(); _frameworkService = new FrameworkService(); }
public FrameworkController(IFrameworkService frameworkService) { _frameworkService = frameworkService; }