Skip to content

Commit

Permalink
fix: move comparer because we only use it for CodeGen. This also fixe…
Browse files Browse the repository at this point in the history
…s the wrongly generated public API spec (due to DEBUG symbol).
  • Loading branch information
skwasjer committed Oct 5, 2024
1 parent def0c1e commit 2f8d9bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
1 change: 1 addition & 0 deletions SupportedCountries.tt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="IbanNet" #>
<#@ import namespace="IbanNet.CodeGen" #>
<#@ import namespace="IbanNet.CodeGen.Swift" #>
<#@ import namespace="IbanNet.Registry.Patterns" #>
<#@ import namespace="IbanNet.Registry" #>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#if DEBUG && NETSTANDARD2_0 // Only used atm. by PS script, so exclude from all build configs except debug.
using System.Diagnostics;
using IbanNet.Registry;

namespace IbanNet.Registry;
namespace IbanNet.CodeGen;

/// <summary>
/// Compares <see cref="IbanCountry"/> by country code only.
/// Compares <see cref="IbanCountry" /> by country code only.
/// </summary>
[DebuggerNonUserCode]
public class IbanCountryCodeComparer : IEqualityComparer<IbanCountry>
public sealed class IbanCountryCodeComparer : IEqualityComparer<IbanCountry>
{
/// <inheritdoc />
public bool Equals(IbanCountry? x, IbanCountry? y)
Expand Down Expand Up @@ -41,4 +39,3 @@ public int GetHashCode(IbanCountry obj)
return obj?.TwoLetterISORegionName.GetHashCode() ?? 0;
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,6 @@ namespace IbanNet.Registry
public IbanNet.Registry.SepaInfo? Sepa { get; init; }
public override string ToString() { }
}
public class IbanCountryCodeComparer : System.Collections.Generic.IEqualityComparer<IbanNet.Registry.IbanCountry>
{
public IbanCountryCodeComparer() { }
public bool Equals(IbanNet.Registry.IbanCountry? x, IbanNet.Registry.IbanCountry? y) { }
public int GetHashCode(IbanNet.Registry.IbanCountry obj) { }
}
public class IbanGenerator : IbanNet.Registry.IIbanGenerator
{
public IbanGenerator() { }
Expand Down

0 comments on commit 2f8d9bb

Please sign in to comment.