From c4e59ed389a5010dc5150afe6a1fccb216055672 Mon Sep 17 00:00:00 2001 From: Adam Simon Date: Fri, 2 Aug 2024 19:59:39 +0200 Subject: [PATCH] Remove unused code --- src/ConfigCatClient/FormattableString.cs | 40 +----------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/src/ConfigCatClient/FormattableString.cs b/src/ConfigCatClient/FormattableString.cs index 64e06fe8..77b80c68 100644 --- a/src/ConfigCatClient/FormattableString.cs +++ b/src/ConfigCatClient/FormattableString.cs @@ -13,42 +13,6 @@ namespace System { internal readonly struct FormattableString : IFormattable { - /// - /// Format the given object in the invariant culture. This static method may be - /// imported in C# by - /// - /// using static System.FormattableString; - /// . - /// Within the scope - /// of that import directive an interpolated string may be formatted in the - /// invariant culture by writing, for example, - /// - /// Invariant($"{{ lat = {latitude}; lon = {longitude} }}") - /// - /// - public static string Invariant(FormattableString formattable) - { - return formattable.ToString(Globalization.CultureInfo.InvariantCulture); - } - - /// - /// Format the given object in the current culture. This static method may be - /// imported in C# by - /// - /// using static System.FormattableString; - /// . - /// Within the scope - /// of that import directive an interpolated string may be formatted in the - /// current culture by writing, for example, - /// - /// CurrentCulture($"{{ lat = {latitude}; lon = {longitude} }}") - /// - /// - public static string CurrentCulture(FormattableString formattable) - { - return formattable.ToString(Globalization.CultureInfo.CurrentCulture); - } - private readonly string format; private readonly object?[] arguments; @@ -60,11 +24,9 @@ internal FormattableString(string format, object?[] arguments) public string Format => this.format ?? string.Empty; public object?[] GetArguments() { return this.arguments; } - public int ArgumentCount => this.arguments?.Length ?? 0; - public object? GetArgument(int index) { return this.arguments[index]; } public string ToString(string? format, IFormatProvider? formatProvider) { return ToString(formatProvider); } - public string ToString(IFormatProvider? formatProvider) { return string.Format(formatProvider, this.format, this.arguments); } + public string ToString(IFormatProvider? formatProvider) { return string.Format(formatProvider, Format, this.arguments); } public override string ToString() { return ToString(Globalization.CultureInfo.CurrentCulture); } } }