示例#1
0
        /// <summary>Copy information from ArchivingLocation object to Location_Type object</summary>
        /// <param name="archivingLocation"></param>
        /// <returns></returns>
        public static LocationType ToIMDILocationType(this ArchivingLocation archivingLocation)
        {
            var returnVal = new LocationType
            {
                Address = archivingLocation.Address
            };

            returnVal.SetContinent(archivingLocation.Continent);
            returnVal.SetCountry(archivingLocation.Country);

            // region is an array
            if (!string.IsNullOrEmpty(archivingLocation.Region))
            {
                returnVal.Region.Add(archivingLocation.Region);
            }

            return(returnVal);
        }