/// <summary> /// This method initializes the blob client and container. /// </summary> public override void Initialize() { Client = StorageAccount.CreateCloudBlobClient(); if (RequestOptionsDefault == null) { RequestOptionsDefault = new BlobRequestOptions() { RetryPolicy = new LinearRetry(TimeSpan.FromMilliseconds(200), 5) , ServerTimeout = DefaultTimeout ?? TimeSpan.FromSeconds(1) //, ParallelOperationThreadCount = 64 } } ; Client.DefaultRequestOptions = RequestOptionsDefault; if (ContainerId == null) { ContainerId = AzureStorageHelper.GetEnum <DataCollectionSupport>(Support).StringValue; } ContainerId = StorageServiceBase.ValidateAzureContainerName(ContainerId); Container = Client.GetContainerReference(ContainerId); Container.CreateIfNotExistsAsync(BlobAccessType, RequestOptionsDefault, Context).Wait(); }
/// <summary> /// This method initiialises the table storage connector. /// </summary> public override void Initialize() { Client = StorageAccount.CreateCloudTableClient(); if (RequestOptionsDefault != null) { Client.DefaultRequestOptions = RequestOptionsDefault ?? new TableRequestOptions() { RetryPolicy = new LinearRetry(TimeSpan.FromMilliseconds(200), 5) , ServerTimeout = DefaultTimeout ?? TimeSpan.FromSeconds(1) //, ParallelOperationThreadCount = 64 } } ; if (ContainerId == null) { ContainerId = AzureStorageHelper.GetEnum <DataCollectionSupport>(Support).StringValue; } ContainerId = StorageServiceBase.ValidateAzureContainerName(ContainerId); // Retrieve a reference to the table. Table = Client.GetTableReference(ContainerId); // Create the table if it doesn't exist. Table.CreateIfNotExists(); }
public override void Initialize() { if (ContainerId == null) { ContainerId = AzureStorageHelper.GetEnum <DataCollectionSupport>(Support).StringValue; } throw new NotImplementedException(); }
/// <summary> /// This method initializes the connector. /// </summary> public override void Initialize() { Client = StorageAccount.CreateCloudQueueClient(); if (RequestOptionsDefault != null) { Client.DefaultRequestOptions = RequestOptionsDefault; } if (ContainerId == null) { ContainerId = AzureStorageHelper.GetEnum <DataCollectionSupport>(Support).StringValue; } ContainerId = StorageServiceBase.ValidateAzureContainerName(ContainerId); Queue = Client.GetQueueReference(ContainerId); Queue.CreateIfNotExistsAsync().Wait(); }
public override void Initialize() { Client = StorageAccount.CreateCloudTableClient(); if (RequestOptionsDefault != null) { Client.DefaultRequestOptions = RequestOptionsDefault; } if (ContainerId == null) { ContainerId = AzureStorageHelper.GetEnum <DataCollectionSupport>(Support).StringValue; } ContainerId = StorageServiceBase.ValidateAzureContainerName(ContainerId); // Retrieve a reference to the table. Table = Client.GetTableReference(ContainerId); // Create the table if it doesn't exist. Table.CreateIfNotExists(); }