private DeviceFeatureViewModel GetFeature(string id) { DeviceFeatureViewModel output = null; if (this.Features != null) { output = this.Features.Where((f) => f.Id == id).FirstOrDefault(); } return(output); }
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; }