Show / Hide Table of Contents

    Class CacheValidatorExtensions

    This is an extension implementation of the most common methods on the CacheValidator class.

    Inheritance
    System.Object
    CacheValidatorExtensions
    Namespace: Cuemon.Integrity
    Assembly: Cuemon.Integrity.dll
    Syntax
    public static class CacheValidatorExtensions

    Methods

    | Improve this Doc

    GetCacheValidator(DateTime, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, Byte[], Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, byte[] checksum, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.Byte[] checksum

    An array of bytes containing a checksum of the data this CacheValidator represents.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, Double, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, double checksum, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.Double checksum

    A System.Double value containing a byte-for-byte checksum of the data this CacheValidator represents.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, Int16, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, short checksum, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.Int16 checksum

    A System.Int16 value containing a byte-for-byte checksum of the data this CacheValidator represents.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, Int32, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, int checksum, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.Int32 checksum

    A System.Int32 value containing a byte-for-byte checksum of the data this CacheValidator represents.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, Int64, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, long checksum, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.Int64 checksum

    A System.Int64 value containing a byte-for-byte checksum of the data this CacheValidator represents.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, Single, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, float checksum, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.Single checksum

    A System.Single value containing a byte-for-byte checksum of the data this CacheValidator represents.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, String, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, string checksum, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.String checksum

    A System.String value containing a byte-for-byte checksum of the data this CacheValidator represents.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, UInt16, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, ushort checksum, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.UInt16 checksum

    A System.UInt16 value containing a byte-for-byte checksum of the data this CacheValidator represents.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, UInt32, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, uint checksum, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.UInt32 checksum

    A System.UInt32 value containing a byte-for-byte checksum of the data this CacheValidator represents.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(DateTime, DateTime, UInt64, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified parameters.

    Declaration
    public static CacheValidator GetCacheValidator(this DateTime created, DateTime modified, ulong checksum, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.DateTime created

    A System.DateTime value for when data this CacheValidator represents was first created.

    System.DateTime modified

    A System.DateTime value for when data this CacheValidator represents was last modified.

    System.UInt64 checksum

    A System.UInt64 value containing a byte-for-byte checksum of the data this CacheValidator represents.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified parameters.

    | Improve this Doc

    GetCacheValidator(Assembly, Boolean, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified assembly.

    Declaration
    public static CacheValidator GetCacheValidator(this Assembly assembly, bool readByteForByteChecksum = false, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.Reflection.Assembly assembly

    The assembly to resolve a CacheValidator from.

    System.Boolean readByteForByteChecksum

    true to read the assembly byte-for-byte to promote a strong integrity checksum; false to read common properties of the assembly for a weak (but reliable) integrity checksum.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that fully represents the integrity of the specified assembly.

    | Improve this Doc

    GetCacheValidator(String, Int32, Action<CacheValidatorOptions>)

    Returns a CacheValidator from the specified fileName.

    Declaration
    public static CacheValidator GetCacheValidator(this string fileName, int bytesToRead = 0, Action<CacheValidatorOptions> setup = null)
    Parameters
    Type Name Description
    System.String fileName

    The fully qualified name of the file.

    System.Int32 bytesToRead

    The maximum size of a byte-for-byte that promotes a medium/strong integrity check of the specified fileName. A value of 0 (or less) leaves the integrity check at weak.

    System.Action<CacheValidatorOptions> setup

    The CacheValidatorOptions which need to be configured.

    Returns
    Type Description
    CacheValidator

    A CacheValidator that represents either a weak, medium or strong integrity check of the specified fileName.

    Remarks

    Should the specified fileName trigger any sort of exception, a Default is returned.

    Exceptions
    Type Condition
    System.ArgumentNullException

    fileName is null.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX