コード例 #1
0
        //private IntegrationService _integrationService;

        public ContextSetDiscoveryService(DonutContext ctx, IServiceProvider serviceProvider)
        {
            _context            = ctx;
            _setFinder          = new CacheSetFinder();
            _setSource          = new CacheSetSource();
            _integrationService = (IIntegrationService)serviceProvider.GetService(typeof(IIntegrationService));
        }
コード例 #2
0
        public async Task SetUp()
        {
            var settings = new Dictionary <string, string>();

            settings.Add("Common_Api_Url", "http://localhost");
            settings.Add("Integrations_Api_Url", "http://localhost");
            settings.Add("Unimicro.Api.Url", "http://test-api.unieconomy.no/api/");
            settings.Add(Unimicro.Constants.Constants.API.API_USERNAME_CONFIG_KEY, "Sticos-integration");
            settings.Add(Unimicro.Constants.Constants.API.API_PASSWORD_CONFIG_KEY, "Sticosintegration123");

            _actions = (sc) =>
            {
                _integrationService = A.Fake <IIntegrationService>();
                _entitymapService   = A.Fake <IEntityMapService>();

                sc.ReplaceTransient <IDbContextFactory <TimeregDbContext>, InMemoryDbContextFactory>();
                sc.ReplaceScoped <IIntegrationService>(_integrationService);
                sc.ReplaceScoped <IEntityMapService>(_entitymapService);
            };

            _testServer = new TestServerBuilder()
                          .WithPostConfigureCollection(_actions)
                          .WithConfigSettings(settings)
                          .Build <Startup>();

            _client = _testServer.CreateClientWithJwtToken(_customerId, _userId);
            _mapper = _testServer.Host.Services.GetService <IMapper>();
        }
コード例 #3
0
 public HwConfigSample(INonconfigDataManager nonconfigDataManager, IIntegrationService integrationSvc, IAceLog log)
 {
     _nonconfigDataManager = nonconfigDataManager;
     _integrationSvc = integrationSvc;
     _log = log;
     SampleFileName = SAMPLE_FILENAME;
 }
コード例 #4
0
 public ApiController(ISessionManager sessionManager, ITokenManager tokenManager, IIntegrationService integrationService, Configuration configuration)
 {
     _sessionManager     = sessionManager;
     _tokenManager       = tokenManager;
     _integrationService = integrationService;
     _configuration      = configuration;
 }
コード例 #5
0
 public CompanyService(NRZContext context,
                       IStringLocalizer <SharedResources> localizer,
                       IIntegrationService integrationService)
     : base(context, localizer)
 {
     _integrationService = integrationService;
 }
コード例 #6
0
 public OrderStartedEventHandler(ILogger <OrderStartedEventHandler> logger, ICustomerQuery customerQuery, ICustomerRepository customerRepository, IIntegrationService integrationService)
 {
     _logger             = logger;
     _customerQuery      = customerQuery;
     _customerRepository = customerRepository;
     _integrationService = integrationService;
 }
コード例 #7
0
 public OrderReadyToBillCommandHandler(ILogger <OrderReadyToBillCommand> logger, IMediator mediator, IPayRepository repository, IIntegrationService integrationService)
 {
     _logger             = logger;
     _mediator           = mediator;
     _repository         = repository;
     _integrationService = integrationService;
 }
コード例 #8
0
 public IntegrationController(
     ILogger <IntegrationController> logger,
     IIntegrationService sessionQueryService)
 {
     _logger = logger;
     _sessionQueryService = sessionQueryService;
 }
コード例 #9
0
 public HwConfigSample(INonconfigDataManager nonconfigDataManager, IIntegrationService integrationSvc, IAceLog log)
 {
     _nonconfigDataManager = nonconfigDataManager;
     _integrationSvc       = integrationSvc;
     _log           = log;
     SampleFileName = SAMPLE_FILENAME;
 }
コード例 #10
0
 public IntegrationController(
     IIntegrationService integrationService,
     IMapper mapper
     )
 {
     _integrationService = integrationService;
     _mapper             = mapper;
 }
コード例 #11
0
 public PropertyService(NRZContext context,
                        IIntegrationService integrationService,
                        IOptions <RegiXCertificateSettings> regixSettings,
                        IStringLocalizer <SharedResources> localizer = null)
     : base(context, localizer)
 {
     _integrationService      = integrationService;
     regixCertificateSettings = regixSettings.Value;
 }
コード例 #12
0
 public PersonService(NRZContext context,
                      IStringLocalizer <SharedResources> localizer,
                      IAddressService addressService,
                      IIntegrationService integrationService)
     : base(context, localizer)
 {
     _addressService     = addressService;
     _integrationService = integrationService;
 }
コード例 #13
0
 public OrganizationController(IIntegrationService integrationService,
                               IProjectService projectService,
                               IOrganizationService organizationService,
                               IJournalService journalService) : base(organizationService, journalService)
 {
     _integrationService  = integrationService;
     _projectService      = projectService;
     _organizationService = organizationService;
 }
コード例 #14
0
        public ServiceProvider BuildServices()
        {
            var services       = new ServiceCollection();
            var baseUrl        = "http://localhost:5000/";
            var configSettings = new Dictionary <string, string>()
            {
                { common.Constants.API_URL_CONFIG_KEY, baseUrl },
                { Constants.API.API_URL_CONFIG_KEY, baseUrl },
                { Integrations.Api.ProxyClient.Client.Constants.API_URL_CONFIG_KEY, baseUrl },
            };

            var configuration = new ConfigurationBuilder()
                                .AddInMemoryCollection(configSettings)
                                .Build();

            // Set up default services

            services.AddScoped <IConfiguration>(c => configuration);
            services.AddIocMapping();
            services.AddAutoMapper(AutoMapperSetup.Config);
            services.AddHttpClients(configuration);
            services.AddSharedServices();

            var userContext = new StaticUserContext(new UserContext {
                UserId = 81730
            });

            services.AddSingleton <ICurrentUserContext>(userContext);

            _integrationService = A.Fake <IIntegrationService>();
            _uniMicroClient     = A.Fake <IUnimicroClient>();
            _unitService        = A.Fake <IUnitService>();
            _entityMapService   = A.Fake <IEntityMapService>();
            _unitQueries        = A.Fake <IUnitQueries>();
            var absenceTypeService       = A.Fake <IAbsenceTypeService>();
            var fakeEmployeeService      = A.Fake <IEmployeeService>();
            var fakeAuthorizationContext = A.Fake <IAuthorizationContextService>();

            services.ReplaceScoped <IUnitQueries>(_unitQueries);
            services.ReplaceScoped <IUnimicroClient>(_uniMicroClient);
            services.ReplaceScoped <IEntityMapService>(_entityMapService);
            services.ReplaceScoped <IUnitService>(_unitService);
            services.ReplaceScoped <IEmployeeService>(fakeEmployeeService);
            services.ReplaceScoped <IAbsenceTypeService>(absenceTypeService);
            services.ReplaceScoped <IAuthorizationContextService>(fakeAuthorizationContext);
            services.ReplaceSingleton(_integrationService);

            services.ReplaceScoped <IDbContextFactory <TimeregDbContext>, InMemoryDbContextFactory>();

            services.AddScoped <IConsumer <IAbsenceApproved>, AbsenceApprovedConsumer>();
            services.AddScoped <IConsumer <IAbsenceDeleted>, AbsenceDeletedConsumer>();
            services.AddScoped <IConsumer <IIntegrationDeleted>, IntegrationDeleteConsumer>();
            services.AddScoped <IConsumer <IEmployeeDeleted>, EmployeeDeletedConsumer>();

            return(services.BuildServiceProvider());
        }
コード例 #15
0
 public IntegrationController(IIntegrationService integrationService,
                              ITimestampService timestampService,
                              IEPaymentService paymentService,
                              IEPaymentJobService paymentJobService)
 {
     this.integrationService = integrationService;
     this.timestampService   = timestampService;
     this.paymentService     = paymentService;
     this.paymentJobService  = paymentJobService;
 }
コード例 #16
0
 public FitbitController(
     IFitbitService fitbitService,
     IIntegrationService integrationService,
     IUserOperationContext userOperationContext,
     ILogger <FitbitController> logger)
 {
     _fitbitService        = fitbitService ?? throw new ArgumentNullException(nameof(fitbitService));
     _integrationService   = integrationService ?? throw new ArgumentNullException(nameof(integrationService));
     _userOperationContext = userOperationContext ?? throw new ArgumentNullException(nameof(userOperationContext));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
コード例 #17
0
        public ApplicantBiz(IRepository <Applicant> repository, IIntegrationService integrationService, ILogger <Applicant> logger)
        {
            this.repository         = repository;
            this._Logger            = logger;
            this.integrationService = integrationService;
            var config = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <AddApplicant, Applicant>();
                cfg.CreateMap <UpdateApplicant, Applicant>();
            });

            mapper = config.CreateMapper();
        }
コード例 #18
0
        public TimeRegService(IExternalSystemFactory externalSystemFactory,
                              IExternalSystemValidatorFactory validatorFactory,
                              ICurrentUserContext currentUserContext,
                              IIntegrationService integrationService)
        {
            _externalSystemFactory = externalSystemFactory;
            _validatorFactory      = validatorFactory;
            _currentUserContext    = currentUserContext;
            _integrationService    = integrationService;
            _integrationValidator  = new TimeregIntegrationValidator();

            Logger = NullLogger <TimeRegService> .Instance;
        }
コード例 #19
0
        public DashboardViewModel(IPlatformService platformService, IEventService eventService, IBookingService bookingService, IUserService userService, IGroupService groupService, IIntegrationService integrationService) : base(platformService)
        {
            _eventService       = eventService;
            _bookingService     = bookingService;
            _userService        = userService;
            _groupService       = groupService;
            _integrationService = integrationService;

            ShowMembersCommand  = new MvxCommand(() => ShowViewModel <MembersViewModel>());
            ItemSelectedCommand = new MvxCommand <CommonItemViewModel>(SelectItem);

            HeaderSliderList = new MvxObservableCollection <HeaderSliderItemViewModel>();
            BodySliderList   = new ObservableCollection <BodySliderItemViewModel>();
            RouterItems      = new ObservableCollection <CommonItemViewModel>();
        }
コード例 #20
0
 public StravaController(
     IIntegrationService integrationService,
     IStravaAuthenticationService stravaAuthenticationService,
     IStravaSubscriptionService stravaSubscriptionService,
     IStravaUpdateService stravaUpdateService,
     IUserOperationContext operationContext,
     ILogger <StravaController> logger)
 {
     _integrationService          = integrationService;
     _stravaAuthenticationService = stravaAuthenticationService;
     _stravaSubscriptionService   = stravaSubscriptionService;
     _stravaUpdateService         = stravaUpdateService;
     _operationContext            = operationContext;
     _logger = logger;
 }
コード例 #21
0
        public AbsenceService(IExternalSystemFactory externalSystemFactory,
                              IIntegrationService integrationService,
                              IAbsenceExportService absenceExportService,
                              IExternalSystemValidatorFactory externalSystemValidatorFactory,
                              IUnitService unitService)
        {
            _externalSystemFactory          = externalSystemFactory;
            _integrationService             = integrationService;
            _absenceExportService           = absenceExportService;
            _externalSystemValidatorFactory = externalSystemValidatorFactory;
            _unitService = unitService;
            Logger       = NullLogger <AbsenceService> .Instance;

            _integrationValidator = new TimeregIntegrationValidator();
        }
コード例 #22
0
        public static async Task <Integration> GetTimeregIntegration(this IIntegrationService integrationService, int?unitId)
        {
            Integration toReturn = null;

            if (!unitId.HasValue)
            {
                return(toReturn);
            }

            var searchQuery = new SearchQueryIntegration
            {
                UnitId   = unitId.Value,
                Category = (int)Category.Timereg,
            };
            var integrations = await integrationService.Search(searchQuery);

            return(integrations.FirstOrDefault());
        }
 public CertificateController(
     UserManager <ApplicationUser> userManager,
     IPersonService personService,
     //IClaimService claimService,
     IOptions <TokenConfig> tokenConfig,
     //ITokenService tokenService,
     IEmailService emailService,
     IIntegrationService integrationService,
     IStringLocalizer <SharedResources> localizer)
 {
     _tokenConfig = tokenConfig.Value;
     //_tokenService = tokenService;
     _userManager   = userManager;
     _personService = personService;
     //_claimService = claimService;
     _localizer          = localizer;
     _emailService       = emailService;
     _integrationService = integrationService;
 }
コード例 #24
0
        public IntegrationHostedService(IIntegrationService integrationService, NiisEoknoConfiguration configuration, ILogger logger)
        {
            if (integrationService == null)
            {
                throw new ArgumentNullException(nameof(integrationService));
            }

            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            _integrationService = integrationService;
            _configuration      = configuration;
            _logger             = logger;
        }
コード例 #25
0
 /// <summary>
 /// Map local template to server template key
 /// </summary>
 private Guid MapServerTemplateKey(IIntegrationService integrationService, TemplateDefinition localDefinition)
 {
     // Attempt to correct template definition
     if (!m_templateCorrection.TryGetValue(localDefinition.Mnemonic, out Guid updated))
     {
         var remoteTpl = integrationService.Find <TemplateDefinition>(o => o.Mnemonic == localDefinition.Mnemonic, 0, 1);
         if (!remoteTpl.Item.Any())
         {
             integrationService.Insert(localDefinition);
             return(localDefinition.Key.Value);
         }
         else
         {
             updated = remoteTpl.Item.First().Key.Value;
             m_templateCorrection.Add(localDefinition.Mnemonic, updated);
             return(updated);
         }
     }
     else
     {
         return(updated);
     }
 }
コード例 #26
0
 public IntegrationController(IIntegrationService integrationService,
                              IOrganizationService organizationService,
                              IJournalService journalService) : base(organizationService, journalService)
 {
     _integrationService = integrationService;
 }
 public IntegrationApiController(IIntegrationService integrationCheckService)
 {
     _integrationCheckService = integrationCheckService;
 }
コード例 #28
0
 protected SalesforceRequestHandler(IEnumerable <IIntegrationService> integrationServices)
 {
     IntegrationService = integrationServices.Single(x => x is SalesforceIntegrationService);
 }
コード例 #29
0
 public UnimicroValidator(IIntegrationService integrationService, IEntityMapService entityMapService)
 {
     _integrationService = integrationService;
     _entityMapService   = entityMapService;
 }
コード例 #30
0
 public IntegrationController(IIntegrationService integrationService, ILogger<IntegrationController> logger)
 {
     _integrationService = integrationService;
     _logger = logger;
 }
コード例 #31
0
 public SyncTeamsCommandHandler(IIntegrationService integrationService, HttpClient httpClient)
 {
     _integrationService = integrationService;
     _httpClient         = httpClient;
 }