C# Class Elastacloud.AzureManagement.Fluent.Commands.Blobs.BlobCommand

Abstract Base class with functions to allow blob handling using the storage services API
Inheritance: ICommand
Afficher le fichier Open project: azurecoder/fluent-management

Private Properties

Свойство Type Description
PrepareRequest System.Net.HttpWebRequest

Méthodes publiques

Méthode Description
CheckStorageAccountExists ( int timeoutInSeconds ) : bool

Checks to see whether a storage account exists based on checking every second the operation will either return a 502 if the DNS cannot resolve or a 400 if it can

Execute ( ) : void

Abstract method used to execute the any command againt blob storage

Méthodes protégées

Méthode Description
BlobCommand ( ) : System
CreateAuthorizationHeader ( String canResource, string options = "", int contentLength ) : string
GetPackageFileBytesAndLength ( string fileName, int &contentLength ) : byte[]

Finds out the length and returns a byte array of the files

SendWebRequest ( string url, string authHeader, byte fileBytes = null, int contentLength ) : void

Private Methods

Méthode Description
PrepareRequest ( string url, string authHeader, byte fileBytes = null, int contentLength ) : HttpWebRequest

Preprares the request for sending and using blob storage

Method Details

BlobCommand() protected méthode

protected BlobCommand ( ) : System
Résultat System

CheckStorageAccountExists() public méthode

Checks to see whether a storage account exists based on checking every second the operation will either return a 502 if the DNS cannot resolve or a 400 if it can
public CheckStorageAccountExists ( int timeoutInSeconds ) : bool
timeoutInSeconds int The timeout in seconds to stop the checking
Résultat bool

CreateAuthorizationHeader() protected méthode

protected CreateAuthorizationHeader ( String canResource, string options = "", int contentLength ) : string
canResource String
options string
contentLength int
Résultat string

Execute() public abstract méthode

Abstract method used to execute the any command againt blob storage
public abstract Execute ( ) : void
Résultat void

GetPackageFileBytesAndLength() protected méthode

Finds out the length and returns a byte array of the files
protected GetPackageFileBytesAndLength ( string fileName, int &contentLength ) : byte[]
fileName string The filename being used to retrieve the bytes and length
contentLength int The length of the file in bytes
Résultat byte[]

SendWebRequest() protected méthode

protected SendWebRequest ( string url, string authHeader, byte fileBytes = null, int contentLength ) : void
url string
authHeader string
fileBytes byte
contentLength int
Résultat void