DS3 .NET Software Development Kit  3.0.0
Provides access to the Spectra Logic DS3 API through .NET.
Ds3.Models.ChecksumType Class Referenceabstract

Public Types

enum  Type {
  CRC_32, CRC_32C, MD5, SHA_256,
  SHA_512, NONE
}
 

Public Member Functions

abstract void Match (Action none, Action compute, Action< byte[]> value)
 Calls none, compute, or value, depending on which type this actually is. More...
 
abstract T Match< T > (Func< T > none, Func< T > compute, Func< byte[], T > value)
 Calls none, compute, or value, depending on which type this actually is. More...
 

Static Public Member Functions

static ChecksumType Value (byte[] hash)
 Provide a binary ChecksumType value directly, if the client application knows the ChecksumType of a payload beforehand. More...
 

Properties

static ChecksumType None [get]
 Do not provide a ChecksumType header on PUT. More...
 
static ChecksumType Compute [get]
 Calculate the ChecksumType automatically. This requires a seekable streem. More...
 

Member Function Documentation

abstract void Ds3.Models.ChecksumType.Match ( Action  none,
Action  compute,
Action< byte[]>  value 
)
pure virtual

Calls none, compute, or value, depending on which type this actually is.

Parameters
noneThe function to call if the value is "none".
computeThe function to call if the value is "compute".
valueThe function to call if the value is "value" with a ChecksumType payload.
abstract T Ds3.Models.ChecksumType.Match< T > ( Func< T >  none,
Func< T >  compute,
Func< byte[], T >  value 
)
pure virtual

Calls none, compute, or value, depending on which type this actually is.

Parameters
noneThe function to call if the value is "none".
computeThe function to call if the value is "compute".
valueThe function to call if the value is "value" with a ChecksumType payload.
Returns
What either none, computer, or value return.
static ChecksumType Ds3.Models.ChecksumType.Value ( byte[]  hash)
inlinestatic

Provide a binary ChecksumType value directly, if the client application knows the ChecksumType of a payload beforehand.

Parameters
hashThe ChecksumType bytes
Returns
The ChecksumType "value" instance

Property Documentation

ChecksumType Ds3.Models.ChecksumType.Compute
staticget

Calculate the ChecksumType automatically. This requires a seekable streem.

ChecksumType Ds3.Models.ChecksumType.None
staticget

Do not provide a ChecksumType header on PUT.