Class CacheValidatorFactory
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
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.