public BlobStateRepository(string smartDetectorId, string alertRuleResourceId, ICloudStorageProviderFactory cloudStorageProviderFactory, ITracer tracer) { this.smartDetectorId = Diagnostics.EnsureStringNotNullOrWhiteSpace(() => smartDetectorId); this.alertRuleResourceId = Diagnostics.EnsureStringNotNullOrWhiteSpace(() => alertRuleResourceId).ToLowerInvariant(); this.cloudBlobContainerWrapper = cloudStorageProviderFactory.GetSmartDetectorStateStorageContainerAsync().Result; this.tracer = tracer; }
/// <summary> /// Initializes a new instance of the <see cref="BlobStateRepository"/> class /// </summary> /// <param name="smartDetectorId">The id of the Smart Detector</param> /// <param name="cloudStorageProviderFactory">The cloud storage provider factory</param> /// <param name="tracer">The tracer</param> public BlobStateRepository(string smartDetectorId, ICloudStorageProviderFactory cloudStorageProviderFactory, ITracer tracer) { Diagnostics.EnsureArgumentNotNull(() => smartDetectorId); this.smartDetectorId = smartDetectorId; this.cloudBlobContainerWrapper = cloudStorageProviderFactory.GetSmartDetectorStateStorageContainer(); this.tracer = tracer; }
/// <summary> /// Initializes a new instance of the <see cref="SmartDetectorRepository"/> class. /// </summary> /// <param name="tracer">Log wrapper</param> /// <param name="storageProviderFactory">The Azure storage provider factory</param> public SmartDetectorRepository(IExtendedTracer tracer, ICloudStorageProviderFactory storageProviderFactory) { this.tracer = Diagnostics.EnsureArgumentNotNull(() => tracer); this.containerClient = storageProviderFactory.GetSmartDetectorGlobalStorageContainer(); }
/// <summary> /// Initializes a new instance of the <see cref="SmartSignalResultPublisher"/> class. /// </summary> /// <param name="tracer">The tracer to use.</param> /// <param name="storageProviderFactory">The Azure storage provider factory.</param> public SmartSignalResultPublisher(ITracer tracer, ICloudStorageProviderFactory storageProviderFactory) { this.tracer = Diagnostics.EnsureArgumentNotNull(() => tracer); this.containerClient = storageProviderFactory.GetSmartSignalResultStorageContainer(); }
/// <summary> /// Initializes a new instance of the <see cref="SignalResultApi"/> class. /// </summary> /// <param name="storageProviderFactory">The storage provider factory.</param> /// <param name="applicationInsightsClientFactory">The application insights client factory.</param> public SignalResultApi(ICloudStorageProviderFactory storageProviderFactory, IApplicationInsightsClientFactory applicationInsightsClientFactory) { this.signalResultStorageContainer = storageProviderFactory.GetSmartSignalResultStorageContainer(); this.applicationInsightsClient = applicationInsightsClientFactory.GetApplicationInsightsClient(); }