예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BlobServiceClient"/>
        /// class.
        /// </summary>
        /// <param name="connectionString">
        /// A connection string includes the authentication information
        /// required for your application to access data in an Azure Storage
        /// account at runtime.
        ///
        /// For more information, <see href="https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string"/>.
        /// </param>
        /// <param name="connectionOptions">
        /// Optional connection options that define the transport pipeline
        /// policies for authentication, retries, etc., that are applied to
        /// every request.
        /// </param>
        /// <remarks>
        /// The credentials on <paramref name="connectionString"/> will override those on <paramref name="connectionOptions"/>.
        /// </remarks>
        public BlobServiceClient(string connectionString, BlobConnectionOptions connectionOptions = default)
        {
            var conn = StorageConnectionString.Parse(connectionString);

            // TODO: perform a copy of the options instead
            var connOptions = connectionOptions ?? new BlobConnectionOptions();

            connOptions.Credentials = conn.Credentials;

            this.Uri       = conn.BlobEndpoint;
            this._pipeline = connOptions.Build();
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlobServiceClient"/>
 /// class.
 /// </summary>
 /// <param name="primaryUri">
 /// A <see cref="Uri"/> referencing the blob service.
 /// </param>
 /// <param name="connectionOptions">
 /// Optional connection options that define the transport pipeline
 /// policies for authentication, retries, etc., that are applied to
 /// every request.
 /// </param>
 public BlobServiceClient(Uri primaryUri, BlobConnectionOptions connectionOptions = default)
     : this(primaryUri, (connectionOptions ?? new BlobConnectionOptions()).Build())
 {
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockBlobClient"/>
 /// class.
 /// </summary>
 /// <param name="primaryUri">
 /// A <see cref="Uri"/> referencing the block blob that includes the
 /// name of the account, the name of the container, and the name of
 /// the blob.
 /// </param>
 /// <param name="connectionOptions">
 /// Optional connection options that define the transport pipeline
 /// policies for authentication, retries, etc., that are applied to
 /// every request.
 /// </param>
 public BlockBlobClient(Uri primaryUri, BlobConnectionOptions connectionOptions = default)
     : base(primaryUri, connectionOptions)
 {
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockBlobClient"/>
 /// class.
 /// </summary>
 /// <param name="connectionString">
 /// A connection string includes the authentication information
 /// required for your application to access data in an Azure Storage
 /// account at runtime.
 ///
 /// For more information, <see href="https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string"/>.
 /// </param>
 /// <param name="containerName">
 /// The name of the container containing this block blob.
 /// </param>
 /// <param name="blobName">
 /// The name of this block blob.
 /// </param>
 /// <param name="connectionOptions">
 /// Optional connection options that define the transport pipeline
 /// policies for authentication, retries, etc., that are applied to
 /// every request.
 /// </param>
 /// <remarks>
 /// The credentials on <paramref name="connectionString"/> will override those on <paramref name="connectionOptions"/>.
 /// </remarks>
 public BlockBlobClient(string connectionString, string containerName, string blobName, BlobConnectionOptions connectionOptions = default)
     : base(connectionString, containerName, blobName, connectionOptions)
 {
 }