Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="API"/> class.
 /// </summary>
 /// <param name="hubspotService">DI for <see cref="HubspotService"/>.</param>
 /// <param name="recaptchaService">DI for <see cref="RecaptchaService"/>.</param>
 /// <param name="recaptchaOptions">DI for <see cref="RecaptchaOptions"/>.</param>
 /// <param name="logger">DI for <see cref="ILogger"/>.</param>
 public API(
     IHubspotService hubspotService,
     IRecaptchaService recaptchaService,
     IOptionsMonitor <RecaptchaOptions> recaptchaOptions,
     ILogger <APILoggingCategory> logger)
 {
     this.hubspotService   = hubspotService;
     this.recaptchaService = recaptchaService;
     this.recaptchaOptions = recaptchaOptions.CurrentValue;
     this.logger           = logger;
 }
Ejemplo n.º 2
0
 public HomeController(IHubspotService hubspotService,
                       IRecaptchaService recaptchaService,
                       IOptionsMonitor <RecaptchaOptions> options,
                       ILogger <HomeController> logger
                       ) : base()
 {
     _hubspotService   = hubspotService;
     _recaptchaService = recaptchaService;
     _options          = options.CurrentValue;
     _logger           = logger;
 }
        public void OneTimeSetupBase()
        {
            var builder = new ConfigurationBuilder();

            builder.AddUserSecrets <TestFixtureBase>();
            builder.AddGoogleSecretsConfiguration();
            IConfiguration configuration = builder.Build();

            DenariService  = new DrapiService(configuration);
            HubspotService = new HubspotService(configuration, new MemoryCache(new MemoryCacheOptions()));
        }
Ejemplo n.º 4
0
        public Worker(
            IDrapiService drapiService,
            IHubspotService hubspotService,
            IGoogleCloudPubSubService googleCloudPubSubService,
            IGoogleCloudFirestoreService googleCloudFirestoreService,
            IMemoryCache memoryCache)
        {
            m_logger = LogManager.GetCurrentClassLogger();
            m_cache  = memoryCache;

            m_drapiService                = drapiService;
            m_hubspotService              = hubspotService;
            m_googleCloudPubSubService    = googleCloudPubSubService;
            m_googleCloudFirestoreService = googleCloudFirestoreService;
        }