diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs index 020c15bcd31b6..b253e5b34d6ce 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs @@ -279,8 +279,10 @@ protected virtual BlobBaseClient WithSnapshotImpl(string snapshot) /// A will be thrown if /// a failure occurs. /// +#pragma warning disable AZC0002 // Client method should have cancellationToken as the last optional parameter public virtual Response Download() => this.Download(CancellationToken.None); +#pragma warning restore AZC0002 // Client method should have cancellationToken as the last optional parameter /// /// The operation downloads a blob from @@ -297,8 +299,10 @@ public virtual Response Download() => /// A will be thrown if /// a failure occurs. /// +#pragma warning disable AZC0002 // Client method should have cancellationToken as the last optional parameter public virtual async Task> DownloadAsync() => await this.DownloadAsync(CancellationToken.None).ConfigureAwait(false); +#pragma warning restore AZC0002 // Client method should have cancellationToken as the last optional parameter /// /// The operation downloads @@ -345,12 +349,14 @@ public virtual Response Download( /// A will be thrown if /// a failure occurs. /// +#pragma warning disable AZC0002 // Client method should have cancellationToken as the last optional parameter public virtual async Task> DownloadAsync( CancellationToken cancellationToken) => await this.DownloadAsync( accessConditions: default, // Pass anything else so we don't recurse on this overload cancellationToken: cancellationToken) .ConfigureAwait(false); +#pragma warning restore AZC0002 // Client method should have cancellationToken as the last optional parameter /// /// The diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobClient.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobClient.cs index fb98078ed43bb..85c8bb8e84559 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobClient.cs @@ -189,8 +189,10 @@ internal BlobClient(Uri blobUri, HttpPipeline pipeline) /// a failure occurs. /// [ForwardsClientCalls] +#pragma warning disable AZC0002 // Client method should have cancellationToken as the last optional parameter public virtual Response Upload(Stream content) => this.Upload(content, CancellationToken.None); +#pragma warning restore AZC0002 // Client method should have cancellationToken as the last optional parameter /// /// The operation creates a new block blob @@ -216,8 +218,10 @@ public virtual Response Upload(Stream content) => /// a failure occurs. /// [ForwardsClientCalls] +#pragma warning disable AZC0002 // Client method should have cancellationToken as the last optional parameter public virtual async Task> UploadAsync(Stream content) => await this.UploadAsync(content, CancellationToken.None).ConfigureAwait(false); +#pragma warning restore AZC0002 // Client method should have cancellationToken as the last optional parameter /// /// The operation @@ -248,6 +252,7 @@ public virtual async Task> UploadAsync(Stream content) /// a failure occurs. /// [ForwardsClientCalls] +#pragma warning disable AZC0002 // Client method should have cancellationToken as the last optional parameter public virtual Response Upload( Stream content, CancellationToken cancellationToken) => @@ -255,6 +260,7 @@ public virtual Response Upload( content, blobAccessConditions: default, // Pass anything else so we don't recurse on this overload cancellationToken: cancellationToken); +#pragma warning restore AZC0002 // Client method should have cancellationToken as the last optional parameter /// /// The operation @@ -285,6 +291,7 @@ public virtual Response Upload( /// a failure occurs. /// [ForwardsClientCalls] +#pragma warning disable AZC0002 // Client method should have cancellationToken as the last optional parameter public virtual async Task> UploadAsync( Stream content, CancellationToken cancellationToken) => @@ -293,6 +300,7 @@ await this.UploadAsync( blobAccessConditions: default, // Pass anything else so we don't recurse on this overload cancellationToken: cancellationToken) .ConfigureAwait(false); +#pragma warning restore AZC0002 // Client method should have cancellationToken as the last optional parameter /// /// The diff --git a/sdk/storage/Directory.Build.props b/sdk/storage/Directory.Build.props index 5a666ee8aac1b..48aee31afa458 100644 --- a/sdk/storage/Directory.Build.props +++ b/sdk/storage/Directory.Build.props @@ -13,15 +13,12 @@ 12.0.0 $(NoWarn); - AZC0001; - AZC0002; - AZC0007; AZC0006; + AZC0007;