예제 #1
0
        public DeviceInstance(DeviceFeatureProvider featureProvider, DeviceDefinition definition)
        {
            Definition = definition;
            Features   = definition.Features
                         .Select(x => featureProvider.Create(x.Feature, x.Options))
                         .ToArray();

            Traits           = GetSupportedTraits();
            FeatureByCommand = Features
                               .SelectMany(x => x.Commands.Select(y => new { Command = y, Feature = x }))
                               .ToDictionary(k => k.Command, v => v.Feature);

            WillReportState = false;
        }
예제 #2
0
 public DeviceInstanceProvider(DeviceFeatureProvider featureProvider)
 {
     _featureProvider = featureProvider;
 }