예제 #1
0
        /// <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();
        }
예제 #2
0
        /// <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();
        }
예제 #3
0
        public override void Initialize()
        {
            if (ContainerId == null)
            {
                ContainerId = AzureStorageHelper.GetEnum <DataCollectionSupport>(Support).StringValue;
            }

            throw new NotImplementedException();
        }
예제 #4
0
        /// <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();
        }
예제 #5
0
        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();
        }