コード例 #1
0
 /// <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);
 }
コード例 #2
0
 public CloudToMessageListenerJobHostedService(
     IMemoryCache cache,
     ILogger <CloudToMessageListenerJobHostedService> logger,
     RegisteredDevices registeredDevices,
     ServerOptions serverOptions)
 {
     this.cache             = cache;
     this.logger            = logger;
     this.registeredDevices = registeredDevices;
     this.serverOptions     = serverOptions;
 }