/// <summary>
        /// Add an extra contribution from an existing configuration file
        /// </summary>
        /// <param name="extraMassConf">The existing confiuration</param>
        public void AddExtraContributionFromExistingConf(IReadOnlyList <ExtraMassContributionConfiguration> extraMassConf)
        {
            if (extraMassConf == null)
            {
                return;
            }

            foreach (var extraMassContributionConfiguration in extraMassConf)
            {
                var vm = new ExtraMassContributionConfigurationViewModel(this.PossibleCategories, this.ValidateMainForm, this.RemoveExtraMassConfigViewModel);
                vm.SelectedCategories      = new ReactiveList <Category>(this.PossibleCategories.Where(x => extraMassContributionConfiguration.ContributionCategories.Select(y => y.Iid).Contains(x.Iid)));
                vm.SelectedParameter       = this.PossibleParameterTypes.FirstOrDefault(x => x.Iid == extraMassContributionConfiguration.MassParameterType.Iid);
                vm.SelectedMarginParameter = extraMassContributionConfiguration.MarginParameterType != null
                    ? this.PossibleParameterTypes.FirstOrDefault(x => x.Iid == extraMassContributionConfiguration.MarginParameterType.Iid)
                    : null;

                this.ExtraMassContributions.Add(vm);
            }
        }
 /// <summary>
 /// Removes the <see cref="ExtraMassContributionConfigurationViewModel"/>
 /// </summary>
 /// <param name="vm">The <see cref="ExtraMassContributionConfigurationViewModel"/> to remove</param>
 private void RemoveExtraMassConfigViewModel(ExtraMassContributionConfigurationViewModel vm)
 {
     this.ExtraMassContributions.Remove(vm);
 }