Пример #1
0
        public async Task Initialize(IFeedback<LogEntry> log, IEntityContextConnection entityContextConnection,IAdapterManager adapterManager)
        {
            EntityContextConnection = entityContextConnection;
            Log = log;
            AdapterManager = adapterManager;

            var sb = new PluginSettingBuilder(entityContextConnection, CancellationToken);
            await OnSettingsCreating(sb);

            var ssb = new SceneSettingBuilder(EntityContextConnection);
            await OnSceneSettingsCreating(ssb);

            var dsb = new DeviceSettingBuilder(EntityContextConnection);
            await OnDeviceSettingsCreating(dsb);
        }
Пример #2
0
        public async Task Initialize(IFeedback <LogEntry> log, IEntityContextConnection entityContextConnection, IAdapterManager adapterManager)
        {
            EntityContextConnection = entityContextConnection;
            Log            = log;
            AdapterManager = adapterManager;

            var sb = new PluginSettingBuilder(entityContextConnection, CancellationToken);

            await OnSettingsCreating(sb);

            var ssb = new SceneSettingBuilder(EntityContextConnection);

            await OnSceneSettingsCreating(ssb);

            var dsb = new DeviceSettingBuilder(EntityContextConnection);

            await OnDeviceSettingsCreating(dsb);
        }
Пример #3
0
 public virtual Task OnDeviceSettingsCreating(DeviceSettingBuilder settingBuilder)
 {
     return Task.FromResult(0);
 }
 public override async Task OnDeviceSettingsCreating(DeviceSettingBuilder settingBuilder)
 {
     await settingBuilder.RegisterAsync(new DeviceSetting
         {
             UniqueIdentifier = DeviceSettingUids.ShowInLightswitch.ToString(),
             Name = "Show device in LightSwitch",
             Description = "If enabled this device will show in the LightSwitch device tab.",
             ValueType = DataType.BOOL,
             Value = true.ToString()
         }, CancellationToken);
 }
Пример #5
0
 public override async Task OnDeviceSettingsCreating(DeviceSettingBuilder settingBuilder)
 {
     await settingBuilder.RegisterAsync(new DeviceSetting
         {
             UniqueIdentifier = DeviceSettingUids.ShowInWebapi.ToString(),
             Name = "Show device in Web API",
             Description = "If enabled this device will show in applications that use the Web API",
             ValueType = DataType.BOOL,
             Value = Cache.ShowInWebapiDefaultValue.ToString()
         }, CancellationToken);
 }
Пример #6
0
 public virtual Task OnDeviceSettingsCreating(DeviceSettingBuilder settingBuilder)
 {
     return(Task.FromResult(0));
 }