/// <summary>Converts a LanguageString into a Description_Type</summary> /// <param name="langString"></param> /// <returns></returns> public static DescriptionType ToIMDIDescriptionType(this LanguageString langString) { var desc = new DescriptionType { Value = langString.Value }; if (!string.IsNullOrEmpty(langString.Iso3LanguageId)) desc.LanguageId = LanguageList.FindByISO3Code(langString.Iso3LanguageId).Id; return desc; }
/// <summary>Converts a LanguageString into a Description_Type</summary> /// <param name="langString"></param> /// <returns></returns> public static DescriptionType ToIMDIDescriptionType(this LanguageString langString) { var desc = new DescriptionType { Value = langString.Value }; if (!string.IsNullOrEmpty(langString.Iso3LanguageId)) { desc.LanguageId = LanguageList.FindByISO3Code(langString.Iso3LanguageId).Id; } return(desc); }
/// <summary>Compare 2 LanguageString objects. They are identical if they have the same Iso3LanguageId</summary> public int CompareTo(object obj) { if (obj == null) { return(1); } DescriptionType other = obj as DescriptionType; if (other == null) { throw new ArgumentException(); } return(String.Compare(LanguageId, other.LanguageId, StringComparison.Ordinal)); }
/// <summary>Compare 2 LanguageString objects. They are identical if they have the same Iso3LanguageId</summary> public static int Compare(DescriptionType langStrA, DescriptionType langStrB) { return(langStrA.CompareTo(langStrB)); }