Class CacheValidator
Provides a way to represent cacheable data-centric content that can be validated by cache-aware applications.
Implements
Inherited Members
Namespace: Cuemon.Integrity
Assembly: Cuemon.Integrity.dll
Syntax
public class CacheValidator : ChecksumBuilder, ICacheableTimestamp
Constructors
| Improve this DocCacheValidator(DateTime, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(DateTime created, Action<CacheValidatorOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | created | A System.DateTime value for when data this instance represents was first created. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(DateTime created, DateTime? modified, Action<CacheValidatorOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | created | A System.DateTime value for when data this instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, Byte[], Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(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 instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.Byte[] | checksum | An array of bytes containing a checksum of the data this instance represents. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, Double, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(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 instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.Double | checksum | A System.Double value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, Int16, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(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 instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.Int16 | checksum | A System.Int16 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, Int32, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(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 instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.Int32 | checksum | A System.Int32 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, Int64, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(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 instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.Int64 | checksum | A System.Int64 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, Single, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(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 instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.Single | checksum | A System.Single value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, String, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(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 instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.String | checksum | A System.String value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, UInt16, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(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 instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.UInt16 | checksum | A System.UInt16 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, UInt32, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(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 instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.UInt32 | checksum | A System.UInt32 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
CacheValidator(DateTime, Nullable<DateTime>, UInt64, Action<CacheValidatorOptions>)
Initializes a new instance of the CacheValidator class.
Declaration
public CacheValidator(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 instance represents was first created. |
System.Nullable<System.DateTime> | modified | A System.DateTime value for when data this instance represents was last modified. |
System.UInt64 | checksum | A System.UInt64 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<CacheValidatorOptions> | setup | The CacheValidatorOptions which need to be configured. |
Properties
| Improve this DocAssembly
Gets or sets the System.Reflection.Assembly that will serve as the ideal candidate for a CacheValidator reference point. Default is Cuemon.
Declaration
public static Assembly Assembly { get; set; }
Property Value
Type | Description |
---|---|
System.Reflection.Assembly | The assembly to use as a CacheValidator reference point. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Created
Gets a System.DateTime value from when data this instance represents was first created, expressed as the Coordinated Universal Time (UTC).
Declaration
public DateTime Created { get; }
Property Value
Type | Description |
---|---|
System.DateTime | A System.DateTime value from when data this instance represents was first created, expressed as the Coordinated Universal Time (UTC). |
Default
Gets a CacheValidator object that is initialized to a default representation that should be considered invalid for usage beyond this check.
Declaration
public static CacheValidator Default { get; }
Property Value
Type | Description |
---|---|
CacheValidator | A CacheValidator object that is initialized to a default representation. |
Method
Gets an enumeration value of ChecksumMethod indicating the usage method of this instance.
Declaration
public ChecksumMethod Method { get; }
Property Value
Type | Description |
---|---|
ChecksumMethod | One of the enumeration values of ChecksumMethod that indicates the usage method of this instance. |
Modified
Gets a System.DateTime value from when data this instance represents was last modified, expressed as the Coordinated Universal Time (UTC).
Declaration
public DateTime? Modified { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> | A System.DateTime value from when data this instance represents was last modified, expressed as the Coordinated Universal Time (UTC). |
ReferencePoint
Gets a CacheValidator object that represents an System.Reflection.Assembly reference point.
Declaration
public static CacheValidator ReferencePoint { get; }
Property Value
Type | Description |
---|---|
CacheValidator | A CacheValidator object that represents an System.Reflection.Assembly reference point. |
Strength
Gets an enumeration value of ChecksumStrength indicating the strength of this instance.
Declaration
public ChecksumStrength Strength { get; }
Property Value
Type | Description |
---|---|
ChecksumStrength | One of the enumeration values of ChecksumStrength that specifies the strength of this instance. |
Methods
| Improve this DocClone()
Creates a shallow copy of the current CacheValidator object.
Declaration
public virtual CacheValidator Clone()
Returns
Type | Description |
---|---|
CacheValidator | A new CacheValidator that is a copy of this instance. |
GetMostSignificant()
Declaration
public DateTime GetMostSignificant()
Returns
Type | Description |
---|---|
System.DateTime | The most significant (largest) value of either Created or Modified. |
GetMostSignificant(CacheValidator[])
Gets the most significant CacheValidator object from the most significant (largest) value of either Created or Modified in the specified sequence
.
Declaration
public static CacheValidator GetMostSignificant(params CacheValidator[] sequence)
Parameters
Type | Name | Description |
---|---|---|
CacheValidator[] | sequence | A sequence of CacheValidator objects to parse for the most significant (largest) value of either Created or Modified. |
Returns
Type | Description |
---|---|
CacheValidator | The most significant CacheValidator object from the specified |