SIL.Cog.Application.ViewModels.RelevantFeatureViewModel.RelevantFeatureViewModel C# (CSharp) Method

RelevantFeatureViewModel() public method

public RelevantFeatureViewModel ( SymbolicFeature feature, int weight, bool vowel, bool consonant, int>.ReadOnlyDictionary valueMetrics ) : System.Collections.Generic
feature SymbolicFeature
weight int
vowel bool
consonant bool
valueMetrics int>.ReadOnlyDictionary
return System.Collections.Generic
        public RelevantFeatureViewModel(SymbolicFeature feature, int weight, bool vowel, bool consonant, ReadOnlyDictionary<FeatureSymbol, int> valueMetrics)
        {
            _feature = feature;
            _weight = weight;
            _vowel = vowel;
            _consonant = consonant;

            var values = new List<RelevantValueViewModel>();
            foreach (FeatureSymbol symbol in feature.PossibleSymbols)
            {
                var vm = new RelevantValueViewModel(symbol, valueMetrics[symbol]);
                vm.PropertyChanged += ChildPropertyChanged;
                values.Add(vm);
            }
            _values = new ReadOnlyList<RelevantValueViewModel>(values);
        }