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

            throw new NotImplementedException();
        }
Example #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();
        }
Example #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();
        }