/// <summary> /// Composes the specified <see cref="Postalcode"/> into a string. /// </summary> /// <param name="value">The <see cref="Postalcode"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="Postalcode"/>.</returns> public override string Compose(Postalcode value) { return(string.Join(FieldSeparator.ToString(), value.CountryCode, value.PostalCode, value.PlaceName, value.AdminName[0], value.AdminCode[0], value.AdminName[1], value.AdminCode[1], value.AdminName[2], value.AdminCode[2], DoubleToString(value.Latitude), DoubleToString(value.Longitude), value.Accuracy )); }
/// <summary> /// Composes the specified <see cref="ExtendedGeoName"/> into a string. /// </summary> /// <param name="value">The <see cref="ExtendedGeoName"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="ExtendedGeoName"/>.</returns> public override string Compose(ExtendedGeoName value) { return(string.Join(FieldSeparator.ToString(), value.Id, value.Name, value.NameASCII, ArrayToValue(value.AlternateNames), value.Latitude.ToString(CultureInfo.InvariantCulture), value.Longitude.ToString(CultureInfo.InvariantCulture), value.FeatureClass, value.FeatureCode, value.CountryCode, ArrayToValue(value.AlternateCountryCodes), GetArrayValue(value.Admincodes, 0), GetArrayValue(value.Admincodes, 1), GetArrayValue(value.Admincodes, 2), GetArrayValue(value.Admincodes, 3), value.Population, value.Elevation, value.Dem, TimeZoneToString(value.Timezone), DateTimeToString(value.ModificationDate))); }
/// <summary> /// Composes the specified <see cref="ExtendedGeoName"/> into a string. /// </summary> /// <param name="value">The <see cref="ExtendedGeoName"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="ExtendedGeoName"/>.</returns> public override string Compose(ExtendedGeoName value) { return(string.Join(FieldSeparator.ToString(), value.Id, value.Name, value.NameASCII, ArrayToValue(value.AlternateNames), value.Latitude.ToString(CultureInfo.InvariantCulture), value.Longitude.ToString(CultureInfo.InvariantCulture), value.FeatureClass, value.FeatureCode, value.CountryCode, ArrayToValue(value.AlternateCountryCodes), value.Admincodes[0], value.Admincodes[1], value.Admincodes[2], value.Admincodes[3], value.Population, value.Elevation, value.Dem, value.Timezone.Replace(" ", "_"), value.ModificationDate.ToString("yyyy-MM-dd"))); }
/// <summary> /// Composes the specified <see cref="GeoName"/> into a string. /// </summary> /// <param name="value">The <see cref="GeoName"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="GeoName"/>.</returns> public override string Compose(GeoName value) { if (UseExtendedFileFormat) { return(string.Join(FieldSeparator.ToString(), value.Id, value.Name, null, null, DoubleToString(value.Latitude), DoubleToString(value.Longitude), null, null, null, null, null, null, null, null, null, null, null, null, null)); } else { return(string.Join(FieldSeparator.ToString(), value.Id, value.Name, DoubleToString(value.Latitude), DoubleToString(value.Longitude))); } }
/// <summary> /// Composes the specified <see cref="TimeZone"/> into a string. /// </summary> /// <param name="value">The <see cref="TimeZone"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="TimeZone"/>.</returns> public override string Compose(TimeZone value) { return(string.Join(FieldSeparator.ToString(), value.CountryCode, value.TimeZoneId.Replace(" ", "_"), FloatToString(value.GMTOffset), FloatToString(value.DSTOffset), FloatToString(value.RawOffset))); }
/// <summary> /// Composes the specified <see cref="CountryInfo"/> into a string. /// </summary> /// <param name="value">The <see cref="CountryInfo"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="CountryInfo"/>.</returns> public override string Compose(CountryInfo value) { return(string.Join(FieldSeparator.ToString(), value.ISO_Alpha2, value.ISO_Alpha3, value.ISO_Numeric, value.FIPS, value.Country, value.Capital, value.Area, value.Population, value.Continent, value.Tld, value.CurrencyCode, value.CurrencyName, value.Phone, value.PostalCodeFormat, value.PostalCodeRegex, ArrayToValue(value.Languages), value.GeoNameId, ArrayToValue(value.Neighbours), value.EquivalentFipsCode)); }
/// <summary> /// Composes the specified <see cref="AlternateName"/> into a string. /// </summary> /// <param name="value">The <see cref="AlternateName"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="AlternateName"/>.</returns> public override string Compose(AlternateName value) { return(string.Join(FieldSeparator.ToString(), value.Id, value.GeoNameId, string.IsNullOrEmpty(value.Type) ? value.ISOLanguage : value.Type, value.Name, Bool2String(value.IsPreferredName), Bool2String(value.IsShortName), Bool2String(value.IsColloquial), Bool2String(value.IsHistoric))); }
/// <summary> /// Composes the specified <see cref="FeatureClass"/> into a string. /// </summary> /// <param name="value">The <see cref="FeatureClass"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="FeatureClass"/>.</returns> public override string Compose(FeatureClass value) { return(string.Join(FieldSeparator.ToString(), value.Class, value.Description)); }
public override string Compose(CustomEntity value) { return(string.Join(FieldSeparator.ToString(), value.Data)); }
/// <summary> /// Composes the specified <see cref="UserTag"/> into a string. /// </summary> /// <param name="value">The <see cref="UserTag"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="UserTag"/>.</returns> public override string Compose(UserTag value) { return(string.Join(FieldSeparator.ToString(), value.GeoNameId, value.Tag)); }
/// <summary> /// Composes the specified <see cref="FeatureCode"/> into a string. /// </summary> /// <param name="value">The <see cref="FeatureCode"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="FeatureCode"/>.</returns> public override string Compose(FeatureCode value) { return(string.Join(FieldSeparator.ToString(), GetFeatureCodeString(value), value.Name, value.Description)); }
/// <summary> /// Composes the specified <see cref="Continent"/> into a string. /// </summary> /// <param name="value">The <see cref="Continent"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="Continent"/>.</returns> public override string Compose(Continent value) { return(string.Join(FieldSeparator.ToString(), value.Code, value.Name, value.GeoNameId)); }
/// <summary> /// Composes the specified <see cref="HierarchyNode"/> into a string. /// </summary> /// <param name="value">The <see cref="HierarchyNode"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="HierarchyNode"/>.</returns> public override string Compose(HierarchyNode value) { return(string.Join(FieldSeparator.ToString(), value.ParentId, value.ChildId, value.Type)); }
/// <summary> /// Composes the specified <see cref="Admin1Code"/> into a string. /// </summary> /// <param name="value">The <see cref="Admin1Code"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="Admin1Code"/>.</returns> public override string Compose(Admin1Code value) { return(string.Join(FieldSeparator.ToString(), value.Code, value.Name, value.NameASCII, value.GeoNameId)); }
/// <summary> /// Composes the specified <see cref="ISOLanguageCode"/> into a string. /// </summary> /// <param name="value">The <see cref="ISOLanguageCode"/> to be composed into a string.</param> /// <returns>A string representing the specified <see cref="ISOLanguageCode"/>.</returns> public override string Compose(ISOLanguageCode value) { return(string.Join(FieldSeparator.ToString(), value.ISO_639_3, value.ISO_639_2, value.ISO_639_1, value.LanguageName)); }