Table of Contents

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
Object
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 FileInfo

The System.IO.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

System.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 Assembly

The System.Reflection.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

System.ArgumentNullException

assembly cannot be null.