public Devices( ITenantConnectionHelper tenantConnectionHelper, string ioTHubHostName, IAsaManagerClient asaManagerClient, IDeviceQueryCache deviceQueryCache) { this.tenantConnectionHelper = tenantConnectionHelper ?? throw new ArgumentNullException("tenantConnectionHelper " + ioTHubHostName); this.asaManager = asaManagerClient; this.deviceQueryCache = deviceQueryCache; }
public Devices( AppConfig config, ITenantConnectionHelper tenantConnectionHelper, IAsaManagerClient asaManagerClient, IDeviceQueryCache deviceQueryCache) { if (config == null) { throw new ArgumentNullException("config"); } this.tenantConnectionHelper = tenantConnectionHelper; this.asaManager = asaManagerClient; this.deviceQueryCache = deviceQueryCache; }
public DeviceQueryCacheTest() { this.mockStorage = new Mock <IStorageClient>(); this.mockConfig = new Mock <IAppConfigurationClient>(); this.mockConfig .Setup(x => x.GetValue(It.IsAny <string>())) .Returns(MockTenantId); this.mockLog = new Mock <ILogger <IDeviceQueryCache> >(); this.deviceQueryCache = new DeviceQueryCache( this.mockStorage.Object, this.mockConfig.Object, this.mockLog.Object); this.random = new Random(); }
public Devices( AppConfig config, ITenantConnectionHelper tenantConnectionHelper, IAsaManagerClient asaManagerClient, IDeviceQueryCache deviceQueryCache, IStorageClient storageClient, IAppConfigurationClient appConfigurationClient, IKustoQueryClient kustoQueryClient) { if (config == null) { throw new ArgumentNullException("config"); } this.kustoEnabled = config.DeviceTelemetryService.Messages.TelemetryStorageType.Equals( TelemetryStorageTypeConstants.Ade, StringComparison.OrdinalIgnoreCase); this.kustoQueryClient = kustoQueryClient; this.tenantConnectionHelper = tenantConnectionHelper; this.asaManager = asaManagerClient; this.deviceQueryCache = deviceQueryCache; this.storageClient = storageClient; this.appConfigurationClient = appConfigurationClient; }