コード例 #1
0
 public async Task Load()
 {
     await Task.WhenAll(IssueLoader.Load(),
                        DecisionsLoader.Load(),
                        EventsLoader.Load(),
                        InventionsLoader.Load(),
                        TechnologiesLoader.Load(),
                        PopLoader.Load(),
                        UnitLoader.Load(),
                        ProvinceLoader.Load(),
                        PopTypeLoader.Load(),
                        DiplomacyLoader.Load(),
                        OobLoader.Load(),
                        WarLoader.Load(),
                        BookmarkLoader.Load(),
                        BuildingLoader.Load(),
                        CbLoader.Load(),
                        CotColorLoader.Load(),
                        NationalFocusLoader.Load(),
                        GraphicalCultureLoader.Load(),
                        IdeologyLoader.Load(),
                        CountryLoader.Load(),
                        CountryColorsLoader.Load(),
                        CrimeLoader.Load(),
                        CultureLoader.Load(),
                        DefinesLoader.Load(),
                        EventModifiersLoader.Load(),
                        GoodsLoader.Load(),
                        GovernmentsLoader.Load(),
                        NationalValueLoader.Load(),
                        OnActionsLoader.Load(),
                        PopTypeLoader.Load(),
                        ProductionTypeLoader.Load(),
                        RebelTypeLoader.Load(),
                        ReligionLoader.Load(),
                        StaticModifiersLoader.Load(),
                        TechSchoolLoader.Load(),
                        TraitsLoader.Load(),
                        TriggeredModifiersLoader.Load(),
                        CountryDirectoryLoader.Load()
                        );
 }
コード例 #2
0
    public void ReversePropsNotNull()
    {
        var country = CountryLoader.LoadAustraliaLocationData();

        foreach (var state in country.States)
        {
            Assert.NotNull(state.Country);
            foreach (var province in state.Provinces)
            {
                Assert.NotNull(province.State);
                foreach (var community in province.Communities)
                {
                    Assert.NotNull(community.Province);
                    foreach (var place in community.Places)
                    {
                        Assert.NotNull(place.Community);
                    }
                }
            }
        }
    }
コード例 #3
0
ファイル: Snippets.cs プロジェクト: littletelx360/CountryData
    public void Normal()
    {
        #region usage

        // All country info. This is only the country metadata
        // and not all locationData.
        var allCountryInfo = CountryLoader.CountryInfo;
        var costaRicaInfo  = allCountryInfo.Single(x => x.Iso == "CR");

        // Loads all location data for a specific country
        var australiaData = CountryLoader.LoadAustraliaLocationData();
        var name          = australiaData.Name;
        var state         = australiaData.States.First();
        var province      = state.Provinces.First();
        var community     = province.Communities.First();
        var place         = community.Places.First();
        var postCode      = place.PostCode;
        var placeName     = place.Name;
        var latitude      = place.Location.Latitude;
        var longitude     = place.Location.Longitude;

        #endregion
    }
コード例 #4
0
 public ICountry Uruguay()
 {
     return(CountryLoader.LoadUruguayLocationData());
 }
コード例 #5
0
 public ICountry Switzerland()
 {
     return(CountryLoader.LoadSwitzerlandLocationData());
 }
コード例 #6
0
    public Task PostCodes()
    {
        var country = CountryLoader.LoadAustraliaLocationData();

        return(Verifier.Verify(country.PostCodes().First()));
    }
コード例 #7
0
 public void LoadAll()
 {
     CountryLoader.LoadAll();
     Assert.NotEmpty(CountryLoader.LoadedLocationData);
 }
コード例 #8
0
 public ICountry Denmark()
 {
     return(CountryLoader.LoadDenmarkLocationData());
 }
コード例 #9
0
        public ActionResult Details(string country)
        {
            var v = new CountryLoader().LoadInfo(country).Result;

            return(View(v));
        }
コード例 #10
0
 public ICountry SouthAfrica()
 {
     return(CountryLoader.LoadSouthAfricaLocationData());
 }
コード例 #11
0
 public ICountry Czechia()
 {
     return(CountryLoader.LoadCzechiaLocationData());
 }
コード例 #12
0
 public ICountry WallisAndFutuna()
 {
     return(CountryLoader.LoadWallisAndFutunaLocationData());
 }
コード例 #13
0
 public ICountry Mayotte()
 {
     return(CountryLoader.LoadMayotteLocationData());
 }
コード例 #14
0
 public ICountry USVirginIslands()
 {
     return(CountryLoader.LoadUSVirginIslandsLocationData());
 }
コード例 #15
0
 public ICountry Belgium()
 {
     return(CountryLoader.LoadBelgiumLocationData());
 }
コード例 #16
0
 public ICountry Vatican()
 {
     return(CountryLoader.LoadVaticanLocationData());
 }
コード例 #17
0
 public ICountry Colombia()
 {
     return(CountryLoader.LoadColombiaLocationData());
 }
コード例 #18
0
 public ICountry Bulgaria()
 {
     return(CountryLoader.LoadBulgariaLocationData());
 }
コード例 #19
0
 public ICountry CostaRica()
 {
     return(CountryLoader.LoadCostaRicaLocationData());
 }
コード例 #20
0
 public ICountry Bermuda()
 {
     return(CountryLoader.LoadBermudaLocationData());
 }
コード例 #21
0
 public ICountry Germany()
 {
     return(CountryLoader.LoadGermanyLocationData());
 }
コード例 #22
0
 public ICountry Brazil()
 {
     return(CountryLoader.LoadBrazilLocationData());
 }
コード例 #23
0
    public Task LoadLocationData()
    {
        var country = CountryLoader.LoadLocationData("PW");

        return(Verify(country));
    }
コード例 #24
0
 public ICountry Andorra()
 {
     return(CountryLoader.LoadAndorraLocationData());
 }
コード例 #25
0
 public ICountry Ukraine()
 {
     return(CountryLoader.LoadUkraineLocationData());
 }
コード例 #26
0
 public ICountry Turkey()
 {
     return(CountryLoader.LoadTurkeyLocationData());
 }
コード例 #27
0
    public Task LoadSpecificLocationData()
    {
        var country = CountryLoader.LoadPalauLocationData();

        return(Verifier.Verify(country));
    }
コード例 #28
0
 public ICountry Canada()
 {
     return(CountryLoader.LoadCanadaLocationData());
 }
コード例 #29
0
 public ICountry Belarus()
 {
     return(CountryLoader.LoadBelarusLocationData());
 }
コード例 #30
0
 public ICountry UnitedStates()
 {
     return(CountryLoader.LoadUnitedStatesLocationData());
 }