Ejemplo n.º 1
0
        private DeviceFeatureViewModel GetFeature(string id)
        {
            DeviceFeatureViewModel output = null;

            if (this.Features != null)
            {
                output = this.Features.Where((f) => f.Id == id).FirstOrDefault();
            }

            return(output);
        }
Ejemplo n.º 2
0
        public void SetFeatures(IEnumerable <DeviceFeature> features)
        {
            var list = new List <DeviceFeatureViewModel>();

            if (features != null)
            {
                foreach (var feature in features)
                {
                    list.Add(DeviceFeatureViewModel.Create(this.Device, feature));
                }
            }

            this.Features = list;
        }