Skip to content

Commit

Permalink
ICU4N.Support.AnonymousComparer: Deleted because this is the same fun…
Browse files Browse the repository at this point in the history
…ctionality as Compaer<T>.Compare()
  • Loading branch information
NightOwl888 committed Sep 24, 2024
1 parent 15a47d6 commit fee1b3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
20 changes: 0 additions & 20 deletions src/ICU4N/Support/AnonymousComparer.cs

This file was deleted.

4 changes: 2 additions & 2 deletions tests/ICU4N.Tests/Dev/Test/Util/ICUServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ public void TestAPI()
// list the display names in reverse order
{
Logln("display names in reverse order: " +
service.GetDisplayNames(new UCultureInfo("en_US"), new AnonymousComparer<object>(compare: (lhs, rhs) =>
service.GetDisplayNames(new UCultureInfo("en_US"), Comparer<object>.Create(comparison: (lhs, rhs) =>
{
return -StringComparer.OrdinalIgnoreCase.Compare((string)lhs, (string)rhs);
})));
Expand Down Expand Up @@ -888,7 +888,7 @@ public void TestLocale()
// hmmm, the default toString function doesn't print in sorted order for TreeMap
{
var map = service.GetDisplayNames(new UCultureInfo("en_US"),
new AnonymousComparer<object>(compare: (lhs, rhs) =>
Comparer<object>.Create(comparison: (lhs, rhs) =>
{
return -StringComparer.OrdinalIgnoreCase.Compare((string)lhs, (string)rhs);
}),
Expand Down
2 changes: 1 addition & 1 deletion tests/ICU4N.Tests/Dev/Test/Util/ICUServiceThreadTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ public void Test04_WitheringService()
RegisterFactories(service, fc);

IServiceFactory[] factories = (IServiceFactory[])fc.ToArray();
var comp = new AnonymousComparer<object>(compare: (lhs, rhs) =>
var comp = Comparer<object>.Create(comparison: (lhs, rhs) =>
{
return lhs.ToString().CompareToOrdinal(rhs.ToString());
});
Expand Down

0 comments on commit fee1b3a

Please sign in to comment.