diff --git a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt index 4682973c1..e9fe4ecc5 100644 --- a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt +++ b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt @@ -67,6 +67,7 @@ public class Configurator { public Humanizer.DateTimeHumanizeStrategy.IDateTimeHumanizeStrategy DateTimeHumanizeStrategy { get; set; } public Humanizer.Localisation.Formatters.IFormatter Formatter { get; } + public System.Collections.Generic.IDictionary> FormatterFactories { get; } } public class DateHumanizeExtensions diff --git a/src/Humanizer/Configuration/Configurator.cs b/src/Humanizer/Configuration/Configurator.cs index b5d013de2..096cfc2e8 100644 --- a/src/Humanizer/Configuration/Configurator.cs +++ b/src/Humanizer/Configuration/Configurator.cs @@ -11,7 +11,7 @@ namespace Humanizer.Configuration /// public static class Configurator { - private static readonly IDictionary> FormatterFactories = + private static readonly IDictionary> _formatterFactories = new Dictionary>(StringComparer.OrdinalIgnoreCase) { { "ro", () => new RomanianFormatter() }, @@ -23,6 +23,11 @@ public static class Configurator { "pl", () => new CzechSlovakPolishFormatter() } }; + public static IDictionary> FormatterFactories + { + get { return _formatterFactories; } + } + private static IDateTimeHumanizeStrategy _dateTimeHumanizeStrategy = new DefaultDateTimeHumanizeStrategy(); ///