Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 6
0
 public virtual Task OnDeviceSettingsCreating(DeviceSettingBuilder settingBuilder)
 {
     return(Task.FromResult(0));
 }