Class CacheValidatorFactory
- Namespace
- Cuemon.Data.Integrity
- Assembly
- Cuemon.Data.Integrity.dll
Provides access to factory methods for creating and configuring CacheValidator instances.
public static class CacheValidatorFactory
- Inheritance
-
CacheValidatorFactory
Methods
CreateValidator(FileInfo, Func<Hash>, Action<FileChecksumOptions>)
Creates and returns an instance of CacheValidator from the specified file
.
public static CacheValidator CreateValidator(FileInfo file, Func<Hash> hashFactory = null, Action<FileChecksumOptions> setup = null)
Parameters
file
FileInfoThe FileInfo to convert.
hashFactory
Func<Hash>The function delegate that is invoked to produce the HashResult. Default is CreateFnv128(Action<FowlerNollVoOptions>).
setup
Action<FileChecksumOptions>The FileChecksumOptions which may be configured.
Returns
- CacheValidator
A CacheValidator that represents the
file
.
Exceptions
- ArgumentNullException
file
cannot be null.
CreateValidator(Assembly, Func<Hash>, Action<FileChecksumOptions>)
Creates and returns an instance of CacheValidator from the specified assembly
.
public static CacheValidator CreateValidator(Assembly assembly, Func<Hash> hashFactory = null, Action<FileChecksumOptions> setup = null)
Parameters
assembly
AssemblyThe Assembly to convert.
hashFactory
Func<Hash>The function delegate that is invoked to produce the HashResult. Default is CreateFnv128(Action<FowlerNollVoOptions>).
setup
Action<FileChecksumOptions>The FileChecksumOptions which may be configured.
Returns
- CacheValidator
A CacheValidator that represents the
assembly
.
Exceptions
- ArgumentNullException
assembly
cannot be null.