public EmailProvider(StatelessServiceContext context) : base(context) { var nodeContext = FabricRuntime.GetNodeContext(); this.configuration = new ServiceConfiguration(nodeContext, context.CodePackageActivationContext); this.storeFactory = new EmailStoreFactory(configuration.DefaultConnectionString); this.billingAgent = new BillingAgent(); this.metricManager = new MetricManager(configuration); this.credentialManager = new CredentialManager(this.storeFactory); this.reportManager = new ReportManager( nodeContext.NodeName, this.storeFactory, this.configuration, this.billingAgent, this.metricManager, this.credentialManager); this.engine = new EmailEngine( this.storeFactory, this.configuration, this.metricManager, this.credentialManager); }
public ReportTelemetryManager( ISmsStoreFactory factory, ServiceConfiguration configuration, BillingAgent billingAgent, MetricManager metricManager, ICredentialManager credentialManager) { this.store = factory.GetStore(); var account = CloudStorageAccount.Parse(configuration.TelemetryStoreConnectionString); this.client = account.CreateCloudTableClient(); this.summaryTable = this.client.GetTableReference(MessageSummaryTableName); this.detailTable = this.client.GetTableReference(MessageDetailTableName); this.batchTable = this.client.GetTableReference(MessageBatchRecordTableName); this.idMappingTable = this.client.GetTableReference(MessageIdMappingTableName); this.summaryTable.CreateIfNotExists(); this.detailTable.CreateIfNotExists(); this.batchTable.CreateIfNotExists(); this.idMappingTable.CreateIfNotExists(); this.billingAgent = billingAgent; this.metricManager = metricManager; this.credentialManager = credentialManager; this.updateLock = new SemaphoreSlim(1, 1); }
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; }
public ReportManager( ISmsStoreFactory factory, ServiceConfiguration configuration, BillingAgent billingAgent, MetricManager metricManager, ICredentialManager credentialManager /*,ITimeSeriesManager timeSeriesManager*/) { this.store = factory.GetStore(); this.telemetryManager = new ReportTelemetryManager( factory, configuration, billingAgent, metricManager, credentialManager); this.agents = new ConcurrentDictionary <string, ReportAgent>(); this.credentialManager = credentialManager; // this.timeSeriesManager = timeSeriesManager; this.Init().Wait(); }
public SmsProvider(StatelessServiceContext context) : base(context) { this.configuration = new ServiceConfiguration(FabricRuntime.GetNodeContext(), context.CodePackageActivationContext); this.storeFactory = new SmsStoreFactory(this.configuration.DefaultConnectionString); this.billingAgent = new BillingAgent(); this.metricManager = new MetricManager(this.configuration); // this.timeSeriesManager = this.BuildTimeSeriesManager(); this.credentialManager = new CredentialManager(this.storeFactory); this.reportManager = new ReportManager( this.storeFactory, this.configuration, this.billingAgent, this.metricManager, this.credentialManager); this.inboundManager = new InboundManager( this.storeFactory, this.configuration, this.reportManager, this.credentialManager); }
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; }