public TestModule(TestTwin defaultTwin = null) { Twin.SetDefault(defaultTwin ?? _defaultTwin); Twin.Subscribe(async twin => { Logger.LogInformation("Twin update"); await Twin.ReportAsync(twin); return(TwinResult.Ok); }); }
public TemperatureSensor(TemperatureTwin defaultTwin = null) { _startTimeStamp = DateTime.Now; Twin.SetDefault(defaultTwin ?? _defaultTwin); Twin.Subscribe(async twin => { Logger.LogInformation("Twin update"); ConfigureGenerator(twin); await Twin.ReportAsync(twin); return(TwinResult.Ok); }); }