Exemplo n.º 1
0
 /// <summary>
 /// Return a list of information used to construct a UI list of locale names.
 /// </summary>
 /// <param name="cultures">A list of locales to present in a UI list. The casing uses the settings in the <see cref="CultureDisplayNames"/> instance.</param>
 /// <param name="inSelf">
 /// If <c>true</c>, compares the <see cref="UiListItem.NameInSelf"/>, otherwise the <see cref="UiListItem.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="CultureNotFoundException">If any of the locales in <paramref name="cultures"/> are malformed.</exception>
 /// <draft>ICU 60</draft>
 public virtual IList <UiListItem> GetUiList(ICollection <UCultureInfo> cultures, bool inSelf, CompareInfo collator) // ICU4N specific overload, since CompareInfo doesn't implement IComparer<string>
 {
     return(GetUiListCompareWholeItems(cultures, UiListItem.GetComparer(collator, inSelf)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Return a list of information used to construct a UI list of locale names.
 /// </summary>
 /// <param name="cultures">A list of locales to present in a UI list. The casing uses the settings in the <see cref="CultureDisplayNames"/> instance.</param>
 /// <param name="inSelf">
 /// If <c>true</c>, compares the <see cref="UiListItem.NameInSelf"/>, otherwise the <see cref="UiListItem.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="CultureNotFoundException">If any of the locales in <paramref name="cultures"/> are malformed.</exception>
 /// <draft>ICU 60</draft>
 public virtual IList <UiListItem> GetUiList(ICollection <UCultureInfo> cultures, bool inSelf, IComparer <string> collator) // ICU4N specific - changed from IComparer<object> to IComparer<string>
 {
     return(GetUiListCompareWholeItems(cultures, UiListItem.GetComparer(collator, inSelf)));
 }