Ejemplo n.º 1
0
        public IDevicePanel CreateDevicePanel(Device device)
        {
            Initialize();
            IServiceScope scope = GlobalServiceProvider.CreateScope();

            scope.ServiceProvider.GetRequiredService <DeviceStorageService>().Set(device);
            PV6900DevicePanel devicePanel = scope.ServiceProvider.GetRequiredService <PV6900DevicePanel>();

            devicePanel.Scope = scope;
            return(devicePanel);
        }