Skip to content

Commit 5b81cd6

Browse files
committed
removed unused method and added braces #106
1 parent ab861c5 commit 5b81cd6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/LogExpert/Classes/DateTimeParser/DateFormatPartAdjuster.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace LogExpert
66
// Ensures we have constant width (number of characters) date formats
77
internal static class DateFormatPartAdjuster
88
{
9-
private static IDictionary<string, string> dateTimePartReplacements = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
9+
private static readonly IDictionary<string, string> _dateTimePartReplacements = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
1010
{
1111
["y"] = "yyy",
1212
["yyy"] = "yyyy",
@@ -18,19 +18,19 @@ internal static class DateFormatPartAdjuster
1818

1919
public static string AdjustDateTimeFormatPart(string part)
2020
{
21-
if (!dateTimePartReplacements.TryGetValue(part, out string adjustedPart))
21+
if (!_dateTimePartReplacements.TryGetValue(part, out string adjustedPart))
22+
{
2223
return part;
24+
}
2325

2426
if (char.IsUpper(part[0]))
27+
{
2528
return adjustedPart.ToUpper();
29+
}
2630
else
31+
{
2732
return adjustedPart.ToLower();
28-
}
29-
30-
public static IEnumerable<string> AdjustDateTimeFormatParts(params string[] parts)
31-
{
32-
foreach (var part in parts)
33-
yield return AdjustDateTimeFormatPart(part);
33+
}
3434
}
3535
}
3636
}

0 commit comments

Comments
 (0)