Setup() public method

public Setup ( ) : void
return void
        public override void Setup()
        {
            _ignoredMappings.SelectedMapping = null;
            _ignoredMappings.Mappings.Clear();

            ICognateIdentifier cognateIdentifier = _projectService.Project.CognateIdentifiers[ComponentIdentifiers.PrimaryCognateIdentifier];
            var blair = cognateIdentifier as BlairCognateIdentifier;

            if (blair == null)
            {
                Set(() => IgnoreRegularInsertionDeletion, ref _ignoreRegularInsertionDeletion, false);
                Set(() => RegularConsonantsEqual, ref _regularConsEqual, false);
                Set(() => AutomaticRegularCorrespondenceThreshold, ref _automaticRegularCorrespondenceThreshold, false);
                Set(() => DefaultRegularCorrepondenceThreshold, ref _defaultRegularCorrepondenceThreshold, 3);
                _similarVowels.SegmentMappings     = null;
                _similarConsonants.SegmentMappings = null;
            }
            else
            {
                Set(() => IgnoreRegularInsertionDeletion, ref _ignoreRegularInsertionDeletion, blair.IgnoreRegularInsertionDeletion);
                Set(() => RegularConsonantsEqual, ref _regularConsEqual, blair.RegularConsonantEqual);
                Set(() => AutomaticRegularCorrespondenceThreshold, ref _automaticRegularCorrespondenceThreshold, blair.AutomaticRegularCorrespondenceThreshold);
                Set(() => DefaultRegularCorrepondenceThreshold, ref _defaultRegularCorrepondenceThreshold, blair.DefaultRegularCorrespondenceThreshold);
                var ignoredMappings = (ListSegmentMappings)blair.IgnoredMappings;
                foreach (UnorderedTuple <string, string> mapping in ignoredMappings.Mappings)
                {
                    _ignoredMappings.Mappings.Add(_mappingFactory(mapping.Item1, mapping.Item2));
                }
                var segmentMappings = (TypeSegmentMappings)blair.SimilarSegments;
                _similarVowels.SegmentMappings     = (UnionSegmentMappings)segmentMappings.VowelMappings;
                _similarConsonants.SegmentMappings = (UnionSegmentMappings)segmentMappings.ConsonantMappings;
            }
            _similarVowels.Setup();
            _similarConsonants.Setup();
        }
        public override void Setup()
        {
            _ignoredMappings.SelectedMapping = null;
            _ignoredMappings.Mappings.Clear();

            ICognateIdentifier cognateIdentifier = _projectService.Project.CognateIdentifiers[ComponentIdentifiers.PrimaryCognateIdentifier];
            var blair = cognateIdentifier as BlairCognateIdentifier;

            if (blair == null)
            {
                Set(() => IgnoreRegularInsertionDeletion, ref _ignoreRegularInsertionDeletion, false);
                Set(() => RegularConsonantsEqual, ref _regularConsEqual, false);
                _similarVowels.SegmentMappings     = null;
                _similarConsonants.SegmentMappings = null;
            }
            else
            {
                Set(() => IgnoreRegularInsertionDeletion, ref _ignoreRegularInsertionDeletion, blair.IgnoreRegularInsertionDeletion);
                Set(() => RegularConsonantsEqual, ref _regularConsEqual, blair.RegularConsonantEqual);
                var ignoredMappings = (ListSegmentMappings)blair.IgnoredMappings;
                foreach (Tuple <string, string> mapping in ignoredMappings.Mappings)
                {
                    _ignoredMappings.Mappings.Add(new SegmentMappingViewModel(_projectService.Project.Segmenter, mapping.Item1, mapping.Item2));
                }
                var segmentMappings = (TypeSegmentMappings)blair.SimilarSegments;
                _similarVowels.SegmentMappings     = (UnionSegmentMappings)segmentMappings.VowelMappings;
                _similarConsonants.SegmentMappings = (UnionSegmentMappings)segmentMappings.ConsonantMappings;
            }
            _similarVowels.Setup();
            _similarConsonants.Setup();
        }