public OperationController( ISmsStoreFactory factory, ServiceConfiguration configuration, IReportManager reportManager, IInboundManager inboundManager, ICredentialManager credentialManager, MetricManager metricManager) { this.store = factory.GetStore(); this.configuration = configuration; this.reportManager = reportManager; this.inboundManager = inboundManager; this.credentialManager = credentialManager; this.metricManager = metricManager; this.random = new Random(); this.proxyFactory = new ServiceProxyFactory((c) => { return(new FabricTransportServiceRemotingClientFactory( serializationProvider: new ServiceRemotingJsonSerializationProvider())); }); if (this.configuration.SmsOpsInfo.IsValid()) { this.mailHelper = new MailHelper(this.configuration.SmsOpsInfo); } }
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 InboundManager( ISmsStoreFactory factory, ServiceConfiguration configuration, IReportManager reportManager, ICredentialManager credentialManager) { this.store = factory.GetStore(); this.telemetryManager = new InboundTelemetryManager(configuration); this.reportManager = reportManager; this.credentialManager = credentialManager; this.subscriber = Observable .Timer(TimeSpan.Zero, MessageCleanupPeriod) .Select(x => Observable.FromAsync(async() => await CleanupAsync())) .Concat() .Subscribe(); }
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 CredentialManager(ISmsStoreFactory factory) { this.store = factory.GetStore(); this.connectorMetadataCache = new ConcurrentDictionary <string, ConnectorMetadata>(); }