Exemple #1
0
 public FeatureViewModel(SymbolicFeature feature, FeatureSymbol symbol)
 {
     _feature = feature;
     _values = new ReadOnlyCollection<FeatureValueViewModel>(feature.PossibleSymbols.Select(s => new FeatureValueViewModel(s)).ToArray());
     if (symbol != null)
         _selectedValue = _values.Single(fv => fv.DomainSymbol == symbol);
     else if (_values.Count > 0)
         _selectedValue = _values[0];
 }
Exemple #2
0
 public FeatureViewModel(SymbolicFeature feature, FeatureSymbol symbol)
 {
     _feature = feature;
     _values  = new ReadOnlyCollection <FeatureValueViewModel>(feature.PossibleSymbols.Select(s => new FeatureValueViewModel(s)).ToArray());
     if (symbol != null)
     {
         _selectedValue = _values.Single(fv => fv.DomainSymbol == symbol);
     }
     else if (_values.Count > 0)
     {
         _selectedValue = _values[0];
     }
 }