From d5cc8b42dd120d4f0847a32a4fc69ff2dab98ae6 Mon Sep 17 00:00:00 2001 From: Mike Marynowski Date: Thu, 7 Mar 2024 04:41:54 -0500 Subject: [PATCH] Cleanup --- Source/Singulink.Globalization.Currency/ImmutableMoneySet.cs | 2 +- .../ImmutableSortedMoneySet.cs | 2 +- .../MoneyCollectionExtensions.cs | 4 +--- Source/Singulink.Globalization.Currency/MoneySet.cs | 5 ++--- Source/Singulink.Globalization.Currency/SortedMoneySet.cs | 5 ++--- .../ImmutableSortedMoneySetTests/RemoveAll.cs | 5 +---- 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Source/Singulink.Globalization.Currency/ImmutableMoneySet.cs b/Source/Singulink.Globalization.Currency/ImmutableMoneySet.cs index a1ff110..2cd28a5 100644 --- a/Source/Singulink.Globalization.Currency/ImmutableMoneySet.cs +++ b/Source/Singulink.Globalization.Currency/ImmutableMoneySet.cs @@ -777,7 +777,7 @@ public struct Enumerator : IEnumerator /// public Money Current => new(_amountLookupEnumerator.Current.Value, _amountLookupEnumerator.Current.Key); - /// + /// object? IEnumerator.Current => Current; internal Enumerator(ImmutableDictionary amountLookup) diff --git a/Source/Singulink.Globalization.Currency/ImmutableSortedMoneySet.cs b/Source/Singulink.Globalization.Currency/ImmutableSortedMoneySet.cs index a692103..395162b 100644 --- a/Source/Singulink.Globalization.Currency/ImmutableSortedMoneySet.cs +++ b/Source/Singulink.Globalization.Currency/ImmutableSortedMoneySet.cs @@ -777,7 +777,7 @@ public struct Enumerator : IEnumerator /// public Money Current => new(_amountLookupEnumerator.Current.Value, _amountLookupEnumerator.Current.Key); - /// + /// object? IEnumerator.Current => Current; internal Enumerator(ImmutableSortedDictionary amountLookup) diff --git a/Source/Singulink.Globalization.Currency/MoneyCollectionExtensions.cs b/Source/Singulink.Globalization.Currency/MoneyCollectionExtensions.cs index 06f7f0c..804acfc 100644 --- a/Source/Singulink.Globalization.Currency/MoneyCollectionExtensions.cs +++ b/Source/Singulink.Globalization.Currency/MoneyCollectionExtensions.cs @@ -1,6 +1,4 @@ -using Microsoft.Win32; - -namespace Singulink.Globalization; +namespace Singulink.Globalization; /// /// Provides a set of static methods for converting between money collection types. diff --git a/Source/Singulink.Globalization.Currency/MoneySet.cs b/Source/Singulink.Globalization.Currency/MoneySet.cs index d35fc39..6db99a0 100644 --- a/Source/Singulink.Globalization.Currency/MoneySet.cs +++ b/Source/Singulink.Globalization.Currency/MoneySet.cs @@ -54,9 +54,8 @@ public MoneySet(IEnumerable values) : this(CurrencyRegistry.Default, valu /// /// Attempted to add a value with a currency that is not available in the currency registry. /// - public MoneySet(CurrencyRegistry registry, IEnumerable values) : this(registry, values, values is not IReadOnlyMoneySet s || s.Registry != registry) - { - } + public MoneySet(CurrencyRegistry registry, IEnumerable values) + : this(registry, values, values is not IReadOnlyMoneySet s || s.Registry != registry) { } /// /// Initializes a new instance of the class. Trusted internal constructor. diff --git a/Source/Singulink.Globalization.Currency/SortedMoneySet.cs b/Source/Singulink.Globalization.Currency/SortedMoneySet.cs index e020517..13a06ee 100644 --- a/Source/Singulink.Globalization.Currency/SortedMoneySet.cs +++ b/Source/Singulink.Globalization.Currency/SortedMoneySet.cs @@ -54,9 +54,8 @@ public SortedMoneySet(IEnumerable values) : this(CurrencyRegistry.Default /// /// Attempted to add a value with a currency that is not available in the currency registry. /// - public SortedMoneySet(CurrencyRegistry registry, IEnumerable values) : this(registry, values, values is not IReadOnlyMoneySet s || s.Registry != registry) - { - } + public SortedMoneySet(CurrencyRegistry registry, IEnumerable values) + : this(registry, values, values is not IReadOnlyMoneySet s || s.Registry != registry) { } /// /// Initializes a new instance of the class. Trusted internal constructor. diff --git a/Tests/Singulink.Globalization.Currency.Tests/ImmutableSortedMoneySetTests/RemoveAll.cs b/Tests/Singulink.Globalization.Currency.Tests/ImmutableSortedMoneySetTests/RemoveAll.cs index dee2ba1..c0c3ce7 100644 --- a/Tests/Singulink.Globalization.Currency.Tests/ImmutableSortedMoneySetTests/RemoveAll.cs +++ b/Tests/Singulink.Globalization.Currency.Tests/ImmutableSortedMoneySetTests/RemoveAll.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Collections.Immutable; - -namespace Singulink.Globalization.Tests.ImmutableSortedMoneySetTests; +namespace Singulink.Globalization.Tests.ImmutableSortedMoneySetTests; [PrefixTestClass] public class RemoveAll