Exemple #1
0
 public GvaNomController(
     IUnitOfWork unitOfWork,
     ILotRepository lotRepository,
     IApplicationRepository applicationRepository,
     IPersonRepository personRepository,
     IAircraftRepository aircraftRepository,
     IAirportRepository airportRepository,
     IEquipmentRepository equipmentRepository,
     IOrganizationRepository organizationRepository,
     ICaseTypeRepository caseTypeRepository,
     INomRepository nomRepository,
     IStageRepository stageRepository,
     IExaminationSystemRepository examinationSystemRepository,
     IAircraftRegistrationRepository aircraftRegistrationRepository,
     IEnumerable<IDataGenerator> dataGenerators)
 {
     this.unitOfWork = unitOfWork;
     this.lotRepository = lotRepository;
     this.applicationRepository = applicationRepository;
     this.personRepository = personRepository;
     this.aircraftRepository = aircraftRepository;
     this.airportRepository = airportRepository;
     this.equipmentRepository = equipmentRepository;
     this.organizationRepository = organizationRepository;
     this.caseTypeRepository = caseTypeRepository;
     this.nomRepository = nomRepository;
     this.stageRepository = stageRepository;
     this.examinationSystemRepository = examinationSystemRepository;
     this.aircraftRegistrationRepository = aircraftRegistrationRepository;
     this.dataGenerators = dataGenerators;
 }
        public CustomHttpControllerActivator(IApplicationRepository repository)
        {
            if (repository == null)
                throw new ArgumentNullException(nameof(repository));

            this.repository = repository;
        }
Exemple #3
0
 public PersonsController(
     IUnitOfWork unitOfWork,
     ILotRepository lotRepository,
     IPersonRepository personRepository,
     IApplicationRepository applicationRepository,
     IApplicationStageRepository applicationStageRepository,
     ICaseTypeRepository caseTypeRepository,
     INomRepository nomRepository,
     IFileRepository fileRepository,
     IPersonDocumentRepository personDocumentRepository,
     ILotEventDispatcher lotEventDispatcher,
     UserContext userContext)
 {
     this.unitOfWork = unitOfWork;
     this.lotRepository = lotRepository;
     this.personRepository = personRepository;
     this.applicationRepository = applicationRepository;
     this.applicationStageRepository = applicationStageRepository;
     this.caseTypeRepository = caseTypeRepository;
     this.nomRepository = nomRepository;
     this.fileRepository = fileRepository;
     this.personDocumentRepository = personDocumentRepository;
     this.lotEventDispatcher = lotEventDispatcher;
     this.userContext = userContext;
 }
        // GET, POST, PUT, DELETE
        public SuperheroController(IApplicationRepository repository)
        {
            if (repository == null)
                throw new ArgumentNullException(nameof(repository));

            this.repository = repository;
        }
 public DeploymentController(IApplicationRepository applicationRepository, IDeploymentRepository deploymentRepository, IApplicationHashingService applicationHashingService, IAuditRepository auditRepository)
 {
     this.applicationRepository = applicationRepository;
     this.deploymentRepository = deploymentRepository;
     this.applicationHashingService = applicationHashingService;
     this.auditRepository = auditRepository;
 }
 public DefaultViewModelFactory([NotNull] SuperheroesViewModel superheroesViewModel, IApplicationRepository repository)
 {
     if (superheroesViewModel == null) throw new ArgumentNullException(nameof(superheroesViewModel));
     if (repository == null) throw new ArgumentNullException(nameof(repository));
     this.superheroesViewModel = superheroesViewModel;
     this.repository = repository;
 }
 public ApplicationStageRepository(
     IUnitOfWork unitOfWork,
     IApplicationRepository applicationRepository)
 {
     this.unitOfWork = unitOfWork;
     this.applicationRepository = applicationRepository;
 }
 public virtual void SetUp()
 {
     OrganisationService = MockRepository.GenerateMock<IOrganisationService>();
     ApplicationRepository = MockRepository.GenerateMock<IApplicationRepository>();
     ApiKeyCreator = MockRepository.GenerateMock<IApiKeyCreator>();
     ApplicationService = new ApplicationService(ApplicationRepository, OrganisationService, ApiKeyCreator);
 }
 public ApplicationsController(
     IUnitOfWork unitOfWork,
     ILotRepository lotRepository,
     IPersonRepository personRepository,
     IOrganizationRepository organizationRepository,
     IAircraftRepository aircraftRepository,
     IAirportRepository airportRepository,
     IEquipmentRepository equipmentRepository,
     IDocRepository docRepository,
     IApplicationRepository applicationRepository,
     INomRepository nomRepository,
     IFileRepository fileRepository,
     IExaminationSystemRepository examinationSystemRepository,
     ILotEventDispatcher lotEventDispatcher,
     UserContext userContext)
 {
     this.unitOfWork = unitOfWork;
     this.lotRepository = lotRepository;
     this.personRepository = personRepository;
     this.organizationRepository = organizationRepository;
     this.aircraftRepository = aircraftRepository;
     this.airportRepository = airportRepository;
     this.equipmentRepository = equipmentRepository;
     this.docRepository = docRepository;
     this.applicationRepository = applicationRepository;
     this.nomRepository = nomRepository;
     this.examinationSystemRepository = examinationSystemRepository;
     this.fileRepository = fileRepository;
     this.lotEventDispatcher = lotEventDispatcher;
     this.userContext = userContext;
 }
Exemple #10
0
 public AircraftsController(
     IUnitOfWork unitOfWork,
     ILotRepository lotRepository,
     IInventoryRepository inventoryRepository,
     IAircraftRepository aircraftRepository,
     IAircraftRegistrationRepository aircraftRegistrationRepository,
     IAircraftRegMarkRepository aircraftRegMarkRepository,
     ISModeCodeRepository sModeCodeRepository,
     IFileRepository fileRepository,
     IApplicationRepository applicationRepository,
     ICaseTypeRepository caseTypeRepository,
     ILotEventDispatcher lotEventDispatcher,
     UserContext userContext)
 {
     this.unitOfWork = unitOfWork;
     this.lotRepository = lotRepository;
     this.inventoryRepository = inventoryRepository;
     this.aircraftRepository = aircraftRepository;
     this.aircraftRegistrationRepository = aircraftRegistrationRepository;
     this.aircraftRegMarkRepository = aircraftRegMarkRepository;
     this.sModeCodeRepository = sModeCodeRepository;
     this.fileRepository = fileRepository;
     this.applicationRepository = applicationRepository;
     this.caseTypeRepository = caseTypeRepository;
     this.lotEventDispatcher = lotEventDispatcher;
     this.userContext = userContext;
 }
 public StartBackgroundTasks(IApplicationRepository applicationRepository, ITweetRepository tweetRepository,
     ITweeterRepository tweeterRepository, ILanguageRepository languageRepository)
 {
     this.ApplicationRepository = applicationRepository;
     this.TweetRepository = tweetRepository;
     this.TweeterRepository = tweeterRepository;
     this.LanguageRepository = languageRepository;
 }
 public ApplicationSearchManagementService(IApplicationRepository applicationRepository,
                                           IHostManagementService hostManagementService,
                                           ISupportTeamManagementService supportTeamManagementService)
 {
     _applicationRepository = applicationRepository;
     _supportTeamManagementService = supportTeamManagementService;
     _hostManagementService = hostManagementService;
 }
Exemple #13
0
 public MasterController(IApplicationRepository appRepository, ITweetRepository tweetRepository,
     ITweeterRepository tweeterRepository, ILanguageRepository languageRepository)
 {
     this.AppRepository = appRepository;
     this.TweetRepository = tweetRepository;
     this.TweeterRepository = tweeterRepository;
     this.LanguageRepository = languageRepository;
 }
 public ApplicationsController(IApplicationRepository appsStore,
                               Func<IUnitOfWork> uowFactory,
                               IApplicationBus bus)
 {
     _appsStore = appsStore;
     _uowFactory = uowFactory;
     _bus = bus;
 }
        public SuperheroesViewModel([NotNull] IApplicationRepository repository)
        {
            if (repository == null) throw new ArgumentNullException(nameof(repository));
            this.repository = repository;

            InitializeViewModelAsync();
            InitializeCommands();
        }
Exemple #16
0
		public AwbStateManager(
			IAwbRepository awbs,
			IApplicationRepository applications,
			IApplicationStateManager states)
		{
			_awbs = awbs;
			_applications = applications;
			_states = states;
		}
		public ClientCalculationPresenter(
			IApplicationRepository applicationRepository,
			IAwbRepository awbRepository,
			IStateSettingsRepository settings)
		{
			_applicationRepository = applicationRepository;
			_awbRepository = awbRepository;
			_settings = settings;
		}
		public ApplicationEditorWithEvent(
			IEventFacade events,
			IApplicationRepository applications,
			IApplicationEditor editor)
		{
			_events = events;
			_applications = applications;
			_editor = editor;
		}
		public void TestInitialize()
		{
			_fixture = new Fixture();
			_context = new CompositionHelper(Settings.Default.MainConnectionString, Settings.Default.FilesConnectionString);
			_context.Kernel.Bind<ApplicationController>().ToSelf();

			_controller = _context.Kernel.Get<ApplicationController>();
			_clientRepository = _context.Kernel.Get<IClientRepository>();
			_applicationRepository = _context.Kernel.Get<IApplicationRepository>();
		}
Exemple #20
0
		public CommonFilesFacade(
			IAwbFileRepository awbFiles, IClientExcelHelper excel, ISerializer serializer,
			IApplicationFileRepository applicationFiles, IApplicationRepository applications)
		{
			_awbFiles = awbFiles;
			_excel = excel;
			_serializer = serializer;
			_applicationFiles = applicationFiles;
			_applications = applications;
		}
        public FilteredApplicationCategory(string name, IApplicationRepository applicationRepository)
        {
            this.Name = name;
            _applicationRepository = applicationRepository;
            _filter = string.Empty;

            _applications = new ObservableCollection<IApplication>();

            FilterApplications(); // Initial filtering to populate the applications
        }
        public virtual void SetUp()
        {
            ServiceLocatorInitializer.Init();

            string[] mappingAssemblies = RepositoryTestsHelper.GetMappingAssemblies();
            _configuration = NHibernateSession.Init(new SimpleSessionStorage(), mappingAssemblies,
                                                    "../../../../app/wrms.Web/NHibernate.config");

            _applicationRepository = new ApplicationRepository();
        }
        public ArchiveService(IApplicationRepository applicationRepository,
            IStatusGeneratorFactory statusGeneratorFactory, IPipelinePositionGenerator pipelinePositionGenerator)
        {
            Check.If(applicationRepository).IsNotNull();
            Check.If(statusGeneratorFactory).IsNotNull();
            Check.If(pipelinePositionGenerator).IsNotNull();

            _applicationRepository = applicationRepository;
            _statusGeneratorFactory = statusGeneratorFactory;
            _pipelinePositionGenerator = pipelinePositionGenerator;
        }
		public AdminCalculationPresenter(
			IApplicationRepository applications,
			IAwbRepository awbs,
			ISenderRepository senders,
			IClientBalanceRepository balances)
		{
			_applications = applications;
			_awbs = awbs;
			_senders = senders;
			_balances = balances;
		}
Exemple #25
0
		public CalculationService(
			ICalculationRepository calculations,
			ISenderRepository senders,
			IAwbRepository awbs,
			IApplicationRepository applications)
		{
			_calculations = calculations;
			_senders = senders;
			_awbs = awbs;
			_applications = applications;
		}
Exemple #26
0
		public BillModelFactory(
			IApplicationRepository applications,
			ICalculationRepository calculations,
			IClientRepository clients,
			ISettingRepository settings)
		{
			_applications = applications;
			_calculations = calculations;
			_clients = clients;
			_settings = settings;
		}
 public FirstTimeUserExperienceTracker(IApplicationRepository applicationRepository, ILocationRepository locationRepository,
     IDeviceRepository deviceRepository, ICredentialsRepository credentialsRepository, IActionRepository actionRepository, 
     IIftttConnector iftttConnector)
 {
     _applicationRepository = applicationRepository;
     _locationRepository = locationRepository;
     _deviceRepository = deviceRepository;
     _credentialsRepository = credentialsRepository;
     _actionRepository = actionRepository;
     _iftttConnector = iftttConnector;
 }
        public CaselistService(IApplicationRepository applicationRepository,
            IPipelinePositionGenerator pipelinePositionGenerator, ICaselistWindowSettings caselistWindowSettings)
        {
            Check.If(applicationRepository).IsNotNull();
            Check.If(pipelinePositionGenerator).IsNotNull();
            Check.If(caselistWindowSettings).IsNotNull();

            _applicationRepository = applicationRepository;
            _pipelinePositionGenerator = pipelinePositionGenerator;
            _caselistWindowSettings = caselistWindowSettings;
        }
        public FunctionalityToggler(IPermissionRepository permissionRepository, 
            IBackgroundTaskRegistrar backgroundTaskRegistrar, IApplicationRepository applicationRepository)
        {
            if (permissionRepository == null) throw new ArgumentNullException(nameof(permissionRepository));
            if (backgroundTaskRegistrar == null) throw new ArgumentNullException(nameof(backgroundTaskRegistrar));
            if (applicationRepository == null) throw new ArgumentNullException(nameof(applicationRepository));

            _permissionRepository = permissionRepository;
            _backgroundTaskRegistrar = backgroundTaskRegistrar;
            _applicationRepository = applicationRepository;
        }
 public PersonExportXmlController(
     IUnitOfWork unitOfWork,
     ILotRepository lotRepository,
     INomRepository nomRepository,
     IApplicationRepository applicationRepository)
 {
     this.unitOfWork = unitOfWork;
     this.lotRepository = lotRepository;
     this.nomRepository = nomRepository;
     this.applicationRepository = applicationRepository;
 }
Exemple #31
0
 public SenderApplicationController(
     ISenderApplicationManager manager,
     IClientRepository clients,
     IIdentityService identity,
     ICountryRepository countries,
     ISenderRepository senders,
     IApplicationRepository applications)
 {
     _manager      = manager;
     _clients      = clients;
     _identity     = identity;
     _countries    = countries;
     _senders      = senders;
     _applications = applications;
 }
Exemple #32
0
 public BillController(
     IBillPdf pdf,
     IBillModelFactory modelFactory,
     IApplicationRepository applications,
     IBillRepository bills,
     IBillManager manager,
     IIdentityService identity)
 {
     _pdf          = pdf;
     _modelFactory = modelFactory;
     _applications = applications;
     _bills        = bills;
     _manager      = manager;
     _identity     = identity;
 }
 public CollateralMessageListener(
     IEventBus bus,
     IMediator mediator,
     ILogger <CollateralMessageListener> logger,
     IApplicationRepository appRepository,
     IServiceProvider serviceProvider,
     ApplicationDocumentsResolver documentsResolver
     )
 {
     this._bus          = bus;
     this._mediator     = mediator;
     this._logger       = logger;
     _documentsResolver = documentsResolver;
     _serviceProvider   = serviceProvider;
 }
        public PhotosController(IApplicationRepository repo, IMapper mapper, IOptions <CloudinarySettings> cloudinaryConfig)
        {
            _cloudinaryConfig = cloudinaryConfig;
            _mapper           = mapper;
            _repo             = repo;


            Account acc = new Account(
                _cloudinaryConfig.Value.CloudName,
                _cloudinaryConfig.Value.ApiKey,
                _cloudinaryConfig.Value.ApiSecret
                );

            _cloudinary = new Cloudinary(acc);
        }
Exemple #35
0
 public AdminService(
     IApplicationRepository applicationRepositoryInstance,
     IEnvironmentRepository environmentRepositoryInstance,
     IMapper mapperInstance,
     IMessageTemplateRepository messageTemplateRepositoryInstance,
     IPermissionRepository permissionRepositoryInstance,
     IRoleRepository roleRepositoryInstance)
 {
     applicationRepository = applicationRepositoryInstance;
     environmentRepository = environmentRepositoryInstance;
     mapper = mapperInstance;
     messageTemplateRepository = messageTemplateRepositoryInstance;
     permissionRepository      = permissionRepositoryInstance;
     roleRepository            = roleRepositoryInstance;
 }
Exemple #36
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InstancesController"/> class
 /// </summary>
 /// <param name="instanceRepository">the instance repository handler</param>
 /// <param name="instanceEventRepository">the instance event repository service</param>
 /// <param name="applicationRepository">the application repository handler</param>
 /// <param name="logger">the logger</param>
 /// <param name="pdp">the policy decision point.</param>
 /// <param name="settings">the general settings.</param>
 public InstancesController(
     IInstanceRepository instanceRepository,
     IInstanceEventRepository instanceEventRepository,
     IApplicationRepository applicationRepository,
     ILogger <InstancesController> logger,
     IPDP pdp,
     IOptions <GeneralSettings> settings)
 {
     _instanceRepository      = instanceRepository;
     _instanceEventRepository = instanceEventRepository;
     _applicationRepository   = applicationRepository;
     _pdp                = pdp;
     _logger             = logger;
     _storageBaseAndHost = $"{settings.Value.Hostname}/storage/api/v1/";
 }
Exemple #37
0
 public BillManager(
     IApplicationRepository applications,
     ISettingRepository settings,
     IBillRepository bills,
     IBillPdf pdf,
     IAdminRepository admins,
     IMailSender mail)
 {
     _applications = applications;
     _settings     = settings;
     _bills        = bills;
     _pdf          = pdf;
     _admins       = admins;
     _mail         = mail;
 }
Exemple #38
0
 public HomeController(
     IOptions <GeneralSettings> generalSettings,
     IOptions <LocalPlatformSettings> localPlatformSettings,
     IUserProfiles userProfileService,
     IAuthentication authenticationService,
     IApplicationRepository applicationRepository,
     ILocalApp localApp)
 {
     _generalSettings       = generalSettings.Value;
     _localPlatformSettings = localPlatformSettings.Value;
     _userProfileService    = userProfileService;
     _authenticationService = authenticationService;
     _applicationRepository = applicationRepository;
     _localApp = localApp;
 }
Exemple #39
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataController"/> class
 /// </summary>
 /// <param name="dataRepository">the data repository handler</param>
 /// <param name="instanceRepository">the indtance repository</param>
 /// <param name="applicationRepository">the application repository</param>
 /// <param name="instanceEventRepository">the instance event repository</param>
 /// <param name="generalsettings">the general settings.</param>
 /// <param name="logger">The logger</param>
 public DataController(
     IDataRepository dataRepository,
     IInstanceRepository instanceRepository,
     IApplicationRepository applicationRepository,
     IInstanceEventRepository instanceEventRepository,
     IOptions <GeneralSettings> generalsettings,
     ILogger <DataController> logger)
 {
     _dataRepository          = dataRepository;
     _instanceRepository      = instanceRepository;
     _applicationRepository   = applicationRepository;
     _instanceEventRepository = instanceEventRepository;
     _logger             = logger;
     _storageBaseAndHost = $"{generalsettings.Value.GetHostName}/storage/api/v1/";
 }
Exemple #40
0
 public ApplicationFactory(IApplicationRepository applicationRepository, IObjectBaseFactory objectBaseFactory,
                           IObjectPathFactory objectPathFactory, IParameterSetUpdater parameterSetUpdater,
                           IDimensionRepository dimensionRepository, IParameterContainerTask parameterContainerTask,
                           IParticleApplicationCreator particleApplicationCreator, ICloneManagerForBuildingBlock cloneManagerForBuildingBlock, IFormulaFactory formulaFactory)
 {
     _applicationRepository        = applicationRepository;
     _objectBaseFactory            = objectBaseFactory;
     _objectPathFactory            = objectPathFactory;
     _parameterSetUpdater          = parameterSetUpdater;
     _dimensionRepository          = dimensionRepository;
     _parameterContainerTask       = parameterContainerTask;
     _particleApplicationCreator   = particleApplicationCreator;
     _cloneManagerForBuildingBlock = cloneManagerForBuildingBlock;
     _formulaFactory = formulaFactory;
 }
 public AdminApplicationManager(
     IApplicationRepository applications,
     IApplicationStateManager states,
     IForwarderService forwarders,
     IApplicationEditor editor,
     IStateConfig config,
     ITransitService transitService)
 {
     _applications   = applications;
     _states         = states;
     _forwarders     = forwarders;
     _editor         = editor;
     _config         = config;
     _transitService = transitService;
 }
Exemple #42
0
 public HomeController(
     ILogger <HomeController> logger,
     IOptions <GeneralSettings> generalSettings,
     IOptions <LocalPlatformSettings> localPlatformSettings,
     IApplicationRepository applicationRepository,
     IUserProfiles userProfileService,
     JwtCookieHandler jwtHandler)
 {
     _logger                     = logger;
     _generalSettings            = generalSettings.Value;
     this._localPlatformSettings = localPlatformSettings.Value;
     this._applicationRepository = applicationRepository;
     this._userProfileService    = userProfileService;
     this.jwtHandler             = jwtHandler;
 }
Exemple #43
0
 public CancelApplicationCommandHandler(
     IMediator mediator,
     IApplicationRepository applicationRepository,
     IEventBus eventBus,
     ILogger <UpdateApplicationStatusCommand> logger,
     MessageEventFactory messageEventFactory,
     IAuditClient auditClient
     )
 {
     this._applicationRepository = applicationRepository;
     _mediator            = mediator ?? throw new ArgumentNullException(nameof(mediator));
     _eventBus            = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
     _logger              = logger ?? throw new ArgumentNullException(nameof(logger));
     _messageEventFactory = messageEventFactory;
     _auditClient         = auditClient;
 }
 /// <summary>
 /// 初始化一个<see cref="SecurityService"/>类型的实例
 /// </summary>
 public SecurityService(IAdminUnitOfWork unitOfWork
                        , IJsonWebTokenBuilder tokenBuilder
                        , IMessageEventBus messageEventBus
                        , IUserRepository userRepository
                        , IApplicationRepository applicationRepository
                        , IRoleRepository roleRepository
                        , ISignInManager signInManager)
 {
     UnitOfWork            = unitOfWork;
     TokenBuilder          = tokenBuilder;
     MessageEventBus       = messageEventBus;
     UserRepository        = userRepository;
     ApplicationRepository = applicationRepository;
     RoleRepository        = roleRepository;
     SignInManager         = signInManager;
 }
Exemple #45
0
 public ApplicationMessageBuilder(
     string defaultFrom,
     ICommonFilesFacade files,
     ITextBuilder textBuilder,
     IRecipientsFacade recipients,
     ITemplateRepositoryHelper templates,
     ISerializer serializer,
     IApplicationRepository applications)
 {
     _defaultFrom  = defaultFrom;
     _files        = files;
     _textBuilder  = textBuilder;
     _recipients   = recipients;
     _templates    = templates;
     _serializer   = serializer;
     _applications = applications;
 }
 public ApplicationListItemMapper(
     IStateFilter stateFilter,
     IStateRepository states,
     ICityRepository cities,
     IStateConfig stateConfig,
     IApplicationRepository applications,
     IApplicationFileRepository files,
     ICountryRepository countries)
 {
     _stateFilter  = stateFilter;
     _states       = states;
     _cities       = cities;
     _stateConfig  = stateConfig;
     _applications = applications;
     _files        = files;
     _countries    = countries;
 }
Exemple #47
0
        //  Makes sure that the database is populated with testing data
        private static async Task SeedDatabaseAsync(IApplicationRepository repository)
        {
            if (!await repository.GetQueryBuilder <Provider>().AnyAsync())
            {
                //  Add some testing providers
                await repository.AddEntitiesAsync(TestProviders);

                //  Set the ID of the providers
                foreach (Appointment a in TestAppointments)
                {
                    a.ProviderId = TestProviders.First().ProviderId;
                }

                //  Add some testing appointments
                await repository.AddEntitiesAsync(TestAppointments);
            }
        }
 public ChangePortfolioAcceptCommandHandler(
     IMediator mediator,
     IApplicationRepository applicationRepository,
     IChangePortfolioRepository changePortfolioRepository,
     IEventBus eventBus,
     ILogger <ChangePortfolioAcceptCommand> logger,
     MessageEventFactory messageEventFactory,
     IAuditClient auditClient)
 {
     this._applicationRepository     = applicationRepository;
     this._changePortfolioRepository = changePortfolioRepository;
     _mediator            = mediator ?? throw new ArgumentNullException(nameof(mediator));
     _eventBus            = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
     _logger              = logger ?? throw new ArgumentNullException(nameof(logger));
     _messageEventFactory = messageEventFactory;
     _auditClient         = auditClient ?? throw new ArgumentNullException(nameof(auditClient));;
 }
Exemple #49
0
        public Exec(IApplicationRepository repo)
        {
            m_ApplicationRepository = repo;
            RepoApplicationDescriptor[] installedApplications = m_ApplicationRepository.GetAllApplications();

            foreach (RepoApplicationDescriptor application in installedApplications)
            {
                try
                {
                    Install(application);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                }
            }
        }
 public ApplicationService(
     IApplicationRepository applicationRepository,
     IServiceActionRepository serviceActionRepository,
     IPropertyRegisterClient propertyRegisterClient,
     INomenclaturesProvider nomenclaturesProvider,
     IIdempotentOperationExecutor idempotentOperationExecutor,
     IActionDispatcher actionDispatcher,
     IPaymentManager paymentManager)
 {
     ApplicationRepository       = applicationRepository;
     ServiceActionRepository     = serviceActionRepository;
     PropertyRegisterClient      = propertyRegisterClient;
     NomenclaturesProvider       = nomenclaturesProvider;
     IdempotentOperationExecutor = idempotentOperationExecutor;
     ActionDispatcher            = actionDispatcher;
     PaymentManager = paymentManager;
 }
        public AuditManager(IApplicationHashingService hashingService, IAuditRepository auditRepository,
                            IDeploymentRepository deploymentRepository, IApplicationRepository applicationRepository, IMailService mailService)
        {
            this.hashingService        = hashingService ?? DIContainer.Container.GetInstance <IApplicationHashingService>();
            this.auditRepository       = auditRepository ?? DIContainer.Container.GetInstance <IAuditRepository>();
            this.deploymentRepository  = deploymentRepository ?? DIContainer.Container.GetInstance <IDeploymentRepository>();
            this.applicationRepository = applicationRepository ?? DIContainer.Container.GetInstance <IApplicationRepository>();
            this.mailService           = mailService ?? DIContainer.Container.GetInstance <IMailService>();

            var seconds = Configuration.AuditTimerInSeconds;

            if (seconds > 59)
            {
                timer          = new Timer(seconds * 1000);
                timer.Elapsed += Timer_Elapsed;
            }
        }
Exemple #52
0
 public Processing(string trigger)
 {
     try
     {
         TriggerPath                    = trigger;
         objXmlHelper                   = new XmlHelper();
         _runDetailRepository           = new RunDetailsRepository();
         _runComponentStatusRepository  = new RunComponentStatusRepository();
         _uploadFileRepository          = new UploadFileRepository();
         _fileTransferSettingRepository = new FileTransferSettingsRepository();
         test = new ApplicationRepository();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #53
0
 public ContinueApplicationCommandHandler(IApplicationRepository applicationRepository,
                                          IMediator mediator,
                                          IEventBus eventBus,
                                          ILogger <ContinueApplicationCommand> logger,
                                          MessageEventFactory messageEventFactory,
                                          IConfigurationService configurationService,
                                          IInvolvedPartyRepository involvedPartyRepository,
                                          IAuditClient auditClient)
 {
     _applicationRepository = applicationRepository ?? throw new ArgumentNullException(nameof(applicationRepository));;
     _mediator                = mediator ?? throw new ArgumentNullException(nameof(mediator));;
     _eventBus                = eventBus ?? throw new ArgumentNullException(nameof(eventBus));;
     _logger                  = logger ?? throw new ArgumentNullException(nameof(logger));;
     _messageEventFactory     = messageEventFactory ?? throw new ArgumentNullException(nameof(messageEventFactory));
     _configurationService    = configurationService ?? throw new ArgumentNullException(nameof(configurationService));
     _involvedPartyRepository = involvedPartyRepository ?? throw new ArgumentNullException(nameof(involvedPartyRepository));
     _auditClient             = auditClient ?? throw new ArgumentNullException(nameof(involvedPartyRepository));
 }
Exemple #54
0
 public FormViewModel(IUnityContainer container, IApplicationRepository repository, IMyLogger logger, IFormSetShiftReportDataViewModel shiftReportDataViewModel)
     : base(container)
 {
     this.logger = logger;
     this.applicationRepository           = repository;
     this.settingsAndFilterPanelViewModel = new SettingsAndFilterPanelViewModel <FormDateReportDBModel>(container, repository, logger);
     this.ShiftReportDataViewModel        = shiftReportDataViewModel;
     this.SettingsAndFilterPanelViewModel.DataContextEnum            = DataContextEnum.FormViewModel;
     this.SettingsAndFilterPanelViewModel.GeneratedModelItemsAction += OnGetFormReportsModelItems;
     this.SettingsAndFilterPanelViewModel.IsReportGenerate          += OnGenerateReport;
     this.SettingsAndFilterPanelViewModel.SetTimer(TimerActionEnum.Set);
     this.ShiftReportDataViewModel.OnSendMaterialTypeInfo += OnGetMaterialTypeData;
     SaveReportInFileCommand = new DelegateCommand(OnSaveReportInFile);
     GenerateDetailsReportForChamberCommand = new DelegateCommand <string>(OnGenerateDetailsReportForChamber);
     IsChamberReportPanelEnabled            = false;
     IsSaveInFilePanelEnabled = false;
     DetailedReportType       = FormDetailedReportTypeEnum.Any;
 }
Exemple #55
0
        /// <summary>
        /// Initializes a new instance of the <see cref="InstancesController"/> class
        /// </summary>
        /// <param name="instanceRepository">the instance repository handler</param>
        /// <param name="applicationRepository">the application repository handler</param>
        /// <param name="generalSettings">the platform settings which has the url to the registry</param>
        /// <param name="logger">the logger</param>
        /// <param name="bridgeClient">the client to call bridge service</param>
        public InstancesController(
            IInstanceRepository instanceRepository,
            IApplicationRepository applicationRepository,
            IOptions <GeneralSettings> generalSettings,
            ILogger <InstancesController> logger,
            HttpClient bridgeClient)
        {
            _instanceRepository       = instanceRepository;
            _applicationRepository    = applicationRepository;
            this.logger               = logger;
            this.bridgeRegistryClient = bridgeClient;
            string bridgeUri = generalSettings.Value.GetBridgeRegisterApiEndpoint();

            if (bridgeUri != null)
            {
                this.bridgeRegistryClient.BaseAddress = new Uri(bridgeUri);
            }
        }
Exemple #56
0
 public ResetPasswordTokenCustomerImportApplication(
     IComponentContext context,
     IResetPasswordTokenService resetPasswordTokenService,
     ICustomerImportService customerImportService,
     IResetPasswordTokenRepository resetPasswordTokenRepository,
     IApplicationRepository applicationRepository,
     IApplicationStoreRepository applicationStoreRepository,
     IPasswordLogRepository passwordLogRepository,
     IEmailSender svcEmail)
     : base(context, resetPasswordTokenRepository, applicationStoreRepository)
 {
     this.resetPasswordTokenService  = resetPasswordTokenService;
     this.customerImportService      = customerImportService;
     this.applicationRepository      = applicationRepository;
     this.applicationStoreRepository = applicationStoreRepository;
     this.passwordLogRepository      = passwordLogRepository;
     this.svcEmail = svcEmail;
 }
        public garageController(
            IApplicationRepository applicationRepository,
            IAuthenticate authenticate,
            IServiceRepository serviceRepository,
            IGarageRepository garageRepository,
            ILogtimeRepository logtimeRepository,
            ILocationRepository locationRepository)
        {
            this.locationRepository    = locationRepository;
            this.authenticate          = authenticate;
            this.serviceRepository     = serviceRepository;
            this.garageRepository      = garageRepository;
            this.applicationRepository = applicationRepository;
            this.logtimeRepository     = logtimeRepository;

            ah = new authenticateHandler(this.authenticate, this.logtimeRepository);
            sh = new serviceHandler(this.serviceRepository, this.garageRepository);
            gh = new GarageHandler(this.applicationRepository, this.garageRepository, this.locationRepository);
        }
Exemple #58
0
 public ManageController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IEmailSender emailSender,
     ILogger <ManageController> logger,
     UrlEncoder urlEncoder,
     IStringLocalizer <ManageController> localizer,
     IMapper mapper,
     IApplicationRepository applicationRepository)
 {
     _userManager           = userManager;
     _signInManager         = signInManager;
     _emailSender           = emailSender;
     _logger                = logger;
     _urlEncoder            = urlEncoder;
     _localizer             = localizer;
     _mapper                = mapper;
     _applicationRepository = applicationRepository;
 }
        public DbContextUnitOfWork(ApplicationDbContext applicationDbContext)
        {
            _applicationDbContext = applicationDbContext;

            CustomSubtasks = new DbSetRepository <CustomSubtask <ApplicationIdentityUser> >(_applicationDbContext.Subtasks);
            CustomTasks    = new DbSetRepository <CustomTask <ApplicationIdentityUser> >(_applicationDbContext.Tasks, set => set.Include(ct => ct.Assigned));

            ApplicationUsers = new DbSetRepository <ApplicationIdentityUser>(_applicationDbContext.Users, set => set
                                                                             .Include(au => au.Groups)
                                                                             .Include(au => au.TaskLists));

            CustomTaskListGroups = new DbSetRepository <CustomTaskListGroup <ApplicationIdentityUser> >(_applicationDbContext.ListGroups, set => set
                                                                                                        .Include(lg => lg.CustomTaskLists));

            CustomTaskLists = new DbSetRepository <CustomTaskList <ApplicationIdentityUser> >(_applicationDbContext.TaskLists, set => set
                                                                                              .Include(tl => tl.Participants)
                                                                                              .Include(tl => tl.TaskListGroup)
                                                                                              .Include(tl => tl.Tasks));
        }
        public async Task WhenFindingAbsentApplicationThenNullIsReturned()
        {
            // Arrange
            IApplicationRepository fakeApplicationRepository = A.Fake <IApplicationRepository>();

            A.CallTo(() => fakeApplicationRepository.TryGetByDisplayNameAsync("TestApplicationDisplayName")).Returns(Task.FromResult <ApplicationEntity>(null));

            IUnitOfWork fakeUnitOfWork = A.Fake <IUnitOfWork>();

            IPasswordWithSaltHasher fakePasswordHasher = A.Fake <IPasswordWithSaltHasher>();

            IApplicationService applicationService = new ApplicationService(fakeApplicationRepository, fakeUnitOfWork, fakePasswordHasher);

            // Act
            ApplicationDto applicationDto = await applicationService.FindApplicationAsync("TestApplicationId", "TestApplicationSecret");

            // Assert
            Assert.IsNull(applicationDto);
        }