//public List<SelectListItem> FirstName { get; set; } = new List<SelectListItem>();
      //public List<SelectListItem> LastName { get; set; } = new List<SelectListItem>();

        public NewJobViewModel()
        {

            JobData jobData = JobData.GetInstance();

            foreach (Employer field in jobData.Employers.ToList())
            {
                Employers.Add(new SelectListItem {
                    Value = field.ID.ToString(),
                    Text = field.Value
                });
            }

            foreach (Location field in jobData.Employers.ToList())
            {
}                Locations.Add(new SelectListItem {
                     Value = field.ID.ToString(),
                     Text = field.Value
               });
            }
示例#2
0
        public LocationModel()
        {
            Locations.Add(new LocationModel
            {
                LocationId       = 1,
                LocationCityName = "London"
            });

            Locations.Add(new LocationModel
            {
                LocationId       = 2,
                LocationCityName = "Edinburgh"
            });

            Locations.Add(new LocationModel
            {
                LocationId       = 3,
                LocationCityName = "Birmingham"
            });
        }
示例#3
0
        public TeleportLocation AddCurrentLocation(string locationName)
        {
            TeleportLocation location = null;

            if (!string.IsNullOrEmpty(locationName))
            {
                location = FindLocation(locationName);

                if (location != null)
                {
                    location.Position = Me.position;
                }
                else
                {
                    Locations.Add(new TeleportLocation(locationName));
                }
            }

            return(location);
        }
示例#4
0
        private void ButtonAddLocation_Click(object sender, RoutedEventArgs e)
        {
            var      dateArrive = ArrivalDateLocation.Date;
            DateTime arriveTime = dateArrive.Value.DateTime;

            var      dateDepart = DepartureDateLocation.Date;
            DateTime departTime = dateDepart.Value.DateTime;

            var loc = new VacationLocation()
            {
                AddedOn = DateTime.Now, CityName = CityNameLoc.Text, CountryName = CountryNameLoc.Text, DateArrival = arriveTime, DateDeparture = departTime
            };

            Locations.Add(loc);
            Locations.OrderBy(l => l.DateArrival);
            LocationListView.DataContext = Locations;

            BtnDeleteLocation.Visibility = Visibility.Visible;
            ResetLocationForm();
        }
示例#5
0
        public NewJobViewModel()
        {
            JobData jobData = JobData.GetInstance();

            foreach (Employer field in jobData.Employers.ToList())
            {
                Employers.Add(new SelectListItem {
                    Value = field.ID.ToString(),
                    Text  = field.Value
                });
            }

            // todo #4 - populate the other List<SelectListItem>
            // collections needed in the view

            foreach (Location field in jobData.Locations.ToList())
            {
                Locations.Add(new SelectListItem
                {
                    Value = field.ID.ToString(),
                    Text  = field.Value
                });
            }

            foreach (CoreCompetency field in jobData.CoreCompetencies.ToList())
            {
                CoreCompetencies.Add(new SelectListItem
                {
                    Value = field.ID.ToString(),
                    Text  = field.Value
                });
            }
            foreach (PositionType field in jobData.PositionTypes.ToList())
            {
                PositionTypes.Add(new SelectListItem
                {
                    Value = field.ID.ToString(),
                    Text  = field.Value
                });
            }
        }
示例#6
0
        public NewJobViewModel()
        {
            JobData jobData = JobData.GetInstance();

            foreach (Employer employer in jobData.Employers.ToList())
            {
                Employers.Add(new SelectListItem {
                    Value = employer.ID.ToString(),
                    Text  = employer.Value
                });
            }

            // TODO #4 - populate the other List<SelectListItem>
            // collections needed in the view
            foreach (Location location in jobData.Locations.ToList())
            {
                Locations.Add(new SelectListItem
                {
                    Value = location.ID.ToString(),
                    Text  = location.Value
                });
            }

            foreach (CoreCompetency coreCompetency in jobData.CoreCompetencies.ToList())
            {
                CoreCompetencies.Add(new SelectListItem
                {
                    Value = coreCompetency.ID.ToString(),
                    Text  = coreCompetency.Value
                });
            }

            foreach (PositionType positionType in jobData.PositionTypes.ToList())
            {
                PositionTypes.Add(new SelectListItem
                {
                    Value = positionType.ID.ToString(),
                    Text  = positionType.Value
                });
            }
        }
示例#7
0
        public NewJobViewModel()
        {

            JobData jobData = JobData.GetInstance();

            foreach (Employer field in jobData.Employers.ToList())
            {
                Employers.Add(new SelectListItem {
                    Value = field.ID.ToString(),
                    Text = field.Value
                });
            }
            foreach (Location field in jobData.Locations.ToList())
            {
                Locations.Add(new SelectListItem
                {
                    Value = field.ID.ToString(),
                    Text = field.Value
                });
            }

            foreach (CoreCompetency field in jobData.CoreCompetencies.ToList())
            {
                CoreCompetencies.Add(new SelectListItem
                {
                    Value = field.ID.ToString(),
                    Text = field.Value
                });
            }

            foreach (PositionType field in jobData.PositionTypes.ToList())
            {
                PositionTypes.Add(new SelectListItem
                {
                    Value = field.ID.ToString(),
                    Text = field.Value
                });
            }
           

        }
示例#8
0
 public Memory()
 {
     Assembler = new Assembler(this);
     CharacterSets.Add(new SimpleUppercaseCharacterSet());
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.ZeroPage, (Address)0));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.ProcessorPort, (Address)1));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.Unused, (Address)2, (Address)6));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.CurrentExpressionType, (Address)13));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.CurrentNumericalExpressionType, (Address)14));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.BasicAreaPointer, (Address)43, (Address)44));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.KeyboardBuffer, (Address)631, (Address)640));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.DefaultSpritePointerArea, (Address)2040, (Address)2047));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.DefaultBasicArea, (Address)2049, (Address)40959));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.BasicRom, (Address)40960, (Address)49151));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.UpperRam, (Address)49152, (Address)53247));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.SpriteLocations, (Address)53248, (Address)53264));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.SpriteEnableRegister, (Address)53269));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.BorderColor, (Address)53280));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.BackgroundColor, (Address)53281));
     Locations.Add(new MemoryModelLocation(MemoryModelLocationName.ColdRestExecutionAddress, (Address)65532, (Address)65533));
 }
示例#9
0
        public void GenerateMountain()
        {
            Task.Run(() =>
            {
                double[,] HeightMap = Mountains.RandomMountainHeightMap(Mountains.AreaSize, Mountains.Height, 5, 1.5);
                for (int X = 0; X < Mountains.AreaSize; X++)
                {
                    for (int Y = 0; Y < Mountains.AreaSize; Y++)
                    {
                        float result = (float)HeightMap[X, Y];
                        Locations.Add(new Vector3(X, Y, (float)result));

                        //for (int i = 0; i < 3; i++)
                        //{
                        //    Locations.Add(new Vector3(X, Y, result - i));
                        //}
                    }
                }
                Console.WriteLine("Mountain Generated");
            });
        }
示例#10
0
        //TODO: [Enhancement] Avoid async void calls!
        private async void LoadMotelsLocations()
        {
            foreach (var item in await _getAllMotels.Invoke())
            {
                var pinItem = new Pin
                {
                    Position = new Position(item.Latitude, item.Longitude),
                    Icon     = BitmapDescriptorFactory.FromBundle(markerIcon),
                    Label    = item.Name,
                    Address  = addressLabel
                };
                //TODO: [Enhancement] Map from Domain to UI Model using AutoMapper
                Locations.Add(new MotelLocation
                {
                    Pin   = pinItem,
                    Motel = item
                });

                Pins.Add(pinItem);
            }
        }
示例#11
0
        private void LoadLocationsFromCsv(string file)
        {
            using (CachedCsvReader csv = new CachedCsvReader(new StreamReader(file), true))
            {
                while (csv.ReadNextRecord())
                {
                    float  fLat   = float.Parse(csv["Lat"]);
                    float  fLong  = float.Parse(csv["Long"]);
                    string name   = csv["Name"];
                    string parent = csv["Group"];

                    Location l = new Location()
                    {
                        Name        = name,
                        ParentName  = parent,
                        Coordinates = new Vector(fLat, fLong)
                    };
                    Locations.Add(l.Name, l);
                }
            }
        }
        /// <summary>
        ///     Deserialize the object
        /// </summary>
        public virtual void DeserializeJson(JToken inputObject)
        {
            if (inputObject != null && inputObject.Type != JTokenType.Null)
            {
                var contactValue = inputObject["contact"];
                if (contactValue != null && contactValue.Type != JTokenType.Null)
                {
                    var contact = new Contact();
                    contact.DeserializeJson(contactValue);
                    Contact = contact;
                }

                var locationsSequence = inputObject["locations"];
                if (locationsSequence != null && locationsSequence.Type != JTokenType.Null)
                {
                    foreach (var locationsValue in (JArray)locationsSequence)
                    {
                        var locationRef = new LocationRef();
                        locationRef.DeserializeJson(locationsValue);
                        Locations.Add(locationRef);
                    }
                }

                var marketingInfoValue = inputObject["marketingInfo"];
                if (marketingInfoValue != null && marketingInfoValue.Type != JTokenType.Null)
                {
                    MarketingInfo = (string)marketingInfoValue;
                }
                var standardCodeValue = inputObject["standardCode"];
                if (standardCodeValue != null && standardCodeValue.Type != JTokenType.Null)
                {
                    StandardCode = (int)standardCodeValue;
                }
                var standardInfoUrlValue = inputObject["standardInfoUrl"];
                if (standardInfoUrlValue != null && standardInfoUrlValue.Type != JTokenType.Null)
                {
                    StandardInfoUrl = (string)standardInfoUrlValue;
                }
            }
        }
        public void GivenICanChooseFromTheseSites(Table table)
        {
            OrmCall((IDbConnection db) =>
            {
                var locationTypeId = Guid.NewGuid();
                db.Save(new Lookup {
                    Id = locationTypeId, Value = ""
                });

                foreach (var row in table.Rows)
                {
                    var location = new Location
                    {
                        LocationName   = row["Site Name"],
                        Id             = Guid.NewGuid(),
                        LocationTypeId = locationTypeId
                    };
                    db.Save(location);
                    Locations.Add(location.LocationName.Trim(), location.Id);
                }
            });
        }
        private void Completed()
        {
            IsBusy = false;
            foreach (var item in Motels)
            {
                var pinItem = new Pin
                {
                    Position = new Position(item.Latitude, item.Longitude),
                    Icon     = BitmapDescriptorFactory.FromBundle(markerIcon),
                    Label    = item.Name,
                    Address  = addressLabel
                };
                //TODO: [Enhancement] Map from Domain to UI Model using AutoMapper
                Locations.Add(new MotelLocation
                {
                    Pin   = pinItem,
                    Motel = item
                });

                Pins.Add(pinItem);
            }
        }
示例#15
0
        private void ReceiveLocations(IEnumerable <WhereOnEarthLocation> locs, TwitterResponse resp)
        {
            if (resp.StatusCode == HttpStatusCode.OK && locs != null && locs.Any())
            {
                Deployment.Current.Dispatcher.InvokeIfRequired(() =>
                {
                    foreach (var loc in locs.OrderBy(x => x.Name))
                    {
                        if (!Locations.Contains(loc.Name))
                        {
                            Locations.Add(loc.Name);
                        }

                        if (!LocationMap.ContainsKey(loc.Name))
                        {
                            LocationMap.Add(loc.Name, loc.WoeId);
                        }
                    }
                    showLocations.RaiseCanExecuteChanged();
                });
            }
        }
 /// <summary>
 /// Loads possible lunch locations based on the user's current location.
 /// </summary>
 private async Task Initialize()
 {
     await DispatchHelper.RunAsync(async() =>
     {
         var restaurants = new List <Location>
         {
             new Location
             {
                 Name     = "Custom",
                 ImageUrl = @"ms-appx:///Assets/Plus.png"
             }
         };
         if (await Geolocator.RequestAccessAsync() == GeolocationAccessStatus.Allowed)
         {
             var location = await new Geolocator().GetGeopositionAsync();
             var nearby   = await App.Api.GetAsync <IEnumerable <Location> >("Locations",
                                                                             new { location.Coordinate.Point.Position.Longitude, location.Coordinate.Point.Position.Latitude });
             restaurants.AddRange(nearby);
         }
         restaurants.ForEach(x => Locations.Add(x));
     });
 }
示例#17
0
        protected void btnAddLocation_Click(object sender, EventArgs e)
        {
            // Add the location (ignore if they didn't pick one, or they picked one that already is selected)
            var location = new LocationService(new RockContext()).Get(locationPicker.SelectedValue.AsInteger());

            if (location != null)
            {
                string path           = location.Name;
                var    parentLocation = location.ParentLocation;
                while (parentLocation != null)
                {
                    path           = parentLocation.Name + " > " + path;
                    parentLocation = parentLocation.ParentLocation;
                }
                Locations.Add(location.Id, path);
            }

            BindLocations();

            hfAddLocationId.Value = string.Empty;
            mdLocationPicker.Hide();
        }
示例#18
0
        private void RegisterPart(BugPart part, Connection parentConnection, int parentID)
        {
            if (GetBugPart(parentID) == null)
            {
                throw new Exception("NULL");
            }
            if (part.SetConnection(parentConnection, GetBugPart(parentID) as IConnectable, ((MonoBehaviour)GetBugPart(parentID)).gameObject, this))
            {
                Locations.Add(part.transform.position);
                mBugParts.Add(part);

                if (part is IConnectable)
                {
                    mConnectables.Add(part as IConnectable);
                }

                if (mFuctionParts.ContainsKey(part.GetType()))
                {
                    mFuctionParts[part.GetType()].Add(part);
                }
            }
        }
        public async Task InitializeAsync(Dictionary <string, string> args)
        {
            if (args != null && args.ContainsKey(Constants.Parameters.Location))
            {
                string      setLocation = args[Constants.Parameters.Location];
                GeoLocation location    = JsonConvert.DeserializeObject <GeoLocation>(setLocation);
                if (location != null)
                {
                    MapCenter = location;
                    Locations.Add(location);
                }
                else
                {
                    await RequestCurrentLocationAsync();
                }
            }
            else
            {
                if (args != null && args.ContainsKey(Constants.Parameters.LocationSearch))
                {
                    SearchLocationText = args[Constants.Parameters.LocationSearch];
                    await SearchLocationAsync();

                    if (Locations.Count == 0)
                    {
                        await RequestCurrentLocationAsync();
                    }
                }
                else
                {
                    await RequestCurrentLocationAsync();
                }
            }

            if (args != null && args.ContainsKey(Constants.Parameters.MessageId))
            {
                _sourceId = args[Constants.Parameters.MessageId];
            }
        }
示例#20
0
        public TestDungeon()
        {
            //declare NPCs
            var bob = new NPC("Bob")
            {
                Description = "a burly man in his mid 40s. He is smiling at you as if expecting you to say something."
            };

            //declare Items
            var sword = new Weapon("Rusty Sword")
            {
                Description = "a short sword with rust spotting the blade."
            };

            //declare rooms
            var theChamber = new Location("The Chamber")
            {
                Description = "a dark dank chamber full of soft whispering voices... there is a small ornate door in the north wall.",
            };

            bob.Location = theChamber;
            theChamber.Actors.Add(bob);
            sword.Location = theChamber;
            theChamber.Items.Add(sword);

            var theAntechamber = new Location("The Antechamber")
            {
                Description = "a small, brightly lit room with a small ornate door leading to the south."
            };

            theChamber.ExitNorth     = theAntechamber;
            theAntechamber.ExitSouth = theChamber;

            Locations.Add(theChamber);
            Locations.Add(theAntechamber);

            StartingLocation = theChamber;
        }
示例#21
0
        public void AddLocationAndUpdateIndex(Location value)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            Locations.Add(value);

            if (_locationsIdIndex.IsValueCreated)
            {
                _locationsIdIndex.Value.Add(value.LocationId, value);
            }

            if (_locationsValueIndex.IsValueCreated)
            {
                var key = GetLocationByValueKey(value);
                if (!_locationsValueIndex.Value.ContainsKey(key))
                {
                    _locationsValueIndex.Value.Add(key, value);
                }
            }

            if (_locationsBibleChapterIndex.IsValueCreated &&
                value.BookNumber != null &&
                value.ChapterNumber != null)
            {
                var key = GetLocationByBibleChapterKey(
                    value.BookNumber.Value,
                    value.ChapterNumber.Value,
                    value.KeySymbol);

                if (!_locationsBibleChapterIndex.Value.ContainsKey(key))
                {
                    _locationsBibleChapterIndex.Value.Add(key, value);
                }
            }
        }
示例#22
0
        private async void GetLocations()
        {
            if (!string.IsNullOrWhiteSpace(query))
            {
                var locations = await Autocomplete.GetLocations(Query);

                Locations.Clear();
                foreach (var location in locations)
                {
                    Locations.Add(location);
                }

                if (Locations.Count > 0)
                {
                    IsResultsVisible = true;
                }
            }
            else
            {
                Locations.Clear();
                IsResultsVisible = false;
            }
        }
示例#23
0
            public virtual void ReadChildData(BinaryReader reader)
            {
                int x = 0;

                for (x = 0; (x < _locations.Count); x = (x + 1))
                {
                    Locations.Add(new EffectLocationsBlock());
                    Locations[x].Read(reader);
                }
                for (x = 0; (x < _locations.Count); x = (x + 1))
                {
                    Locations[x].ReadChildData(reader);
                }
                for (x = 0; (x < _events.Count); x = (x + 1))
                {
                    Events.Add(new EffectEventBlock());
                    Events[x].Read(reader);
                }
                for (x = 0; (x < _events.Count); x = (x + 1))
                {
                    Events[x].ReadChildData(reader);
                }
            }
示例#24
0
        public async Task <IActionResult> OnGet()
        {
            var client = clientFactory.CreateClient("MarinaApi");

            try
            {
                var slips = await client.GetFromJsonAsync <List <Slip> >("slip");

                Slips.AddRange(slips);

                var dockNames = new List <string>();
                var locName   = new List <string>();

                foreach (var slip in slips)
                {
                    var dock = slip.Dock;
                    var loc  = slip.Dock.Location;

                    if (!dockNames.Contains(dock.Name))
                    {
                        Docks.Add(slip.Dock);
                        dockNames.Add(dock.Name);
                    }

                    if (!locName.Contains(loc.Name))
                    {
                        Locations.Add(slip.Dock.Location);
                        locName.Add(loc.Name);
                    }
                }
                return(Page());
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
示例#25
0
        public SarifErrorListItem(Run run, Notification notification, string logFilePath, ProjectNameCache projectNameCache) : this()
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            _runId = CodeAnalysisResultManager.Instance.CurrentRunId;
            ReportingDescriptor rule;
            string ruleId = null;

            if (notification.AssociatedRule != null)
            {
                ruleId = notification.AssociatedRule.Id;
            }
            else if (notification.Descriptor != null)
            {
                ruleId = notification.Descriptor.Id;
            }

            run.TryGetRule(ruleId, out rule);
            Message      = notification.Message.Text.Trim();
            ShortMessage = ExtensionMethods.GetFirstSentence(notification.Message.Text);
            if (!Message.EndsWith("."))
            {
                ShortMessage = ShortMessage.TrimEnd('.');
            }
            Level       = notification.Level;
            LogFilePath = logFilePath;
            FileName    = SdkUIUtilities.GetFileLocationPath(notification.Locations?[0]?.PhysicalLocation?.ArtifactLocation, _runId) ?? "";
            ProjectName = projectNameCache.GetName(FileName);
            Locations.Add(new LocationModel()
            {
                FilePath = FileName
            });

            Tool             = run.Tool.ToToolModel();
            Rule             = rule.ToRuleModel(ruleId);
            Invocation       = run.Invocations?[0]?.ToInvocationModel();
            WorkingDirectory = Path.Combine(Path.GetTempPath(), _runId.ToString());
        }
示例#26
0
        /// <summary>
        /// Store the selected location to the collection of locations.
        /// Do not store if the name and the position < 3 km of a location already present
        /// </summary>
        public void StoreLocation()
        {
            if (this.Location == _ConstUnknownLocation)
            {
                return;
            }
            if (GeoPosition == null)
            {
                return;
            }

            foreach (vmLocation Location in Locations)
            {
                if (Location.Name == this.Location)
                {
                    double Distance = (CalculateDistance(Location.Latitude,
                                                         Location.Longitude,
                                                         GeoPosition.Coordinate.Point.Position.Latitude,
                                                         GeoPosition.Coordinate.Point.Position.Longitude));

                    if (Distance < 2000) //A location with the samen name within two kilometers is considered the same
                    {
                        return;
                    }
                }
            }

            vmLocation newLocation = new vmLocation();

            newLocation.Name      = this.Location;
            newLocation.Latitude  = GeoPosition.Coordinate.Point.Position.Latitude;
            newLocation.Longitude = GeoPosition.Coordinate.Point.Position.Longitude;
            newLocation.SetNameAndLocation(GeoPosition);
            Locations.Add(newLocation);

            UpdateNearbyLocations();
        }
示例#27
0
        private void InitialiseLocations()
        {
            int locationId = 0;

            Location tokyo = new Location(locationId++, "Tokyo",
                                          Properties.Resources.tokyo);

            Locations.Add(tokyo);
            Location sydney = new Location(locationId++, "Sydney",
                                           Properties.Resources.sydney);

            Locations.Add(sydney);
            Location sanFrancisco = new Location(locationId++, "San Francisco",
                                                 Properties.Resources.sanFrancisco);

            Locations.Add(sanFrancisco);
            Location london = new Location(locationId++, "London",
                                           Properties.Resources.london);

            Locations.Add(london);
            Location newYork = new Location(locationId++, "New York",
                                            Properties.Resources.newYork);

            Locations.Add(newYork);
            Location shanghai = new Location(locationId++, "Shanghai",
                                             Properties.Resources.shanghai);

            Locations.Add(shanghai);

            foreach (Location loc in Locations)
            {
                foreach (Coin c in coins)
                {
                    loc.Coins.Add(new Coin(c.Id, c.Name, c.Price, c.Icon));
                }
            }
        }
示例#28
0
        private async void Init()
        {
            var serviceName = LocationSharingService.GetImplementationName();

            Message = serviceName;


            Locations.Add(new Location(-37.1, 145.1)
            {
                Name = "Blazor"
            });
            await Task.Delay(2000);

            Locations.Add(new Location(-37.2, 145.2)
            {
                Name = "Blazor2"
            });
            await Task.Delay(2000);

            Locations.Add(new Location(-37.3, 145.3)
            {
                Name = "Blazor3"
            });
        }
        public async void LoadClientes()
        {
            try
            {
                var clientes = await apiService.GetAllClients();

                Locations.Clear();
                ListLocation.Clear();
                clientes.Count();
                if (clientes != null && clientes.Count > 0)
                {
                    foreach (var cliente in clientes)
                    {
                        var Pincliente = new TKCustomMapPin
                        {
                            Image    = "pin.png",
                            Position = new Xamarin.Forms.Maps.Position(cliente.Lat, cliente.Lon),
                            Title    = cliente.Nombre,
                            Subtitle = "Dirección: " + cliente.Direccion,

                            ShowCallout = true,
                        };
                        var itemcliente = new ListRequest
                        {
                            Titulo    = cliente.Nombre,
                            Subtitulo = cliente.PersonaContacto + " " + cliente.Telefono,
                        };
                        Locations.Add(Pincliente);
                        ListLocation.Add(itemcliente);
                    }
                }
            }
            catch
            {
            }
        }
示例#30
0
        public Locations GetLocations()
        {
            var locations = new Locations();

            foreach (var city in Cities)
            {
                var location = new Location();
                location.City = city.Name;

                foreach (var area in city.Areas)
                {
                    location.Area = area.Name;

                    foreach (var village in area.Villages)
                    {
                        location.Village = village.Name;
                    }
                }

                locations.Add(location);
            }

            return(locations);
        }