C# Class ALFA.Shared.AzureFileStoreFile

This class encapsulates an Azure backend implementation of the FileStoreFile abstraction.
Inheritance: FileStoreFile
Show file Open project: ALandFarAway/ALFA-Base-Resources

Public Methods

Method Description
Delete ( ) : void

Delete the file.

Exists ( ) : bool

Returns true if the file exists.

FetchAttributes ( ) : void

Load properties and metadata.

Read ( Stream Stream ) : void

Read the entire contents of the file into the given Stream.

ReadIfModifiedSince ( Stream Stream, DateTimeOffset Time ) : void

Read the entire contents of the file into the given Stream if it is not modified since a given time.

SetMetadata ( ) : void

Set new metadata for the file.

Write ( Stream Stream ) : void

Replace the contents of the file with the given Stream.

WriteIfNotModifiedSince ( Stream Stream, DateTimeOffset Time ) : void

Replace the contents of the file with the given Stream if the stored file has not been modified since a given time.

Private Methods

Method Description
AzureFileStoreFile ( Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob Blob ) : System

Instantiate a new AzureFileStoreFile from an Azure blob.

Method Details

Delete() public method

Delete the file.
public Delete ( ) : void
return void

Exists() public method

Returns true if the file exists.
public Exists ( ) : bool
return bool

FetchAttributes() public method

Load properties and metadata.
public FetchAttributes ( ) : void
return void

Read() public method

Read the entire contents of the file into the given Stream.
public Read ( Stream Stream ) : void
Stream Stream Supplies the Stream to read the entire /// contents of the file into.
return void

ReadIfModifiedSince() public method

Read the entire contents of the file into the given Stream if it is not modified since a given time.
public ReadIfModifiedSince ( Stream Stream, DateTimeOffset Time ) : void
Stream Stream Supplies the Stream to read the entire /// contents of the file into.
Time DateTimeOffset Supplies the modified since limit.
return void

SetMetadata() public method

Set new metadata for the file.
public SetMetadata ( ) : void
return void

Write() public method

Replace the contents of the file with the given Stream.
public Write ( Stream Stream ) : void
Stream Stream Supplies the Stream to write into the file. /// The original contents of the file are replaced.
return void

WriteIfNotModifiedSince() public method

Replace the contents of the file with the given Stream if the stored file has not been modified since a given time.
public WriteIfNotModifiedSince ( Stream Stream, DateTimeOffset Time ) : void
Stream Stream Supplies the Stream to write into the file. /// The original contents of the file are replaced.
Time DateTimeOffset Supplies the modified time cutoff.
return void