public void Initialize(Twin twin, DeviceClientApp app, RegistryManager deviceController) { _twin = twin; _app = app; _deviceController = deviceController; _deviceController.SetReportedPropertyUpdateCallbackAsync(OnReportedPropertyUpdate); }
private async Task InitializeMockObjectsAsync(ILogger logger) { logger.Log(LoggingLevel.Information, " Initializing mock objects..."); // Create the twin... _twin = new Twin(DeviceId, EmptyTwin); // Create the device client... _app = new DeviceClientApp(); await _app.InitializeDeviceClientAsync(_twin); // Create the portal client... _deviceController = new RegistryManager(_twin); }