Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove some redundant internal #1370

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Humanizer.Tests.Shared/InflectorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void Kebaberize(string input, string expectedOutput) =>
Assert.Equal(expectedOutput, input.Kebaberize());
}

internal class PluralTestSource : IEnumerable<object[]>
class PluralTestSource : IEnumerable<object[]>
{
public IEnumerator<object[]> GetEnumerator()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Configuration/CollectionFormatterRegistry.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class CollectionFormatterRegistry : LocaliserRegistry<ICollectionFormatter>
class CollectionFormatterRegistry : LocaliserRegistry<ICollectionFormatter>
{
public CollectionFormatterRegistry()
: base(new DefaultCollectionFormatter("&"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if NET6_0_OR_GREATER
namespace Humanizer
{
internal class DateOnlyToOrdinalWordsConverterRegistry : LocaliserRegistry<IDateOnlyToOrdinalWordConverter>
class DateOnlyToOrdinalWordsConverterRegistry : LocaliserRegistry<IDateOnlyToOrdinalWordConverter>
{
public DateOnlyToOrdinalWordsConverterRegistry() : base(new DefaultDateOnlyToOrdinalWordConverter())
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class DateToOrdinalWordsConverterRegistry : LocaliserRegistry<IDateToOrdinalWordConverter>
class DateToOrdinalWordsConverterRegistry : LocaliserRegistry<IDateToOrdinalWordConverter>
{
public DateToOrdinalWordsConverterRegistry() : base(new DefaultDateToOrdinalWordConverter())
{
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Configuration/FormatterRegistry.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class FormatterRegistry : LocaliserRegistry<IFormatter>
class FormatterRegistry : LocaliserRegistry<IFormatter>
{
public FormatterRegistry() : base(new DefaultFormatter("en-US"))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class NumberToWordsConverterRegistry : LocaliserRegistry<INumberToWordsConverter>
class NumberToWordsConverterRegistry : LocaliserRegistry<INumberToWordsConverter>
{
public NumberToWordsConverterRegistry()
: base((culture) => new EnglishNumberToWordsConverter())
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Configuration/OrdinalizerRegistry.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class OrdinalizerRegistry : LocaliserRegistry<IOrdinalizer>
class OrdinalizerRegistry : LocaliserRegistry<IOrdinalizer>
{
public OrdinalizerRegistry() : base(new DefaultOrdinalizer())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Humanizer
{
internal class TimeOnlyToClockNotationConvertersRegistry : LocaliserRegistry<ITimeOnlyToClockNotationConverter>
class TimeOnlyToClockNotationConvertersRegistry : LocaliserRegistry<ITimeOnlyToClockNotationConverter>
{
public TimeOnlyToClockNotationConvertersRegistry() : base(new DefaultTimeOnlyToClockNotationConverter())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// <summary>
/// Algorithms used to convert distance between two dates into words.
/// </summary>
internal static class DateTimeHumanizeAlgorithms
static class DateTimeHumanizeAlgorithms
{
/// <summary>
/// Returns localized &amp; humanized distance of time between two dates; given a specific precision.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class DefaultCollectionFormatter : ICollectionFormatter
class DefaultCollectionFormatter : ICollectionFormatter
{
protected string DefaultSeparator = "";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class OxfordStyleCollectionFormatter(string defaultSeparator) :
class OxfordStyleCollectionFormatter(string defaultSeparator) :
DefaultCollectionFormatter(defaultSeparator ?? "and")
{
protected override string GetConjunctionFormatString(int itemCount) => itemCount > 2 ? "{0}, {1} {2}" : "{0} {1} {2}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Humanizer
{
internal class DefaultDateOnlyToOrdinalWordConverter : IDateOnlyToOrdinalWordConverter
class DefaultDateOnlyToOrdinalWordConverter : IDateOnlyToOrdinalWordConverter
{
public virtual string Convert(DateOnly date) =>
date.Day.Ordinalize() + date.ToString(" MMMM yyyy");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class DefaultDateToOrdinalWordConverter : IDateToOrdinalWordConverter
class DefaultDateToOrdinalWordConverter : IDateToOrdinalWordConverter
{
public virtual string Convert(DateTime date) =>
date.Day.Ordinalize() + date.ToString(" MMMM yyyy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Humanizer
{
internal class EsDateOnlyToOrdinalWordsConverter : DefaultDateOnlyToOrdinalWordConverter
class EsDateOnlyToOrdinalWordsConverter : DefaultDateOnlyToOrdinalWordConverter
{
public override string Convert(DateOnly date)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class EsDateToOrdinalWordsConverter : DefaultDateToOrdinalWordConverter
class EsDateToOrdinalWordsConverter : DefaultDateToOrdinalWordConverter
{
public override string Convert(DateTime date) =>
date.ToString("d 'de' MMMM 'de' yyyy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Humanizer
{
internal class FrDateOnlyToOrdinalWordsConverter : DefaultDateOnlyToOrdinalWordConverter
class FrDateOnlyToOrdinalWordsConverter : DefaultDateOnlyToOrdinalWordConverter
{
public override string Convert(DateOnly date)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class FrDateToOrdinalWordsConverter : DefaultDateToOrdinalWordConverter
class FrDateToOrdinalWordsConverter : DefaultDateToOrdinalWordConverter
{
public override string Convert(DateTime date)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Humanizer
{
internal class LtDateOnlyToOrdinalWordsConverter : IDateOnlyToOrdinalWordConverter
class LtDateOnlyToOrdinalWordsConverter : IDateOnlyToOrdinalWordConverter
{
public string Convert(DateOnly date) =>
date.ToString("yyyy 'm.' MMMM d 'd.'");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class LtDateToOrdinalWordsConverter : IDateToOrdinalWordConverter
class LtDateToOrdinalWordsConverter : IDateToOrdinalWordConverter
{
public string Convert(DateTime date) =>
date.ToString("yyyy 'm.' MMMM d 'd.'");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Humanizer
{
internal class UsDateOnlyToOrdinalWordsConverter : DefaultDateOnlyToOrdinalWordConverter
class UsDateOnlyToOrdinalWordsConverter : DefaultDateOnlyToOrdinalWordConverter
{
public override string Convert(DateOnly date) =>
date.ToString("MMMM ") + date.Day.Ordinalize() + date.ToString(", yyyy");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class UsDateToOrdinalWordsConverter : DefaultDateToOrdinalWordConverter
class UsDateToOrdinalWordsConverter : DefaultDateToOrdinalWordConverter
{
public override string Convert(DateTime date) =>
date.ToString("MMMM ") + date.Day.Ordinalize() + date.ToString(", yyyy");
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Localisation/Formatters/ArabicFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class ArabicFormatter() :
class ArabicFormatter() :
DefaultFormatter("ar")
{
private const string DualPostfix = "_Dual";
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Localisation/Formatters/CroatianFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class CroatianFormatter() :
class CroatianFormatter() :
DefaultFormatter("hr")
{
private const string DualTrialQuadralPostfix = "_DualTrialQuadral";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class CzechSlovakPolishFormatter(string localeCode) :
class CzechSlovakPolishFormatter(string localeCode) :
DefaultFormatter(localeCode)
{
private const string PaucalPostfix = "_Paucal";
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Localisation/Formatters/FrenchFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class FrenchFormatter(string localeCode) :
class FrenchFormatter(string localeCode) :
DefaultFormatter(localeCode)
{
private const string DualPostfix = "_Dual";
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Localisation/Formatters/GermanFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class GermanFormatter() :
class GermanFormatter() :
DefaultFormatter("de")
{
/// <inheritdoc />
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Localisation/Formatters/HebrewFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class HebrewFormatter() :
class HebrewFormatter() :
DefaultFormatter("he")
{
private const string DualPostfix = "_Dual";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class IcelandicFormatter() :
class IcelandicFormatter() :
DefaultFormatter(LocaleCode)
{
private const string LocaleCode = "is";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class LithuanianFormatter() :
class LithuanianFormatter() :
DefaultFormatter("lt")
{
protected override string GetResourceKey(string resourceKey, int number)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer;

internal class LuxembourgishFormatter() :
class LuxembourgishFormatter() :
DefaultFormatter(LocaleCode)
{
private const string LocaleCode = "lb";
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Localisation/Formatters/MalteseFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class MalteseFormatter(string localeCode) :
class MalteseFormatter(string localeCode) :
DefaultFormatter(localeCode)
{
private const string DualPostfix = "_Dual";
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Localisation/Formatters/RomanianFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class RomanianFormatter() :
class RomanianFormatter() :
DefaultFormatter(RomanianCultureCode)
{
private const int PrepositionIndicatingDecimals = 2;
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Localisation/Formatters/RussianFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class RussianFormatter() :
class RussianFormatter() :
DefaultFormatter("ru")
{
protected override string GetResourceKey(string resourceKey, int number)
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Localisation/Formatters/SerbianFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class SerbianFormatter(string localeCode) :
class SerbianFormatter(string localeCode) :
DefaultFormatter(localeCode)
{
private const string PaucalPostfix = "_Paucal";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class SlovenianFormatter() :
class SlovenianFormatter() :
DefaultFormatter("sl")
{
private const string DualPostfix = "_Dual";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class UkrainianFormatter() : DefaultFormatter("uk")
class UkrainianFormatter() : DefaultFormatter("uk")
{
protected override string GetResourceKey(string resourceKey, int number)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal enum LithuanianNumberForm
enum LithuanianNumberForm
{
Singular,
Plural,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal static class LithuanianNumberFormDetector
static class LithuanianNumberFormDetector
{
public static LithuanianNumberForm Detect(long number)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal enum RussianGrammaticalNumber
enum RussianGrammaticalNumber
{
Singular,
Paucal,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal static class RussianGrammaticalNumberDetector
static class RussianGrammaticalNumberDetector
{
public static RussianGrammaticalNumber Detect(long number)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class AfrikaansNumberToWordsConverter :
class AfrikaansNumberToWordsConverter :
GenderlessNumberToWordsConverter
{
private static readonly string[] UnitsMap = ["nul", "een", "twee", "drie", "vier", "vyf", "ses", "sewe", "agt", "nege", "tien", "elf", "twaalf", "dertien", "veertien", "vyftien", "sestien", "sewentien", "agtien", "negentien"];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class ArabicNumberToWordsConverter :
class ArabicNumberToWordsConverter :
GenderedNumberToWordsConverter
{
private static readonly string[] Groups = ["مئة", "ألف", "مليون", "مليار", "تريليون", "كوادريليون", "كوينتليون", "سكستيليون"];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class ArmenianNumberToWordsConverter :
class ArmenianNumberToWordsConverter :
GenderlessNumberToWordsConverter
{
private static readonly string[] UnitsMap = ["զրո", "մեկ", "երկու", "երեք", "չորս", "հինգ", "վեց", "յոթ", "ութ", "ինը", "տաս", "տասնմեկ", "տասներկու", "տասներեք", "տասնչորս", "տասնհինգ", "տասնվեց", "տասնյոթ", "տասնութ", "տասնինը"];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class AzerbaijaniNumberToWordsConverter :
class AzerbaijaniNumberToWordsConverter :
GenderlessNumberToWordsConverter
{
private static readonly string[] UnitsMap = ["sıfır", "bir", "iki", "üç", "dörd", "beş", "altı", "yeddi", "səkkiz", "doqquz"];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class BanglaNumberToWordsConverter :
class BanglaNumberToWordsConverter :
GenderlessNumberToWordsConverter
{
private static readonly string[] UnitsMap =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class BrazilianPortugueseNumberToWordsConverter :
class BrazilianPortugueseNumberToWordsConverter :
GenderedNumberToWordsConverter
{
private static readonly string[] PortugueseUnitsMap = ["zero", "um", "dois", "três", "quatro", "cinco", "seis", "sete", "oito", "nove", "dez", "onze", "doze", "treze", "quatorze", "quinze", "dezesseis", "dezessete", "dezoito", "dezenove"];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class BulgarianNumberToWordsConverter : GenderedNumberToWordsConverter
class BulgarianNumberToWordsConverter : GenderedNumberToWordsConverter
{
private static readonly string[] UnitsMap =
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Humanizer
{
internal class CentralKurdishNumberToWordsConverter : GenderlessNumberToWordsConverter
class CentralKurdishNumberToWordsConverter : GenderlessNumberToWordsConverter
{
private static readonly string[] KurdishHundredsMap = ["سفر", "سەد", "دوو سەد", "سێ سەد", "چوار سەد", "پێنج سەد", "شەش سەد", "حەوت سەد", "هەشت سەد", "نۆ سەد"];
private static readonly string[] KurdishTensMap = ["سفر", "دە", "بیست", "سی", "چل", "پەنجا", "شەست", "حەفتا", "هەشتا", "نەوەد"];
Expand Down
Loading