C# 클래스 GlobalDemo.DAL.Azure.StorageRepository

파일 보기 프로젝트 열기: kaevans/globalscaledemo 1 사용 예제들

공개 메소드들

메소드 설명
GetBlob ( string containerName, string fileName ) : Task
GetBlobContainerSASToken ( ) : string

Gets the blob container's SAS token without any parameters. Defaults are Write permissions for 2 minutes

GetBlobContainerSASToken ( string containerName, SharedAccessBlobPermissions permissions, int minutes ) : string

Gets a blob container's SAS token

GetBlobURI ( string fileName, string containerName ) : Uri

Get a block blob's URI

GetLatestFromTableStorageAsync ( ) : Task>

This is a full table scan. Yuck.

GetPhotoFromTableAsync ( string tableName, string partitionKey, string rowKey ) : Task

This is the most efficient way to retrieve, using both the partition key and row key

GetPhotosFromTableAsync ( string tableName, string partitionKey ) : Task>

This is a partition scan. Less optimal, but not as bad as a full table scan.

MonitorCopy ( Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer destContainer, string fileName, TextWriter log ) : Task

Monitors a blob copy operation

ReplicateBlobAsync ( string targetConnectionString, string sourceContainerName, string targetContainerName, string blobName, TextWriter log ) : Task

Replicates a blob from the current storage account to a target storage account

SaveToTableStorageAsync ( string tableName, PhotoModel model ) : Task

Saves an entity to Azure table storage

SendBroadcastQueueMessageAsync ( string data ) : Task

Sends a queue message

SendQueueMessageAsync ( string data ) : Task

Sends a queue message

StorageRepository ( Microsoft.WindowsAzure.Storage.CloudStorageAccount account ) : GlobalDemo.DAL.Models
StorageRepository ( string connectionString ) : GlobalDemo.DAL.Models
UploadBlobAsync ( MemoryStream stream, string containerName, string fileName ) : Task

메소드 상세

GetBlob() 공개 메소드

public GetBlob ( string containerName, string fileName ) : Task
containerName string
fileName string
리턴 Task

GetBlobContainerSASToken() 공개 메소드

Gets the blob container's SAS token without any parameters. Defaults are Write permissions for 2 minutes
public GetBlobContainerSASToken ( ) : string
리턴 string

GetBlobContainerSASToken() 공개 메소드

Gets a blob container's SAS token
public GetBlobContainerSASToken ( string containerName, SharedAccessBlobPermissions permissions, int minutes ) : string
containerName string The container name
permissions SharedAccessBlobPermissions The permissions
minutes int Number of minutes the permissions are effective
리턴 string

GetBlobURI() 공개 메소드

Get a block blob's URI
public GetBlobURI ( string fileName, string containerName ) : Uri
fileName string The file name in storage
containerName string The container name
리턴 System.Uri

GetLatestFromTableStorageAsync() 공개 메소드

This is a full table scan. Yuck.
public GetLatestFromTableStorageAsync ( ) : Task>
리턴 Task>

GetPhotoFromTableAsync() 공개 메소드

This is the most efficient way to retrieve, using both the partition key and row key
public GetPhotoFromTableAsync ( string tableName, string partitionKey, string rowKey ) : Task
tableName string
partitionKey string
rowKey string
리턴 Task

GetPhotosFromTableAsync() 공개 메소드

This is a partition scan. Less optimal, but not as bad as a full table scan.
public GetPhotosFromTableAsync ( string tableName, string partitionKey ) : Task>
tableName string
partitionKey string
리턴 Task>

MonitorCopy() 공개 메소드

Monitors a blob copy operation
public MonitorCopy ( Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer destContainer, string fileName, TextWriter log ) : Task
destContainer Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer The destination container to monitor
fileName string
log System.IO.TextWriter The log to write output
리턴 Task

ReplicateBlobAsync() 공개 메소드

Replicates a blob from the current storage account to a target storage account
public ReplicateBlobAsync ( string targetConnectionString, string sourceContainerName, string targetContainerName, string blobName, TextWriter log ) : Task
targetConnectionString string Connection string of the target storage account
sourceContainerName string The source container
targetContainerName string The target container
blobName string The blob to replicate
log System.IO.TextWriter TextWriter used for logging
리턴 Task

SaveToTableStorageAsync() 공개 메소드

Saves an entity to Azure table storage
public SaveToTableStorageAsync ( string tableName, PhotoModel model ) : Task
tableName string The name of the table to save to
model GlobalDemo.DAL.Models.PhotoModel The PhotoModel object to be saved
리턴 Task

SendBroadcastQueueMessageAsync() 공개 메소드

Sends a queue message
public SendBroadcastQueueMessageAsync ( string data ) : Task
data string The message to send
리턴 Task

SendQueueMessageAsync() 공개 메소드

Sends a queue message
public SendQueueMessageAsync ( string data ) : Task
data string The message to send
리턴 Task

StorageRepository() 공개 메소드

public StorageRepository ( Microsoft.WindowsAzure.Storage.CloudStorageAccount account ) : GlobalDemo.DAL.Models
account Microsoft.WindowsAzure.Storage.CloudStorageAccount
리턴 GlobalDemo.DAL.Models

StorageRepository() 공개 메소드

public StorageRepository ( string connectionString ) : GlobalDemo.DAL.Models
connectionString string
리턴 GlobalDemo.DAL.Models

UploadBlobAsync() 공개 메소드

public UploadBlobAsync ( MemoryStream stream, string containerName, string fileName ) : Task
stream System.IO.MemoryStream
containerName string
fileName string
리턴 Task