示例#1
0
 /// <summary>
 /// Return a list of information used to construct a UI list of locale names.
 /// </summary>
 /// <param name="localeSet">A list of locales to present in a UI list. The casing uses the settings in the <see cref="LocaleDisplayNames"/> instance.</param>
 /// <param name="inSelf">
 /// If true, compares the nameInSelf, otherwise the nameInDisplayLocale.
 /// Set depending on which field (displayLocale vs self) is to show up in the UI.
 /// If both are to show up in the UI, then it should be the one used for the primary sort order.
 /// </param>
 /// <param name="collator">How to collate—should normally be <c>Collator.GetInstance(GetDisplayLocale())</c>.</param>
 /// <returns>An ordered list of <see cref="UiListItem"/>s.</returns>
 /// <exception cref="IllformedLocaleException">If any of the locales in localeSet are malformed.</exception>
 /// <draft>ICU4N 60</draft>
 public virtual IList <UiListItem> GetUiList(ISet <ULocale> localeSet, bool inSelf, CompareInfo collator) // ICU4N specific overload, since CompareInfo doesn't implement IComparer<string>
 {
     return(GetUiListCompareWholeItems(localeSet, UiListItem.GetComparer(collator, inSelf)));
 }
示例#2
0
 /// <summary>
 /// Return a list of information used to construct a UI list of locale names.
 /// </summary>
 /// <param name="localeSet">A list of locales to present in a UI list. The casing uses the settings in the <see cref="LocaleDisplayNames"/> instance.</param>
 /// <param name="inSelf">
 /// If true, compares the nameInSelf, otherwise the nameInDisplayLocale.
 /// Set depending on which field (displayLocale vs self) is to show up in the UI.
 /// If both are to show up in the UI, then it should be the one used for the primary sort order.
 /// </param>
 /// <param name="collator">How to collate—should normally be <c>Collator.GetInstance(GetDisplayLocale())</c>.</param>
 /// <returns>An ordered list of <see cref="UiListItem"/>s.</returns>
 /// <exception cref="IllformedLocaleException">If any of the locales in localeSet are malformed.</exception>
 /// <stable>ICU 55</stable>
 public virtual IList <UiListItem> GetUiList(ISet <ULocale> localeSet, bool inSelf, IComparer <string> collator) // ICU4N specific - changed from IComparer<object> to IComparer<string>
 {
     return(GetUiListCompareWholeItems(localeSet, UiListItem.GetComparer(collator, inSelf)));
 }