Exemple #1
0
		/// <remarks/>
		public ArchivingLocation ToArchivingLocation()
		{
			ArchivingLocation loc = new ArchivingLocation();
			if (Continent != null)
				loc.Continent = Continent.Value;

			if (Country != null)
				loc.Country = Country.Value;

			if (Region.Count > 0)
				loc.Region = Region[0];

			loc.Address = Address;

			return loc;
		}
Exemple #2
0
		public void LocationType_ArchivingLocation_ValidLocationType()
		{
			var locIn = new ArchivingLocation
			{
				Continent = "Asia",
				Country = "China",
				Region = "Great Wall",
				Address = "315 N Main St"
			};

			var locOut = locIn.ToIMDILocationType();

			Assert.AreEqual("Asia", locOut.Continent.Value);
			Assert.AreEqual("China", locOut.Country.Value);
			Assert.AreEqual("Great Wall", locOut.Region[0]);
			Assert.AreEqual("315 N Main St", locOut.Address);
		}
Exemple #3
0
		/// <remarks/>
		public LocationType(ArchivingLocation location) : this()
		{
			if (!string.IsNullOrEmpty(location.Address))
				Address = location.Address;

			if (!string.IsNullOrEmpty(location.Region))
				Region.Add(location.Region);

			if (!string.IsNullOrEmpty(location.Country))
				Country.Value = location.Country;

			if (!string.IsNullOrEmpty(location.Continent))
				Continent.Value = location.Continent;
		}