Skip to content

Commit f215cc2

Browse files
authored
Implement Dispose method in HashAlgorithmWrapperConfig and typo fixes
Added Dispose method to release resources. Signed-off-by: Xen <lordofxen@deskasoft.com>
1 parent d0b39f8 commit f215cc2

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

HashifyNet/Core/HashAlgorithmWrapper/HashAlgorithmWrapperConfig.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class HashAlgorithmWrapperConfig
4949
/// <value>
5050
/// The delegate.
5151
/// </value>
52-
public Func<SystemHashAlgorithm> InstanceFactory { get; }
52+
public Func<SystemHashAlgorithm> InstanceFactory { get; private set; }
5353

5454
/// <summary>
5555
/// Initializes a new instance of the <see cref="HashAlgorithmWrapperConfig"/> class with the specified hash algorithm
@@ -64,10 +64,18 @@ public HashAlgorithmWrapperConfig(Func<SystemHashAlgorithm> instanceFactory, int
6464
}
6565

6666
/// <summary>
67-
/// Makes a deep clone of current instance.
67+
/// Makes a deep clone of the current instance.
6868
/// </summary>
6969
/// <returns>A deep clone of the current instance.</returns>
7070
public IHashAlgorithmWrapperConfig Clone() =>
7171
new HashAlgorithmWrapperConfig(InstanceFactory, HashSizeInBits);
72+
73+
/// <summary>
74+
/// <inheritdoc/>
75+
/// </summary>
76+
public void Dispose()
77+
{
78+
InstanceFactory = null;
79+
}
7280
}
73-
}
81+
}

0 commit comments

Comments
 (0)