//private IntegrationService _integrationService; public ContextSetDiscoveryService(DonutContext ctx, IServiceProvider serviceProvider) { _context = ctx; _setFinder = new CacheSetFinder(); _setSource = new CacheSetSource(); _integrationService = (IIntegrationService)serviceProvider.GetService(typeof(IIntegrationService)); }
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>(); }
public HwConfigSample(INonconfigDataManager nonconfigDataManager, IIntegrationService integrationSvc, IAceLog log) { _nonconfigDataManager = nonconfigDataManager; _integrationSvc = integrationSvc; _log = log; SampleFileName = SAMPLE_FILENAME; }
public ApiController(ISessionManager sessionManager, ITokenManager tokenManager, IIntegrationService integrationService, Configuration configuration) { _sessionManager = sessionManager; _tokenManager = tokenManager; _integrationService = integrationService; _configuration = configuration; }
public CompanyService(NRZContext context, IStringLocalizer <SharedResources> localizer, IIntegrationService integrationService) : base(context, localizer) { _integrationService = integrationService; }
public OrderStartedEventHandler(ILogger <OrderStartedEventHandler> logger, ICustomerQuery customerQuery, ICustomerRepository customerRepository, IIntegrationService integrationService) { _logger = logger; _customerQuery = customerQuery; _customerRepository = customerRepository; _integrationService = integrationService; }
public OrderReadyToBillCommandHandler(ILogger <OrderReadyToBillCommand> logger, IMediator mediator, IPayRepository repository, IIntegrationService integrationService) { _logger = logger; _mediator = mediator; _repository = repository; _integrationService = integrationService; }
public IntegrationController( ILogger <IntegrationController> logger, IIntegrationService sessionQueryService) { _logger = logger; _sessionQueryService = sessionQueryService; }
public HwConfigSample(INonconfigDataManager nonconfigDataManager, IIntegrationService integrationSvc, IAceLog log) { _nonconfigDataManager = nonconfigDataManager; _integrationSvc = integrationSvc; _log = log; SampleFileName = SAMPLE_FILENAME; }
public IntegrationController( IIntegrationService integrationService, IMapper mapper ) { _integrationService = integrationService; _mapper = mapper; }
public PropertyService(NRZContext context, IIntegrationService integrationService, IOptions <RegiXCertificateSettings> regixSettings, IStringLocalizer <SharedResources> localizer = null) : base(context, localizer) { _integrationService = integrationService; regixCertificateSettings = regixSettings.Value; }
public PersonService(NRZContext context, IStringLocalizer <SharedResources> localizer, IAddressService addressService, IIntegrationService integrationService) : base(context, localizer) { _addressService = addressService; _integrationService = integrationService; }
public OrganizationController(IIntegrationService integrationService, IProjectService projectService, IOrganizationService organizationService, IJournalService journalService) : base(organizationService, journalService) { _integrationService = integrationService; _projectService = projectService; _organizationService = organizationService; }
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()); }
public IntegrationController(IIntegrationService integrationService, ITimestampService timestampService, IEPaymentService paymentService, IEPaymentJobService paymentJobService) { this.integrationService = integrationService; this.timestampService = timestampService; this.paymentService = paymentService; this.paymentJobService = paymentJobService; }
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)); }
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(); }
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; }
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>(); }
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; }
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(); }
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; }
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; }
/// <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); } }
public IntegrationController(IIntegrationService integrationService, IOrganizationService organizationService, IJournalService journalService) : base(organizationService, journalService) { _integrationService = integrationService; }
public IntegrationApiController(IIntegrationService integrationCheckService) { _integrationCheckService = integrationCheckService; }
protected SalesforceRequestHandler(IEnumerable <IIntegrationService> integrationServices) { IntegrationService = integrationServices.Single(x => x is SalesforceIntegrationService); }
public UnimicroValidator(IIntegrationService integrationService, IEntityMapService entityMapService) { _integrationService = integrationService; _entityMapService = entityMapService; }
public IntegrationController(IIntegrationService integrationService, ILogger<IntegrationController> logger) { _integrationService = integrationService; _logger = logger; }
public SyncTeamsCommandHandler(IIntegrationService integrationService, HttpClient httpClient) { _integrationService = integrationService; _httpClient = httpClient; }