diff --git a/src/FingerprintBuilder.cs b/src/FingerprintBuilder.cs index f92b9f8..1cd2517 100644 --- a/src/FingerprintBuilder.cs +++ b/src/FingerprintBuilder.cs @@ -40,8 +40,14 @@ private FingerprintBuilder(Func computeHash) _computeHash = computeHash ?? throw new ArgumentNullException(nameof(computeHash)); } + /// + /// Create FingerprintBuilder from HashAlgorithm + /// public static IFingerprintBuilder Create(HashAlgorithm hashAlgorithm) => Create(hashAlgorithm.ComputeHash); + /// + /// Create FingerprintBuilder from Func + /// public static IFingerprintBuilder Create(Func computeHash) => new FingerprintBuilder(computeHash); public IFingerprintBuilder For(Expression> expression) => For(expression, f => f); diff --git a/src/FingerprintBuilder.csproj b/src/FingerprintBuilder.csproj index 15594a1..ed8f4cd 100644 --- a/src/FingerprintBuilder.csproj +++ b/src/FingerprintBuilder.csproj @@ -1,6 +1,5 @@ - 11.0 Compute hash for specified .NET object 2019 © Serge K Serge K diff --git a/src/FingerprintBuilderExtensions.cs b/src/FingerprintBuilderExtensions.cs index 64acce7..9bb34ee 100644 --- a/src/FingerprintBuilderExtensions.cs +++ b/src/FingerprintBuilderExtensions.cs @@ -22,9 +22,6 @@ public static string ToUpperHexString(this byte[] source) return source.ToString("X2"); } - /// - /// Convert to string - /// private static string ToString(this byte[] source, string format) { if (source == null) diff --git a/src/IFingerprintBuilder.cs b/src/IFingerprintBuilder.cs index 3732bec..a634778 100644 --- a/src/IFingerprintBuilder.cs +++ b/src/IFingerprintBuilder.cs @@ -5,11 +5,23 @@ namespace FingerprintBuilder; public interface IFingerprintBuilder { + /// + /// Add Expression + /// IFingerprintBuilder For(Expression> expression); + /// + /// Add Expression + /// IFingerprintBuilder For(Expression> expression, bool toLower, bool trim); + /// + /// Add Expression + /// IFingerprintBuilder For(Expression> expression, Expression> fingerprint); + /// + /// Build Func + /// Func Build(); } diff --git a/tests/units/FingerprintBuilder.Tests.csproj b/tests/units/FingerprintBuilder.Tests.csproj index 5b72c5e..be0326b 100644 --- a/tests/units/FingerprintBuilder.Tests.csproj +++ b/tests/units/FingerprintBuilder.Tests.csproj @@ -1,6 +1,5 @@  - 11.0 net6.0 net462;net6.0 true