예제 #1
0
 public EmailEngine(
     IEmailStoreFactory factory,
     ServiceConfiguration configuration,
     MetricManager metricManager,
     ICredentialManager credentialManager)
 {
     this.store             = factory.GetStore();
     this.credentialManager = credentialManager;
     this.metricManager     = metricManager;
     this.configuration     = configuration;
 }
예제 #2
0
 public EmailManager(
     IEmailStore <EmailMessage> emailStore,
     IOptions <SmtpSettings> options,
     ILogger <EmailManager> logger,
     ISmtpService smtpService,
     IBroker broker)
 {
     _emailStore   = emailStore;
     _smtpService  = smtpService;
     _smtpSettings = options.Value;
     _logger       = logger;
     _broker       = broker;
 }
예제 #3
0
        public EmailSender(
            IEmailStore <EmailMessage> emailStore,
            IOptions <SmtpSettings> smtpSettings,
            ILogger <EmailSender> logger,
            IEmailManager emailManager,
            ICacheManager cacheManager,
            IDbHelper dbHelper)
        {
            _smtpSettings = smtpSettings.Value;
            _cacheManager = cacheManager;
            _emailManager = emailManager;
            _emailStore   = emailStore;
            _dbHelper     = dbHelper;
            _logger       = logger;

            // Set polling interval
            IntervalInSeconds = _smtpSettings.PollingInterval;
        }
예제 #4
0
        public ReportManager(
            string node,
            IEmailStoreFactory factory,
            ServiceConfiguration configuration,
            BillingAgent billingAgent,
            MetricManager metricManager,
            ICredentialManager credentialManager)
        {
            this.node             = node;
            this.store            = factory.GetStore();
            this.telemetryManager = new ReportTelemetryManager(
                factory,
                configuration,
                billingAgent,
                metricManager);

            this.credentialManager = credentialManager;
            this.configuration     = configuration;
        }
예제 #5
0
        public ReportTelemetryManager(
            IEmailStoreFactory factory,
            ServiceConfiguration configuration,
            BillingAgent billingAgent,
            MetricManager metricManager)
        {
            this.store = factory.GetStore();

            var account = CloudStorageAccount.Parse(configuration.TelemetryStoreConnectionString);

            this.client = account.CreateCloudTableClient();

            this.auditTable            = this.client.GetTableReference(MessageAuditTableName);
            this.reportInProgressTable = this.client.GetTableReference(ReportInprogressTableName);
            this.reportLeaseTable      = this.client.GetTableReference(ReportLeaseTableName);

            this.auditTable.CreateIfNotExists();
            this.reportInProgressTable.CreateIfNotExists();
            this.reportLeaseTable.CreateIfNotExists();

            this.billingAgent  = billingAgent;
            this.metricManager = metricManager;
        }
예제 #6
0
        public OperationController(
            IEmailStoreFactory factory,
            IEmailEngine engine,
            ServiceConfiguration configuration,
            IReportManager reportManager,
            ICredentialManager credentialManager,
            MetricManager metricManager)
        {
            this.store         = factory.GetStore();
            this.engine        = engine;
            this.configuration = configuration;

            this.reportManager     = reportManager;
            this.credentialManager = credentialManager;
            this.metricManager     = metricManager;

            this.random       = new Random();
            this.proxyFactory = new ServiceProxyFactory((c) =>
            {
                return(new FabricTransportServiceRemotingClientFactory(
                           serializationProvider: new ServiceRemotingJsonSerializationProvider()));
            });
        }
예제 #7
0
 public CredentialManager(IEmailStoreFactory factory)
 {
     this.store = factory.GetStore();
     this.connectorMetadataCache = new ConcurrentDictionary <string, ConnectorMetadata>();
 }