Beispiel #1
0
        public Title Add(
            Governorship governorship,
            Country country,
            Imperator.Characters.CharacterCollection imperatorCharacters,
            bool regionHasMultipleGovernorships,
            LocDB locDB,
            ProvinceMapper provinceMapper,
            CoaMapper coaMapper,
            TagTitleMapper tagTitleMapper,
            DefiniteFormMapper definiteFormMapper,
            ImperatorRegionMapper imperatorRegionMapper
            )
        {
            var newTitle = new Title(this,
                                     governorship,
                                     country,
                                     imperatorCharacters,
                                     regionHasMultipleGovernorships,
                                     locDB,
                                     provinceMapper,
                                     coaMapper,
                                     tagTitleMapper,
                                     definiteFormMapper,
                                     imperatorRegionMapper
                                     );

            dict[newTitle.Id] = newTitle;
            return(newTitle);
        }
Beispiel #2
0
 private Title(
     LandedTitles parentCollection,
     Governorship governorship,
     Country country,
     Imperator.Characters.CharacterCollection imperatorCharacters,
     bool regionHasMultipleGovernorships,
     LocDB locDB,
     ProvinceMapper provinceMapper,
     CoaMapper coaMapper,
     TagTitleMapper tagTitleMapper,
     DefiniteFormMapper definiteFormMapper,
     ImperatorRegionMapper imperatorRegionMapper
     )
 {
     this.parentCollection = parentCollection;
     Id = DetermineName(governorship, country, tagTitleMapper);
     SetRank();
     InitializeFromGovernorship(
         governorship,
         country,
         imperatorCharacters,
         regionHasMultipleGovernorships,
         locDB,
         provinceMapper,
         definiteFormMapper,
         imperatorRegionMapper
         );
 }
Beispiel #3
0
        private void ImportImperatorGovernorship(
            Governorship governorship,
            CountryCollection imperatorCountries,
            Imperator.Characters.CharacterCollection imperatorCharacters,
            bool regionHasMultipleGovernorships,
            TagTitleMapper tagTitleMapper,
            LocDB locDB,
            ProvinceMapper provinceMapper,
            DefiniteFormMapper definiteFormMapper,
            ImperatorRegionMapper imperatorRegionMapper,
            CoaMapper coaMapper)
        {
            var country = imperatorCountries[governorship.CountryId];
            // Create a new title or update existing title
            var name = DetermineName(governorship, country, tagTitleMapper);

            if (TryGetValue(name, out var existingTitle))
            {
                existingTitle.InitializeFromGovernorship(
                    governorship,
                    country,
                    imperatorCharacters,
                    regionHasMultipleGovernorships,
                    locDB,
                    provinceMapper,
                    definiteFormMapper,
                    imperatorRegionMapper
                    );
            }
            else
            {
                Add(
                    governorship,
                    country,
                    imperatorCharacters,
                    regionHasMultipleGovernorships,
                    locDB,
                    provinceMapper,
                    coaMapper,
                    tagTitleMapper,
                    definiteFormMapper,
                    imperatorRegionMapper
                    );
            }
        }