CreateValidator Method
Definition
- Assemblies
- Cuemon.Data.Integrity.dll
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
fileFileInfoThe FileInfo to convert.
hashFactoryFunc<Hash>The function delegate that is invoked to produce the HashResult. Default is CreateFnv128(Action<FowlerNollVoOptions>).
setupAction<FileChecksumOptions>The FileChecksumOptions which may be configured.
Returns
- CacheValidator
A CacheValidator that represents the
file.
Exceptions
- ArgumentNullException
filecannot 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
assemblyAssemblyThe Assembly to convert.
hashFactoryFunc<Hash>The function delegate that is invoked to produce the HashResult. Default is CreateFnv128(Action<FowlerNollVoOptions>).
setupAction<FileChecksumOptions>The FileChecksumOptions which may be configured.
Returns
- CacheValidator
A CacheValidator that represents the
assembly.
Exceptions
- ArgumentNullException
assemblycannot be null.