/// <summary> /// Constructor /// </summary> public GatewayService(ServerOptions serverOptions, IMemoryCache cache, ILogger <GatewayService> logger, RegisteredDevices registeredDevices) { this.serverOptions = serverOptions; this.cache = cache; this.logger = logger; this.registeredDevices = registeredDevices; this.DeviceConnectionCacheSlidingExpiration = TimeSpan.FromMinutes(serverOptions.DefaultDeviceCacheInMinutes); }
public CloudToMessageListenerJobHostedService( IMemoryCache cache, ILogger <CloudToMessageListenerJobHostedService> logger, RegisteredDevices registeredDevices, ServerOptions serverOptions) { this.cache = cache; this.logger = logger; this.registeredDevices = registeredDevices; this.serverOptions = serverOptions; }