Skip to content

Commit

Permalink
Add some XML doc for new extension method.
Browse files Browse the repository at this point in the history
  • Loading branch information
bchavez committed Mar 3, 2018
1 parent 7fdef1f commit 0c3047d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## v22.0.4
## v22.0.5
* Bogus now throws exceptions for locales it doesn't recognize. Improves developer experience.
* New extension method `.ToBogusLocale()` on `System.Globalization.CultureInfo` to help translate from **.NET** locale codes to **Bogus** locale codes.

Expand Down
5 changes: 4 additions & 1 deletion Source/Bogus/Extensions/ExtensionsForCultureInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Bogus.Extensions
{
/// <summary>
/// Helper extension that maps .NET <seealso cref="CultureInfo"/> to Bogus locale codes like 'en_US`.
/// Extension methods over <seealso cref="CultureInfo"/>.
/// </summary>
public static class ExtensionsForCultureInfo
{
Expand All @@ -19,6 +19,9 @@ public static class ExtensionsForCultureInfo
{"nn", "nb_NO"}
};

/// <summary>
/// Helper extension that maps .NET <seealso cref="CultureInfo"/> to Bogus locale codes like 'en_US`.
/// </summary>
public static string ToBogusLocale(this CultureInfo ci)
{
/*
Expand Down

0 comments on commit 0c3047d

Please sign in to comment.