当前位置: 首页>>代码示例>>C#>>正文


C# StorageUri类代码示例

本文整理汇总了C#中StorageUri的典型用法代码示例。如果您正苦于以下问题:C# StorageUri类的具体用法?C# StorageUri怎么用?C# StorageUri使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


StorageUri类属于命名空间,在下文中一共展示了StorageUri类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CloudFileDirectory

        public CloudFileDirectory(StorageUri directoryAbsoluteUri, StorageCredentials credentials)
#endif
        {
            this.Metadata = new Dictionary<string, string>();
            this.Properties = new FileDirectoryProperties();
            this.ParseQueryAndVerify(directoryAbsoluteUri, credentials);
        }
开发者ID:benaadams,项目名称:azure-storage-net,代码行数:7,代码来源:CloudFileDirectory.Common.cs

示例2: CloudQueue

        public CloudQueue(StorageUri queueAddress, StorageCredentials credentials)
#endif
        {
            this.ParseQueryAndVerify(queueAddress, credentials);
            this.Metadata = new Dictionary<string, string>();
            this.EncodeMessage = true;
        }
开发者ID:benaadams,项目名称:azure-storage-net,代码行数:7,代码来源:CloudQueue.Common.cs

示例3: CloudAnalyticsClient

        /// <summary>
        /// Initializes a new instance of the <see cref="CloudAnalyticsClient"/> class using the specified Blob and Table service endpoints
        /// and account credentials.
        /// </summary>
        /// <param name="blobStorageUri">A <see cref="StorageUri"/> object containing the Blob service endpoint to use to create the client.</param>
        /// <param name="tableStorageUri">A <see cref="StorageUri"/> object containing the Table service endpoint to use to create the client.</param>
        /// <param name="credentials">A <see cref="StorageCredentials"/> object.</param>
        public CloudAnalyticsClient(StorageUri blobStorageUri, StorageUri tableStorageUri, StorageCredentials credentials)
        {
            CommonUtility.AssertNotNull("blobStorageUri", blobStorageUri);
            CommonUtility.AssertNotNull("tableStorageUri", tableStorageUri);

            this.blobClient = new CloudBlobClient(blobStorageUri, credentials);
            this.tableClient = new CloudTableClient(tableStorageUri, credentials);
            this.LogContainer = Constants.AnalyticsConstants.LogsContainer;
        }
开发者ID:jianghaolu,项目名称:azure-storage-net,代码行数:16,代码来源:CloudAnalyticsClient.cs

示例4: CloudFileShare

 /// <summary>
 /// Initializes a new instance of the <see cref="CloudFileShare"/> class.
 /// </summary>
 /// <param name="shareAddress">The absolute URI to the share.</param>
 /// <param name="credentials">A <see cref="StorageCredentials"/> object.</param>
 public CloudFileShare(StorageUri shareAddress, StorageCredentials credentials)
 {
     CommonUtility.AssertNotNull("shareAddress", shareAddress);
     CommonUtility.AssertNotNull("shareAddress", shareAddress.PrimaryUri);
 
     this.ParseQueryAndVerify(shareAddress, credentials);
     this.Metadata = new Dictionary<string, string>();
     this.Properties = new FileShareProperties();
 }
开发者ID:tamram,项目名称:azure-storage-net,代码行数:14,代码来源:CloudFileShare.Common.cs

示例5: CloudBlobContainer

        /// <summary>
        /// Initializes a new instance of the <see cref="CloudBlobContainer"/> class.
        /// </summary>
        /// <param name="containerAddress">A <see cref="System.Uri"/> object specifying the absolute URI to the container.</param>
        /// <param name="credentials">A <see cref="StorageCredentials"/> object.</param>
        public CloudBlobContainer(StorageUri containerAddress, StorageCredentials credentials)
        {
            CommonUtility.AssertNotNull("containerAddress", containerAddress);
            CommonUtility.AssertNotNull("containerAddress", containerAddress.PrimaryUri);

            this.ParseQueryAndVerify(containerAddress, credentials);
            this.Metadata = new Dictionary<string, string>();
            this.Properties = new BlobContainerProperties();
        }
开发者ID:tamram,项目名称:azure-storage-net,代码行数:14,代码来源:CloudBlobContainer.Common.cs

示例6: CloudBlob

        /// <summary>
        /// Initializes a new instance of the <see cref="CloudBlob"/> class using an absolute URI to the blob.
        /// </summary>
        /// <param name="blobAbsoluteUri">A <see cref="StorageUri"/> containing the absolute URI to the blob at both the primary and secondary locations.</param>
        /// <param name="snapshotTime">A <see cref="DateTimeOffset"/> specifying the snapshot timestamp, if the blob is a snapshot.</param>
        /// <param name="credentials">A <see cref="StorageCredentials"/> object.</param>
        /// <returns>A <see cref="CloudBlob"/> object.</returns>
        public CloudBlob(StorageUri blobAbsoluteUri, DateTimeOffset? snapshotTime, StorageCredentials credentials)
        {
            CommonUtility.AssertNotNull("blobAbsoluteUri", blobAbsoluteUri);
            CommonUtility.AssertNotNull("blobAbsoluteUri", blobAbsoluteUri.PrimaryUri);

            this.attributes = new BlobAttributes();
            this.SnapshotTime = snapshotTime;
            this.ParseQueryAndVerify(blobAbsoluteUri, credentials);
            this.Properties.BlobType = BlobType.Unspecified;
        }
开发者ID:pemari-msft,项目名称:azure-storage-net,代码行数:17,代码来源:CloudBlob.Common.cs

示例7: CloudQueueClient

        public CloudQueueClient(StorageUri storageUri, StorageCredentials credentials)
#endif
        {
            this.StorageUri = storageUri;
            this.Credentials = credentials ?? new StorageCredentials();
            this.DefaultRequestOptions = new QueueRequestOptions();
            this.DefaultRequestOptions.RetryPolicy = new ExponentialRetry();
            this.DefaultRequestOptions.LocationMode = RetryPolicies.LocationMode.PrimaryOnly;
            this.AuthenticationScheme = AuthenticationScheme.SharedKey;
            this.UsePathStyleUris = CommonUtility.UsePathStyleAddressing(this.BaseUri);
        }
开发者ID:DaC24,项目名称:azure-storage-net,代码行数:11,代码来源:CloudQueueClient.Common.cs

示例8: CloudQueueClient

        public CloudQueueClient(StorageUri storageUri, StorageCredentials credentials)
#endif
        {
            this.StorageUri = storageUri;
            this.Credentials = credentials ?? new StorageCredentials();
            this.RetryPolicy = new ExponentialRetry();
            this.LocationMode = LocationMode.PrimaryOnly;
            this.ServerTimeout = Constants.DefaultServerSideTimeout;
            this.AuthenticationScheme = AuthenticationScheme.SharedKey;
            this.UsePathStyleUris = CommonUtility.UsePathStyleAddressing(this.BaseUri);
        }
开发者ID:BurtHarris,项目名称:azure-storage-net,代码行数:11,代码来源:CloudQueueClient.Common.cs

示例9: CloudBlobDirectory

        /// <summary>
        /// Initializes a new instance of the <see cref="CloudBlobDirectory"/> class given an address and a client.
        /// </summary>
        /// <param name="uri">The blob directory's Uri.</param>
        /// <param name="prefix">The blob directory's prefix.</param> 
        /// <param name="container">The container for the virtual directory.</param>
        internal CloudBlobDirectory(StorageUri uri, string prefix, CloudBlobContainer container)
        {
            CommonUtility.AssertNotNull("uri", uri);
            CommonUtility.AssertNotNull("prefix", prefix);
            CommonUtility.AssertNotNull("container", container);

            this.ServiceClient = container.ServiceClient;
            this.Container = container;
            this.Prefix = prefix;
            this.StorageUri = uri;
        }
开发者ID:benaadams,项目名称:azure-storage-net,代码行数:17,代码来源:CloudBlobDirectory.Common.cs

示例10: CloudFile

        /// <summary>
        /// Initializes a new instance of the <see cref="CloudFile"/> class using the specified file name and
        /// the parent share reference.
        /// </summary>
        /// <param name="uri">The file's Uri.</param>
        /// <param name="fileName">Name of the file.</param>
        /// <param name="share">The reference to the parent share.</param>
        internal CloudFile(StorageUri uri, string fileName, CloudFileShare share)
        {
            CommonUtility.AssertNotNull("uri", uri);
            CommonUtility.AssertNotNullOrEmpty("fileName", fileName);
            CommonUtility.AssertNotNull("share", share);

            this.attributes = new CloudFileAttributes();
            this.attributes.StorageUri = uri;
            this.ServiceClient = share.ServiceClient;
            this.share = share;
            this.Name = fileName;
        }
开发者ID:DaC24,项目名称:azure-storage-net,代码行数:19,代码来源:CloudFile.Common.cs

示例11: CloudFileDirectory

        /// <summary>
        /// Initializes a new instance of the <see cref="CloudFileDirectory"/> class given an address and a client.
        /// </summary>
        /// <param name="uri">The file directory's Uri.</param>
        /// <param name="directoryName">Name of the directory.</param>
        /// <param name="share">The share for the directory.</param>
        internal CloudFileDirectory(StorageUri uri, string directoryName, CloudFileShare share)
        {
            CommonUtility.AssertNotNull("uri", uri);
            CommonUtility.AssertNotNull("directoryName", directoryName);
            CommonUtility.AssertNotNull("share", share);

            this.Properties = new FileDirectoryProperties();
            this.StorageUri = uri;
            this.ServiceClient = share.ServiceClient;
            this.share = share;
            this.Name = directoryName;
        }
开发者ID:vinaysh-msft,项目名称:azure-storage-net,代码行数:18,代码来源:CloudFileDirectory.Common.cs

示例12: CloudFileClient

 /// <summary>
 /// Initializes a new instance of the <see cref="CloudFileClient"/> class using the specified File service endpoint
 /// and account credentials.
 /// </summary>
 /// <param name="storageUri">The File service endpoint to use to create the client.</param>
 /// <param name="credentials">A <see cref="StorageCredentials"/> object.</param>
 public CloudFileClient(StorageUri storageUri, StorageCredentials credentials)
 {
     this.StorageUri = storageUri;
     this.Credentials = credentials ?? new StorageCredentials();
     this.DefaultRequestOptions = 
         new FileRequestOptions() 
         { 
             RetryPolicy = new ExponentialRetry(),
             LocationMode = FileRequestOptions.BaseDefaultRequestOptions.LocationMode,
             ParallelOperationThreadCount = FileRequestOptions.BaseDefaultRequestOptions.ParallelOperationThreadCount
         };
     this.AuthenticationScheme = AuthenticationScheme.SharedKey;
     this.UsePathStyleUris = CommonUtility.UsePathStyleAddressing(this.BaseUri);
 }
开发者ID:tamram,项目名称:azure-storage-net,代码行数:20,代码来源:CloudFileClient.Common.cs

示例13: CloudBlobClient

        public CloudBlobClient(StorageUri storageUri, StorageCredentials credentials)
#endif
        {
            this.StorageUri = storageUri;
            this.Credentials = credentials ?? new StorageCredentials();
            this.DefaultRequestOptions = new BlobRequestOptions();
            this.DefaultRequestOptions.RetryPolicy = new ExponentialRetry();
            this.DefaultRequestOptions.LocationMode = RetryPolicies.LocationMode.PrimaryOnly;
            this.DefaultRequestOptions.SingleBlobUploadThresholdInBytes = Constants.MaxSingleUploadBlobSize / 2;
            this.DefaultRequestOptions.ParallelOperationThreadCount = 1;
            this.DefaultDelimiter = NavigationHelper.Slash;
            this.AuthenticationScheme = AuthenticationScheme.SharedKey;
            this.UsePathStyleUris = CommonUtility.UsePathStyleAddressing(this.BaseUri);
        }
开发者ID:DaC24,项目名称:azure-storage-net,代码行数:14,代码来源:CloudBlobClient.Common.cs

示例14: CloudBlobClient

 /// <summary>
 /// Initializes a new instance of the <see cref="CloudBlobClient"/> class using the specified Blob service endpoint
 /// and account credentials.
 /// </summary>
 /// <param name="storageUri">A <see cref="StorageUri"/> object containing the Blob service endpoint to use to create the client.</param>
 /// <param name="credentials">A <see cref="StorageCredentials"/> object.</param>
 public CloudBlobClient(StorageUri storageUri, StorageCredentials credentials)
 {
     this.StorageUri = storageUri;
     this.Credentials = credentials ?? new StorageCredentials();
     this.DefaultRequestOptions = 
         new BlobRequestOptions() 
         { 
             RetryPolicy = new ExponentialRetry(),
             LocationMode = BlobRequestOptions.BaseDefaultRequestOptions.LocationMode,
             SingleBlobUploadThresholdInBytes = BlobRequestOptions.BaseDefaultRequestOptions.SingleBlobUploadThresholdInBytes,
             ParallelOperationThreadCount = BlobRequestOptions.BaseDefaultRequestOptions.ParallelOperationThreadCount
         };
     this.DefaultDelimiter = NavigationHelper.Slash;
     this.AuthenticationScheme = AuthenticationScheme.SharedKey;
     this.UsePathStyleUris = CommonUtility.UsePathStyleAddressing(this.BaseUri);
 }
开发者ID:tamram,项目名称:azure-storage-net,代码行数:22,代码来源:CloudBlobClient.Common.cs

示例15: CloudTableClient

        /// <summary>
        /// Initializes a new instance of the <see cref="CloudTableClient"/> class using the specified Table service endpoint
        /// and account credentials.
        /// </summary>
        /// <param name="storageUri">A <see cref="StorageUri"/> object containing the Table service endpoint to use to create the client.</param>
        /// <param name="credentials">A <see cref="StorageCredentials"/> object.</param>
        public CloudTableClient(StorageUri storageUri, StorageCredentials credentials)
        {
            this.StorageUri = storageUri;
            this.Credentials = credentials ?? new StorageCredentials();
            this.DefaultRequestOptions =
                new TableRequestOptions(TableRequestOptions.BaseDefaultRequestOptions) 
                { 
                    RetryPolicy = new ExponentialRetry()
                };
            this.AuthenticationScheme = AuthenticationScheme.SharedKey;
            this.UsePathStyleUris = CommonUtility.UsePathStyleAddressing(this.BaseUri);

            if (!this.Credentials.IsSharedKey)
            {
                this.AccountName = NavigationHelper.GetAccountNameFromUri(this.BaseUri, this.UsePathStyleUris);
            }
        }
开发者ID:Gajendra-Bahakar,项目名称:azure-storage-net,代码行数:23,代码来源:CloudTableClient.Common.cs


注:本文中的StorageUri类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。