From e6ff65faeee000f38ac560826e66ccefabcf1801 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 16 Jul 2019 11:43:15 -0700 Subject: [PATCH 1/4] Update to a new analyzer package --- eng/Packages.Data.props | 2 +- .../src/ConfigurationClient.cs | 2 -- sdk/core/Azure.Core/src/Shared/HashCodeBuilder.cs | 1 - .../src/IssuerBase.cs | 1 - .../Azure.Security.KeyVault.Keys/src/JsonWebKey.cs | 1 - .../Azure.Security.KeyVault.Keys/src/KeyBase.cs | 2 +- .../src/KeyClientOptions.cs | 10 +++++----- .../src/KeyRequestParameters.cs | 1 - .../src/RsaKeyCreateOptions.cs | 5 ++--- .../Azure.Security.KeyVault.Secrets/src/Page.cs | 3 +-- .../Azure.Security.KeyVault.Secrets/src/SecretBase.cs | 4 ++-- 11 files changed, 12 insertions(+), 20 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 1083d0314176b..cb53794566410 100755 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -9,7 +9,7 @@ - + diff --git a/sdk/appconfiguration/Azure.ApplicationModel.Configuration/src/ConfigurationClient.cs b/sdk/appconfiguration/Azure.ApplicationModel.Configuration/src/ConfigurationClient.cs index 2b101ca868623..3fb31c2f01c0a 100644 --- a/sdk/appconfiguration/Azure.ApplicationModel.Configuration/src/ConfigurationClient.cs +++ b/sdk/appconfiguration/Azure.ApplicationModel.Configuration/src/ConfigurationClient.cs @@ -21,7 +21,6 @@ public partial class ConfigurationClient private readonly Uri _baseUri; private readonly HttpPipeline _pipeline; - /// /// Protected constructor to allow mocking /// @@ -304,7 +303,6 @@ public virtual async Task> UpdateAsync(string key return await UpdateAsync(new ConfigurationSetting(key, value, label), cancellationToken).ConfigureAwait(false); } - /// /// Updates an existing in the configuration store. /// diff --git a/sdk/core/Azure.Core/src/Shared/HashCodeBuilder.cs b/sdk/core/Azure.Core/src/Shared/HashCodeBuilder.cs index b54a295d6bcee..133e4b93ccf95 100644 --- a/sdk/core/Azure.Core/src/Shared/HashCodeBuilder.cs +++ b/sdk/core/Azure.Core/src/Shared/HashCodeBuilder.cs @@ -220,7 +220,6 @@ private static void Initialize(out uint v1, out uint v2, out uint v3, out uint v public static uint RotateLeft(uint value, int offset) => (value << offset) | (value >> (64 - offset)); - [MethodImpl(MethodImplOptions.AggressiveInlining)] private static uint Round(uint hash, uint input) { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/IssuerBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/IssuerBase.cs index eccb5f57abb9e..0ca93eb534f01 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/IssuerBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/IssuerBase.cs @@ -14,6 +14,5 @@ public class IssuerBase public DateTimeOffset Created { get; set; } public DateTimeOffset Updated { get; set; } public bool Enabled { get; set; } - } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/JsonWebKey.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/JsonWebKey.cs index df921f37885e3..1d8e10234b553 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/JsonWebKey.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/JsonWebKey.cs @@ -237,7 +237,6 @@ internal override void WriteProperties(Utf8JsonWriter json) } if (N != null) { - json.WriteString(NPropertyNameBytes, Base64Url.Encode(N)); } if (E != null) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyBase.cs index 0ca99c1561e2f..69587f248232d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyBase.cs @@ -121,7 +121,7 @@ protected void ParseId(string id) } internal override void WriteProperties(Utf8JsonWriter json) { } - + internal override void ReadProperties(JsonElement json) { foreach(JsonProperty prop in json.EnumerateObject()) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs index 60b1952f3c549..070280d4e2d0e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs @@ -14,14 +14,14 @@ public class KeyClientOptions : ClientOptions { /// /// The latest service version supported by this client library. - /// For more information, see + /// For more information, see /// /// internal const ServiceVersion LatestVersion = ServiceVersion.V7_0; /// /// The versions of Azure Key Vault supported by this client - /// library. + /// library. /// public enum ServiceVersion { @@ -35,7 +35,7 @@ public enum ServiceVersion /// /// Gets the of the service API used when - /// making requests. For more information, see + /// making requests. For more information, see /// /// public ServiceVersion Version { get; } @@ -46,13 +46,13 @@ public enum ServiceVersion /// /// /// The of the service API used when - /// making requests. + /// making requests. /// public KeyClientOptions(ServiceVersion version = ServiceVersion.V7_0) { this.Version = version; } - + internal string GetVersionString() { var version = string.Empty; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRequestParameters.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRequestParameters.cs index c8bc9f90778d5..81281d7b2cd62 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRequestParameters.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRequestParameters.cs @@ -150,6 +150,5 @@ internal override void WriteProperties(Utf8JsonWriter json) } internal override void ReadProperties(JsonElement json) { } - } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/RsaKeyCreateOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/RsaKeyCreateOptions.cs index 5ff57b7fc0cb2..b7fa12a856eef 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/RsaKeyCreateOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/RsaKeyCreateOptions.cs @@ -25,21 +25,20 @@ public class RsaKeyCreateOptions : KeyCreateOptions /// public int? KeySize { get; set; } - /// + /// /// Determines whether or not a hardware key (HSM) is used for creation. /// /// /// true to use a hardware key; false to use a software key public bool Hsm { get; private set; } - /// /// Initializes a new instance of the RsaKeyCreateOptions class. /// /// The name of the key. /// Whether to import as a hardware key (HSM) or software key. /// Key size in bits. - public RsaKeyCreateOptions(string name, bool hsm, int? keySize = null) + public RsaKeyCreateOptions(string name, bool hsm, int? keySize = null) { Name = name; Hsm = hsm; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Page.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Page.cs index 01abb2b5d79ac..6e76cb8f60100 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Page.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Page.cs @@ -52,7 +52,6 @@ internal override void ReadProperties(JsonElement json) i++; } } - } if (json.TryGetProperty("nextLink", out JsonElement nextLink)) @@ -68,7 +67,7 @@ internal override void ReadProperties(JsonElement json) internal override void WriteProperties(ref Utf8JsonWriter json) { - // serialization is not needed this type is only in responses + // serialization is not needed this type is only in responses throw new NotImplementedException(); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretBase.cs index 8012b78d202f6..7b24c3e38d0d5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretBase.cs @@ -36,7 +36,7 @@ public SecretBase(string name) /// Secret identifier. /// public Uri Id => _identifier.Id; - + /// /// Vault base URL. /// @@ -64,7 +64,7 @@ public SecretBase(string name) public bool? Managed { get; private set; } /// - /// If this is a secret backing a KV certificate, then this field specifies + /// If this is a secret backing a KV certificate, then this field specifies /// the corresponding key backing the KV certificate. /// public string KeyId { get; private set; } From e36626d9f481ff286203a8ac6e82d434f3f114a5 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 16 Jul 2019 12:10:55 -0700 Subject: [PATCH 2/4] Storage --- .../src/AppendBlobClient.cs | 38 ++-- .../Azure.Storage.Blobs/src/BlobUriBuilder.cs | 10 +- .../src/BlockBlobClient.cs | 166 +++++++++--------- .../Azure.Storage.Blobs/src/LeaseClient.cs | 80 ++++----- .../src/Models/AccessConditions.cs | 22 +-- .../src/Models/CustomerProvidedKeyInfo.cs | 1 - .../Azure.Storage.Blobs/src/PageBlobClient.cs | 130 +++++++------- .../src/Sas/BlobSasBuilder.cs | 62 +++---- .../src/Sas/ContainerSasPermissions.cs | 4 +- .../src/LoggingExtensions.cs | 4 +- .../src/Sas/AccountSasPermissions.cs | 1 - .../src/StorageAsyncCollection.cs | 4 +- .../src/StorageConnectionString.cs | 14 +- .../src/StreamPartitioner.cs | 4 +- .../src/FileServiceClient.cs | 34 ++-- .../src/Sas/FileSasBuilder.cs | 28 +-- .../src/Sas/FileSasPermissions.cs | 2 +- .../src/QueueServiceClient.cs | 22 +-- .../src/QueueUriBuilder.cs | 13 +- .../src/Sas/QueueSasBuilder.cs | 34 ++-- .../src/Sas/QueueSasPermissions.cs | 2 +- sdk/storage/Directory.Build.props | 10 +- 22 files changed, 344 insertions(+), 341 deletions(-) diff --git a/sdk/storage/Azure.Storage.Blobs/src/AppendBlobClient.cs b/sdk/storage/Azure.Storage.Blobs/src/AppendBlobClient.cs index 5b13057cc1263..8c4331207111b 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/AppendBlobClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/AppendBlobClient.cs @@ -18,13 +18,13 @@ namespace Azure.Storage.Blobs.Specialized /// /// The allows you to manipulate Azure /// Storage append blobs. - /// + /// /// An append blob is comprised of blocks and is optimized for append /// operations. When you modify an append blob, blocks are added to the /// end of the blob only, via the /// operation. Updating or deleting of existing blocks is not supported. /// Unlike a block blob, an append blob does not expose its block IDs. - /// + /// /// Each block in an append blob can be a different size, up to a maximum /// of 4 MB, and an append blob can include up to 50,000 blocks. The /// maximum size of an append blob is therefore slightly more than 195 GB @@ -56,12 +56,12 @@ protected AppendBlobClient() /// /// Initializes a new instance of the /// class. - /// + /// /// /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. - /// + /// /// For more information, . /// /// @@ -78,12 +78,12 @@ public AppendBlobClient(string connectionString, string containerName, string bl /// /// Initializes a new instance of the /// class. - /// + /// /// /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. - /// + /// /// For more information, . /// /// @@ -187,7 +187,7 @@ internal AppendBlobClient(Uri blobUri, HttpPipeline pipeline) /// Initializes a new instance of the /// class with an identical source but the specified /// timestamp. - /// + /// /// For more information, see . /// /// The snapshot identifier. @@ -208,7 +208,7 @@ internal AppendBlobClient(Uri blobUri, HttpPipeline pipeline) /// append blob. The content of any existing blob is overwritten with /// the newly initialized append blob. To add content to the append /// blob, call the operation. - /// + /// /// For more information, see . /// /// @@ -252,7 +252,7 @@ public virtual Response Create( /// append blob. The content of any existing blob is overwritten with /// the newly initialized append blob. To add content to the append /// blob, call the operation. - /// + /// /// For more information, see . /// /// @@ -296,7 +296,7 @@ await this.CreateInternal( /// append blob. The content of any existing blob is overwritten with /// the newly initialized append blob. To add content to the append /// blob, call the operation. - /// + /// /// For more information, see . /// /// @@ -382,7 +382,7 @@ private async Task> CreateInternal( /// to the end of the existing append blob. The /// operation is only permitted if the blob was created as an append /// blob. - /// + /// /// For more information, see . /// /// @@ -438,7 +438,7 @@ public virtual Response AppendBlock( /// to the end of the existing append blob. The /// operation is only permitted if the blob was created as an append /// blob. - /// + /// /// For more information, see . /// /// @@ -494,7 +494,7 @@ await this.AppendBlockInternal( /// to the end of the existing append blob. The /// operation is only permitted if the blob was created as an append /// blob. - /// + /// /// For more information, see . /// /// @@ -534,8 +534,8 @@ await this.AppendBlockInternal( /// private async Task> AppendBlockInternal( Stream content, - byte[] transactionalContentHash, - AppendBlobAccessConditions? accessConditions, + byte[] transactionalContentHash, + AppendBlobAccessConditions? accessConditions, IProgress progressHandler, bool async, CancellationToken cancellationToken) @@ -572,7 +572,7 @@ private async Task> AppendBlockInternal( ifModifiedSince: accessConditions?.HttpAccessConditions?.IfModifiedSince, ifUnmodifiedSince: accessConditions?.HttpAccessConditions?.IfUnmodifiedSince, ifMatch: accessConditions?.HttpAccessConditions?.IfMatch, - ifNoneMatch: accessConditions?.HttpAccessConditions?.IfNoneMatch, + ifNoneMatch: accessConditions?.HttpAccessConditions?.IfNoneMatch, async: async, cancellationToken: cancellationToken); }, @@ -599,7 +599,7 @@ private async Task> AppendBlockInternal( /// to the end of the existing append blob. The /// operation is only permitted /// if the blob was created as an append blob. - /// + /// /// For more information, see . /// /// @@ -668,7 +668,7 @@ public virtual Response AppendBlockFromUri( /// to the end of the existing append blob. The /// operation is only permitted /// if the blob was created as an append blob. - /// + /// /// For more information, see . /// /// @@ -737,7 +737,7 @@ await this.AppendBlockFromUriInternal( /// to the end of the existing append blob. The /// operation is only permitted /// if the blob was created as an append blob. - /// + /// /// For more information, see . /// /// diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobUriBuilder.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobUriBuilder.cs index 35bf13bd7f20f..c4d43a00489fe 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobUriBuilder.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobUriBuilder.cs @@ -9,10 +9,10 @@ namespace Azure.Storage.Blobs { /// - /// The class provides a convenient way to + /// The class provides a convenient way to /// modify the contents of a instance to point to /// different Azure Storage resources like an account, container, or blob. - /// + /// /// For more information, see . /// internal struct BlobUriBuilder : IEquatable @@ -83,7 +83,7 @@ internal struct BlobUriBuilder : IEquatable /// /// Initializes a new instance of the - /// class with the specified . + /// class with the specified . /// /// /// The to a storage resource. @@ -120,7 +120,7 @@ public BlobUriBuilder(Uri uri) // Slash not found; path has account name & no container name if (accountEndIndex == -1) { - this.AccountName = path; + this.AccountName = path; startIndex = path.Length; } else @@ -173,7 +173,7 @@ public BlobUriBuilder(Uri uri) /// /// Construct a representing the /// 's fields. The - /// property contains the SAS, snapshot, and unparsed query parameters. + /// property contains the SAS, snapshot, and unparsed query parameters. /// /// The constructed . public Uri ToUri() diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlockBlobClient.cs b/sdk/storage/Azure.Storage.Blobs/src/BlockBlobClient.cs index 850dd37fac9f5..67acbd55b4117 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlockBlobClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlockBlobClient.cs @@ -20,55 +20,55 @@ namespace Azure.Storage.Blobs.Specialized /// /// The allows you to manipulate Azure /// Storage block blobs. - /// + /// /// Block blobs let you upload large blobs efficiently. Block blobs are /// comprised of blocks, each of which is identified by a block ID. You - /// create or modify a block blob by writing a set of blocks and - /// committing them by their block IDs. Each block can be a different - /// size, up to a maximum of 100 MB (4 MB for requests using REST versions - /// before 2016-05-31), and a block blob can include up to 50,000 blocks. - /// The maximum size of a block blob is therefore slightly more than 4.75 - /// TB (100 MB X 50,000 blocks). If you are writing a block blob that is - /// no more than 256 MB in size, you can upload it in its entirety with a + /// create or modify a block blob by writing a set of blocks and + /// committing them by their block IDs. Each block can be a different + /// size, up to a maximum of 100 MB (4 MB for requests using REST versions + /// before 2016-05-31), and a block blob can include up to 50,000 blocks. + /// The maximum size of a block blob is therefore slightly more than 4.75 + /// TB (100 MB X 50,000 blocks). If you are writing a block blob that is + /// no more than 256 MB in size, you can upload it in its entirety with a /// single write operation; see . - /// - /// When you upload a block to a blob in your storage account, it is - /// associated with the specified block blob, but it does not become part - /// of the blob until you commit a list of blocks that includes the new - /// block's ID. New blocks remain in an uncommitted state until they are - /// specifically committed or discarded. Writing a block does not update + /// + /// When you upload a block to a blob in your storage account, it is + /// associated with the specified block blob, but it does not become part + /// of the blob until you commit a list of blocks that includes the new + /// block's ID. New blocks remain in an uncommitted state until they are + /// specifically committed or discarded. Writing a block does not update /// the last modified time of an existing blob. - /// - /// Block blobs include features that help you manage large files over - /// networks. With a block blob, you can upload multiple blocks in - /// parallel to decrease upload time. Each block can include an MD5 hash - /// to verify the transfer, so you can track upload progress and re-send - /// blocks as needed.You can upload blocks in any order, and determine - /// their sequence in the final block list commitment step. You can also - /// upload a new block to replace an existing uncommitted block of the - /// same block ID. You have one week to commit blocks to a blob before - /// they are discarded. All uncommitted blocks are also discarded when a + /// + /// Block blobs include features that help you manage large files over + /// networks. With a block blob, you can upload multiple blocks in + /// parallel to decrease upload time. Each block can include an MD5 hash + /// to verify the transfer, so you can track upload progress and re-send + /// blocks as needed.You can upload blocks in any order, and determine + /// their sequence in the final block list commitment step. You can also + /// upload a new block to replace an existing uncommitted block of the + /// same block ID. You have one week to commit blocks to a blob before + /// they are discarded. All uncommitted blocks are also discarded when a /// block list commitment operation occurs but does not include them. - /// - /// You can modify an existing block blob by inserting, replacing, or - /// deleting existing blocks. After uploading the block or blocks that - /// have changed, you can commit a new version of the blob by committing - /// the new blocks with the existing blocks you want to keep using a - /// single commit operation. To insert the same range of bytes in two - /// different locations of the committed blob, you can commit the same - /// block in two places within the same commit operation.For any commit - /// operation, if any block is not found, the entire commitment operation - /// fails with an error, and the blob is not modified. Any block commitment - /// overwrites the blob’s existing properties and metadata, and discards + /// + /// You can modify an existing block blob by inserting, replacing, or + /// deleting existing blocks. After uploading the block or blocks that + /// have changed, you can commit a new version of the blob by committing + /// the new blocks with the existing blocks you want to keep using a + /// single commit operation. To insert the same range of bytes in two + /// different locations of the committed blob, you can commit the same + /// block in two places within the same commit operation.For any commit + /// operation, if any block is not found, the entire commitment operation + /// fails with an error, and the blob is not modified. Any block commitment + /// overwrites the blob’s existing properties and metadata, and discards /// all uncommitted blocks. - /// + /// /// Block IDs are strings of equal length within a blob. Block client code /// usually uses base-64 encoding to normalize strings into equal lengths. /// When using base-64 encoding, the pre-encoded string must be 64 bytes /// or less. Block ID values can be duplicated in different blobs. A /// blob can have up to 100,000 uncommitted blocks, but their total size /// cannot exceed 200,000 MB. - /// + /// /// If you write a block for a blob that does not exist, a new block blob /// is created, with a length of zero bytes. This blob will appear in /// blob lists that include uncommitted blobs. If you don’t commit any @@ -115,7 +115,7 @@ protected BlockBlobClient() /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. - /// + /// /// For more information, . /// /// @@ -137,7 +137,7 @@ public BlockBlobClient(string connectionString, string containerName, string blo /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. - /// + /// /// For more information, . /// /// @@ -241,7 +241,7 @@ internal BlockBlobClient(Uri blobUri, HttpPipeline pipeline) /// Initializes a new instance of the /// class with an identical source but the specified /// timestamp. - /// + /// /// For more information, see . /// /// The snapshot identifier. @@ -286,13 +286,13 @@ protected sealed override BlobBaseClient WithSnapshotImpl(string snapshot) /// The operation creates a new block blob, /// or updates the content of an existing block blob. Updating an /// existing block blob overwrites any existing metadata on the blob. - /// + /// /// Partial updates are not supported with ; /// the content of the existing blob is overwritten with the content /// of the new blob. To perform a partial update of the content of a - /// block blob, use the and + /// block blob, use the and /// operations. - /// + /// /// For more information, see . /// /// @@ -346,13 +346,13 @@ public virtual Response Upload( /// The operation creates a new block blob, /// or updates the content of an existing block blob. Updating an /// existing block blob overwrites any existing metadata on the blob. - /// + /// /// Partial updates are not supported with ; /// the content of the existing blob is overwritten with the content /// of the new blob. To perform a partial update of the content of a - /// block blob, use the and + /// block blob, use the and /// operations. - /// + /// /// For more information, see . /// /// @@ -406,13 +406,13 @@ await this.UploadInternal( /// The operation creates a new block blob, /// or updates the content of an existing block blob. Updating an /// existing block blob overwrites any existing metadata on the blob. - /// + /// /// Partial updates are not supported with ; /// the content of the existing blob is overwritten with the content /// of the new blob. To perform a partial update of the content of a - /// block blob, use the and + /// block blob, use the and /// operations. - /// + /// /// For more information, see . /// /// @@ -496,7 +496,7 @@ internal async Task> UploadInternal( }, new ReliabilityConfiguration(reset: () => content.Seek(0, SeekOrigin.Begin))) .ConfigureAwait(false); ; - + } catch (Exception ex) { @@ -516,14 +516,14 @@ internal async Task> UploadInternal( /// The operation creates a new block as /// part of a block blob's "staging area" to be eventually committed /// via the operation. - /// + /// /// For more information, see . /// /// /// A valid Base64 string value that identifies the block. Prior to /// encoding, the string must be less than or equal to 64 bytes in /// size. - /// + /// /// For a given blob, the length of the value specified for the /// blockid parameter must be the same size for each block. Note that /// the Base64 string must be URL-encoded. @@ -581,14 +581,14 @@ public virtual Response StageBlock( /// The operation creates a new block as /// part of a block blob's "staging area" to be eventually committed /// via the operation. - /// + /// /// For more information, see . /// /// /// A valid Base64 string value that identifies the block. Prior to /// encoding, the string must be less than or equal to 64 bytes in /// size. - /// + /// /// For a given blob, the length of the value specified for the /// blockid parameter must be the same size for each block. Note that /// the Base64 string must be URL-encoded. @@ -646,14 +646,14 @@ await this.StageBlockInternal( /// The operation creates a new block /// as part of a block blob's "staging area" to be eventually committed /// via the operation. - /// + /// /// For more information, see . /// /// /// A valid Base64 string value that identifies the block. Prior to /// encoding, the string must be less than or equal to 64 bytes in /// size. - /// + /// /// For a given blob, the length of the value specified for the /// blockid parameter must be the same size for each block. Note that /// the Base64 string must be URL-encoded. @@ -694,9 +694,9 @@ await this.StageBlockInternal( /// a failure occurs. /// internal async Task> StageBlockInternal( - string base64BlockId, - Stream content, - byte[] transactionalContentHash, + string base64BlockId, + Stream content, + byte[] transactionalContentHash, LeaseAccessConditions? leaseAccessConditions, IProgress progressHandler, bool async, @@ -753,9 +753,9 @@ internal async Task> StageBlockInternal( #region StageBlockFromUri /// /// The operation creates a new - /// block to be committed as part of a blob where the contents are + /// block to be committed as part of a blob where the contents are /// read from the . - /// + /// /// For more information, see . /// /// @@ -775,8 +775,8 @@ internal async Task> StageBlockInternal( /// /// /// Optionally uploads only the bytes of the blob in the - /// in the specified range. If this is - /// not specified, the entire source blob contents are uploaded as a + /// in the specified range. If this is + /// not specified, the entire source blob contents are uploaded as a /// single block. /// /// @@ -830,9 +830,9 @@ public virtual Response StageBlockFromUri( /// /// The operation creates a new - /// block to be committed as part of a blob where the contents are + /// block to be committed as part of a blob where the contents are /// read from the . - /// + /// /// For more information, see . /// /// @@ -852,8 +852,8 @@ public virtual Response StageBlockFromUri( /// /// /// Optionally uploads only the bytes of the blob in the - /// in the specified range. If this is - /// not specified, the entire source blob contents are uploaded as a + /// in the specified range. If this is + /// not specified, the entire source blob contents are uploaded as a /// single block. /// /// @@ -907,9 +907,9 @@ await this.StageBlockFromUriInternal( /// /// The operation creates a new - /// block to be committed as part of a blob where the contents are + /// block to be committed as part of a blob where the contents are /// read from the . - /// + /// /// For more information, see . /// /// @@ -929,8 +929,8 @@ await this.StageBlockFromUriInternal( /// /// /// Optionally uploads only the bytes of the blob in the - /// in the specified range. If this is - /// not specified, the entire source blob contents are uploaded as a + /// in the specified range. If this is + /// not specified, the entire source blob contents are uploaded as a /// single block. /// /// @@ -1031,14 +1031,14 @@ private async Task> StageBlockFromUriInternal( /// most recently uploaded version of the block, whichever list it /// may belong to. Any blocks not specified in the block list and /// permanently deleted. - /// + /// /// For more information, see /// /// /// Specify the Uncommitted Base64 encoded block IDs to indicate that /// the blob service should search only the uncommitted block list for /// the named blocks. If the block is not found in the uncommitted - /// block list, it will not be written as part of the blob, and a + /// block list, it will not be written as part of the blob, and a /// will be thrown. /// /// @@ -1092,14 +1092,14 @@ public virtual Response CommitBlockList( /// most recently uploaded version of the block, whichever list it /// may belong to. Any blocks not specified in the block list and /// permanently deleted. - /// + /// /// For more information, see /// /// /// Specify the Uncommitted Base64 encoded block IDs to indicate that /// the blob service should search only the uncommitted block list for /// the named blocks. If the block is not found in the uncommitted - /// block list, it will not be written as part of the blob, and a + /// block list, it will not be written as part of the blob, and a /// will be thrown. /// /// @@ -1153,14 +1153,14 @@ await this.CommitBlockListInternal( /// most recently uploaded version of the block, whichever list it /// may belong to. Any blocks not specified in the block list and /// permanently deleted. - /// + /// /// For more information, see /// /// /// Specify the Uncommitted Base64 encoded block IDs to indicate that /// the blob service should search only the uncommitted block list for /// the named blocks. If the block is not found in the uncommitted - /// block list, it will not be written as part of the blob, and a + /// block list, it will not be written as part of the blob, and a /// will be thrown. /// /// @@ -1252,10 +1252,10 @@ internal async Task> CommitBlockListInternal( /// Uncommitted Block list has blocks that have been uploaded for a /// blob using , but that have not yet /// been committed. These blocks are stored in Azure in association - /// with a blob, but do not yet form part of the blob. + /// with a blob, but do not yet form part of the blob. /// /// - /// Specifies whether to return the list of committed blocks, the + /// Specifies whether to return the list of committed blocks, the /// list of uncommitted blocks, or both lists together. If you omit /// this parameter, Get Block List returns the list of committed blocks. /// @@ -1302,10 +1302,10 @@ public virtual Response GetBlockList( /// Uncommitted Block list has blocks that have been uploaded for a /// blob using , but that have not yet /// been committed. These blocks are stored in Azure in association - /// with a blob, but do not yet form part of the blob. + /// with a blob, but do not yet form part of the blob. /// /// - /// Specifies whether to return the list of committed blocks, the + /// Specifies whether to return the list of committed blocks, the /// list of uncommitted blocks, or both lists together. If you omit /// this parameter, Get Block List returns the list of committed blocks. /// @@ -1352,10 +1352,10 @@ await this.GetBlockListInternal( /// Uncommitted Block list has blocks that have been uploaded for a /// blob using , but that have not yet /// been committed. These blocks are stored in Azure in association - /// with a blob, but do not yet form part of the blob. + /// with a blob, but do not yet form part of the blob. /// /// - /// Specifies whether to return the list of committed blocks, the + /// Specifies whether to return the list of committed blocks, the /// list of uncommitted blocks, or both lists together. If you omit /// this parameter, Get Block List returns the list of committed blocks. /// diff --git a/sdk/storage/Azure.Storage.Blobs/src/LeaseClient.cs b/sdk/storage/Azure.Storage.Blobs/src/LeaseClient.cs index 5833d4e79c2d7..df7ded7748129 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/LeaseClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/LeaseClient.cs @@ -122,13 +122,13 @@ private void EnsureClient() /// The operation acquires a lease on /// the blob or container. The lease must /// be between 15 to 60 seconds, or infinite (-1). - /// + /// /// If the container does not have an active lease, the Blob service /// creates a lease on the blob or container and returns it. If the /// container has an active lease, you can only request a new lease /// using the active lease ID as , but you can /// specify a new . - /// + /// /// For more information, see . /// /// @@ -167,13 +167,13 @@ public virtual Response Acquire( /// The operation acquires a lease on /// the blob or container. The lease must /// be between 15 to 60 seconds, or infinite (-1). - /// + /// /// If the container does not have an active lease, the Blob service /// creates a lease on the blob or container and returns it. If the /// container has an active lease, you can only request a new lease /// using the active lease ID as , but you can /// specify a new . - /// + /// /// For more information, see . /// /// @@ -212,13 +212,13 @@ await this.AcquireInternal( /// The operation acquires a lease on /// the blob or container. The lease must /// be between 15 to 60 seconds, or infinite (-1). - /// + /// /// If the container does not have an active lease, the Blob service /// creates a lease on the blob or container and returns it. If the /// container has an active lease, you can only request a new lease /// using the active lease ID as , but you can /// specify a new . - /// + /// /// For more information, see . /// /// @@ -314,13 +314,13 @@ private async Task> AcquireInternal( /// /// The operation renews the blob or /// container's previously-acquired lease. - /// + /// /// The lease can be renewed if the leaseId /// matches that associated with the blob or container. Note that the] - /// lease may be renewed even if it has expired as long as the blob or + /// lease may be renewed even if it has expired as long as the blob or /// container has not been leased again since the expiration of that /// lease. When you renew a lease, the lease duration clock resets. - /// + /// /// For more information, see . /// /// @@ -350,13 +350,13 @@ public virtual Response Renew( /// /// The operation renews the blob or /// container's previously-acquired lease. - /// + /// /// The lease can be renewed if the leaseId /// matches that associated with the blob or container. Note that the] - /// lease may be renewed even if it has expired as long as the blob or + /// lease may be renewed even if it has expired as long as the blob or /// container has not been leased again since the expiration of that /// lease. When you renew a lease, the lease duration clock resets. - /// + /// /// For more information, see . /// /// @@ -386,13 +386,13 @@ await this.RenewInternal( /// /// The operation renews the blob or /// container's previously-acquired lease. - /// + /// /// The lease can be renewed if the leaseId /// matches that associated with the blob or container. Note that the] - /// lease may be renewed even if it has expired as long as the blob or + /// lease may be renewed even if it has expired as long as the blob or /// container has not been leased again since the expiration of that /// lease. When you renew a lease, the lease duration clock resets. - /// + /// /// For more information, see . /// /// @@ -476,14 +476,14 @@ private async Task> RenewInternal( #region Release /// - /// The operation releases the + /// The operation releases the /// container or blob's previously-acquired lease. - /// + /// /// The lease may be released if the /// matches that associated with the container or blob. Releasing the /// lease allows another client to immediately acquire the lease for the /// container or blob as soon as the release is complete. - /// + /// /// For more information, see . /// /// @@ -512,14 +512,14 @@ public virtual Response Release( .EnsureCompleted(); /// - /// The operation releases the + /// The operation releases the /// container or blob's previously-acquired lease. - /// + /// /// The lease may be released if the /// matches that associated with the container or blob. Releasing the /// lease allows another client to immediately acquire the lease for the /// container or blob as soon as the release is complete. - /// + /// /// For more information, see . /// /// @@ -548,14 +548,14 @@ await this.ReleaseInternal( .ConfigureAwait(false); /// - /// The operation releases the + /// The operation releases the /// container or blob's previously-acquired lease. - /// + /// /// The lease may be released if the /// matches that associated with the container or blob. Releasing the /// lease allows another client to immediately acquire the lease for the /// container or blob as soon as the release is complete. - /// + /// /// For more information, see . /// /// @@ -619,7 +619,7 @@ await BlobRestClient.Blob.ReleaseLeaseAsync( nameof(HttpAccessConditions.IfMatch), nameof(HttpAccessConditions.IfNoneMatch)); } - var response = + var response = await BlobRestClient.Container.ReleaseLeaseAsync( this.Pipeline, this.Uri, @@ -649,10 +649,10 @@ await BlobRestClient.Container.ReleaseLeaseAsync( #region Change /// - /// The operation changes the lease + /// The operation changes the lease /// of an active lease. A change must include the current /// and a new . - /// + /// /// For more information, see . /// /// @@ -687,10 +687,10 @@ public virtual Response Change( .EnsureCompleted(); /// - /// The operation changes the lease + /// The operation changes the lease /// of an active lease. A change must include the current /// and a new . - /// + /// /// For more information, see . /// /// @@ -725,10 +725,10 @@ await this.ChangeInternal( .ConfigureAwait(false); /// - /// The operation changes the lease + /// The operation changes the lease /// of an active lease. A change must include the current /// and a new . - /// + /// /// For more information, see . /// /// @@ -824,7 +824,7 @@ private async Task> ChangeInternal( /// /// The operation breaks the blob or /// container's previously-acquired lease (if it exists). - /// + /// /// Once a lease is broken, it cannot be renewed. Any authorized /// request can break the lease; the request is not required to /// specify a matching lease ID. When a lease is broken, the lease @@ -834,11 +834,11 @@ private async Task> ChangeInternal( /// performed on the blob or container. When a lease is successfully /// broken, the response indicates the interval in seconds until a new /// lease can be acquired. - /// + /// /// A lease that has been broken can also be released. A client can /// immediately acquire a blob or container lease that has been /// released. - /// + /// /// For more information, see . /// /// @@ -880,7 +880,7 @@ public virtual Response Break( /// /// The operation breaks the blob or /// container's previously-acquired lease (if it exists). - /// + /// /// Once a lease is broken, it cannot be renewed. Any authorized /// request can break the lease; the request is not required to /// specify a matching lease ID. When a lease is broken, the lease @@ -890,11 +890,11 @@ public virtual Response Break( /// performed on the blob or container. When a lease is successfully /// broken, the response indicates the interval in seconds until a new /// lease can be acquired. - /// + /// /// A lease that has been broken can also be released. A client can /// immediately acquire a blob or container lease that has been /// released. - /// + /// /// For more information, see . /// /// @@ -936,7 +936,7 @@ await this.BreakInternal( /// /// The operation breaks the blob or /// container's previously-acquired lease (if it exists). - /// + /// /// Once a lease is broken, it cannot be renewed. Any authorized /// request can break the lease; the request is not required to /// specify a matching lease ID. When a lease is broken, the lease @@ -946,11 +946,11 @@ await this.BreakInternal( /// performed on the blob or container. When a lease is successfully /// broken, the response indicates the interval in seconds until a new /// lease can be acquired. - /// + /// /// A lease that has been broken can also be released. A client can /// immediately acquire a blob or container lease that has been /// released. - /// + /// /// For more information, see . /// /// diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/AccessConditions.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/AccessConditions.cs index c689de498b788..1e2addb6b03d4 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/AccessConditions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/AccessConditions.cs @@ -19,7 +19,7 @@ public struct HttpAccessConditions : IEquatable /// /// Optionally limit requests to resources that have remained - /// unmodified + /// unmodified /// public DateTimeOffset? IfUnmodifiedSince { get; set; } @@ -87,7 +87,7 @@ public bool Equals(HttpAccessConditions other) /// /// A string representation of the HttpAccessConditions. /// - public override string ToString() + public override string ToString() => $"[{nameof(HttpAccessConditions)}:{nameof(this.IfModifiedSince)}={this.IfModifiedSince};{nameof(this.IfUnmodifiedSince)}={this.IfUnmodifiedSince};{nameof(this.IfMatch)}={this.IfMatch};{nameof(this.IfNoneMatch)}={this.IfNoneMatch}]"; } @@ -156,7 +156,7 @@ public bool Equals(ContainerAccessConditions other) /// /// A string representation of the ContainerAccessConditions. /// - public override string ToString() + public override string ToString() => $"[{nameof(ContainerAccessConditions)}:{nameof(this.HttpAccessConditions)}={this.HttpAccessConditions};{nameof(this.LeaseAccessConditions)}={this.LeaseAccessConditions}]"; } @@ -218,13 +218,13 @@ public bool Equals(BlobAccessConditions other) ; /// - /// Converts the value of the current BlobAccessConditions object to + /// Converts the value of the current BlobAccessConditions object to /// its equivalent string representation. /// /// /// A string representation of the BlobAccessConditions. /// - public override string ToString() + public override string ToString() => $"[{nameof(BlobAccessConditions)}:{nameof(this.HttpAccessConditions)}={this.HttpAccessConditions};{nameof(this.LeaseAccessConditions)}={this.LeaseAccessConditions}]"; } @@ -279,13 +279,13 @@ public bool Equals(LeaseAccessConditions other) => this.LeaseId == other.LeaseId; /// - /// Converts the value of the current HttpAccessConditions object to + /// Converts the value of the current HttpAccessConditions object to /// its equivalent string representation. /// /// /// A string representation of the HttpAccessConditions. /// - public override string ToString() + public override string ToString() => $"[{nameof(LeaseAccessConditions)}:{nameof(this.LeaseId)}={this.LeaseId}]"; } @@ -303,7 +303,7 @@ public struct AppendBlobAccessConditions : IEquatable public LeaseAccessConditions? LeaseAccessConditions { get; set; } - + /// /// IfAppendPositionEqual ensures that the AppendBlock operation /// succeeds only if the append position is equal to a value. @@ -365,13 +365,13 @@ public bool Equals(AppendBlobAccessConditions other) ; /// - /// Converts the value of the current AppendBlobAccessConditions + /// Converts the value of the current AppendBlobAccessConditions /// object to its equivalent string representation. /// /// /// A string representation of the AppendBlobAccessConditions. /// - public override string ToString() + public override string ToString() => $"[{nameof(AppendBlobAccessConditions)}:{nameof(this.HttpAccessConditions)}={this.HttpAccessConditions};{nameof(this.LeaseAccessConditions)}={this.LeaseAccessConditions};{nameof(this.IfAppendPositionEqual)}={this.IfAppendPositionEqual};{nameof(this.IfMaxSizeLessThanOrEqual)}={this.IfMaxSizeLessThanOrEqual}]"; } @@ -459,7 +459,7 @@ public bool Equals(PageBlobAccessConditions other) ; /// - /// Converts the value of the current PageBlobAccessConditions object + /// Converts the value of the current PageBlobAccessConditions object /// to its equivalent string representation. /// /// diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/CustomerProvidedKeyInfo.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/CustomerProvidedKeyInfo.cs index 65f5088b7c23f..76f172c220888 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/CustomerProvidedKeyInfo.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/CustomerProvidedKeyInfo.cs @@ -12,7 +12,6 @@ internal struct CustomerProvidedKeyInfo : IEquatable public string EncryptionKey { get; set; } public string EncryptionKeySha256 { get; set; } - public override bool Equals(object obj) => obj is CustomerProvidedKeyInfo other && this.Equals(other); diff --git a/sdk/storage/Azure.Storage.Blobs/src/PageBlobClient.cs b/sdk/storage/Azure.Storage.Blobs/src/PageBlobClient.cs index 7f80e8ae827a4..dece55f39e9b3 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/PageBlobClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/PageBlobClient.cs @@ -18,7 +18,7 @@ namespace Azure.Storage.Blobs.Specialized /// /// The allows you to manipulate Azure /// Storage page blobs. - /// + /// /// Page blobs are a collection of 512-byte pages optimized for random /// read and write operations. To create a page blob, you initialize the /// page blob and specify the maximum size the page blob will grow. To add @@ -61,7 +61,7 @@ protected PageBlobClient() /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. - /// + /// /// For more information, . /// /// @@ -83,7 +83,7 @@ public PageBlobClient(string connectionString, string containerName, string blob /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. - /// + /// /// For more information, . /// /// @@ -187,7 +187,7 @@ internal PageBlobClient(Uri blobUri, HttpPipeline pipeline) /// Initializes a new instance of the /// class with an identical source but the specified /// snapshot timestamp. - /// + /// /// For more information, see . /// /// The snapshot identifier. @@ -232,7 +232,7 @@ protected sealed override BlobBaseClient WithSnapshotImpl(string snapshot) /// existing blob is overwritten with the newly initialized page blob /// To add content to the page blob, call the /// operation. - /// + /// /// For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob. /// /// @@ -290,7 +290,7 @@ public virtual Response Create( /// existing blob is overwritten with the newly initialized page blob /// To add content to the page blob, call the /// operation. - /// + /// /// For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob. /// /// @@ -348,7 +348,7 @@ await this.CreateInternal( /// existing blob is overwritten with the newly initialized page blob /// To add content to the page blob, call the /// operation. - /// + /// /// For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob. /// /// @@ -446,7 +446,7 @@ private async Task> CreateInternal( /// The operation writes /// to a range of pages in a page blob, /// starting at . - /// + /// /// For more information, see . /// /// @@ -507,7 +507,7 @@ public virtual Response UploadPages( /// The operation writes /// to a range of pages in a page blob, /// starting at . - /// + /// /// For more information, see . /// /// @@ -568,7 +568,7 @@ await this.UploadPagesInternal( /// The operation writes /// to a range of pages in a page blob, /// starting at . - /// + /// /// For more information, see . /// /// @@ -681,7 +681,7 @@ private async Task> UploadPagesInternal( /// /// The operation clears one or more /// pages from the page blob, as specificed by the . - /// + /// /// For more information, see . /// /// @@ -723,7 +723,7 @@ public virtual Response ClearPages( /// /// The operation clears one or more /// pages from the page blob, as specificed by the . - /// + /// /// For more information, see . /// /// @@ -765,7 +765,7 @@ await this.ClearPagesInternal( /// /// The operation clears one or more /// pages from the page blob, as specificed by the . - /// + /// /// For more information, see . /// /// @@ -845,7 +845,7 @@ private async Task> ClearPagesInternal( /// /// The operation returns the list of /// valid page ranges for a page blob or snapshot of a page blob. - /// + /// /// For more information, see . /// /// @@ -889,7 +889,7 @@ public virtual Response GetPageRanges( /// /// The operation returns the list of /// valid page ranges for a page blob or snapshot of a page blob. - /// + /// /// For more information, see . /// /// @@ -933,7 +933,7 @@ await this.GetPageRangesInternal( /// /// The operation returns the list /// of valid page ranges for a page blob or snapshot of a page blob. - /// + /// /// For more information, see . /// /// @@ -965,7 +965,7 @@ await this.GetPageRangesInternal( /// a failure occurs. /// private async Task> GetPageRangesInternal( - HttpRange? range, + HttpRange? range, string snapshot, PageBlobAccessConditions? accessConditions, bool async, @@ -1013,8 +1013,8 @@ private async Task> GetPageRangesInternal( /// The operation returns the /// list of page ranges that differ between a /// and this page blob. Changed pages - /// include both updated and cleared pages. - /// + /// include both updated and cleared pages. + /// /// For more information, see . /// /// @@ -1068,8 +1068,8 @@ public virtual Response GetPageRangesDiff( /// The operation returns the /// list of page ranges that differ between a /// and this page blob. Changed pages - /// include both updated and cleared pages. - /// + /// include both updated and cleared pages. + /// /// For more information, see . /// /// @@ -1123,8 +1123,8 @@ await this.GetPageRangesDiffInternal( /// The operation returns the /// list of page ranges that differ between a /// and this page blob. Changed pages - /// include both updated and cleared pages. - /// + /// include both updated and cleared pages. + /// /// For more information, see . /// /// @@ -1215,7 +1215,7 @@ private async Task> GetPageRangesDiffInternal( /// the specified size (which must be a multiple of 512). If the /// specified value is less than the current size of the blob, then /// all pages above the specified value are cleared. - /// + /// /// For more information, see . /// /// @@ -1256,7 +1256,7 @@ public virtual Response Resize( /// the specified size (which must be a multiple of 512). If the /// specified value is less than the current size of the blob, then /// all pages above the specified value are cleared. - /// + /// /// For more information, see . /// /// @@ -1297,7 +1297,7 @@ await this.ResizeInternal( /// the specified size (which must be a multiple of 512). If the /// specified value is less than the current size of the blob, then /// all pages above the specified value are cleared. - /// + /// /// For more information, see . /// /// @@ -1326,7 +1326,7 @@ await this.ResizeInternal( /// a failure occurs. /// private async Task> ResizeInternal( - long size, + long size, PageBlobAccessConditions? accessConditions, bool async, CancellationToken cancellationToken) @@ -1372,7 +1372,7 @@ private async Task> ResizeInternal( /// The operation changes the /// sequence number and /// for this page blob. - /// + /// /// For more information, see . /// /// @@ -1391,7 +1391,7 @@ private async Task> ResizeInternal( /// An updated sequence number of your choosing, if /// is /// or . The value should - /// not be provided if is + /// not be provided if is /// . The sequence number /// is a user-controlled property that you can use to track requests /// and manage concurrency issues via . @@ -1429,7 +1429,7 @@ public virtual Response UpdateSequenceNumber( /// The operation changes the /// sequence number and /// for this page blob. - /// + /// /// For more information, see . /// /// @@ -1448,7 +1448,7 @@ public virtual Response UpdateSequenceNumber( /// An updated sequence number of your choosing, if /// is /// or . The value should - /// not be provided if is + /// not be provided if is /// . The sequence number /// is a user-controlled property that you can use to track requests /// and manage concurrency issues via . @@ -1486,7 +1486,7 @@ await this.UpdateSequenceNumberInternal( /// The operation changes the /// sequence number and /// for this page blob. - /// + /// /// For more information, see . /// /// @@ -1505,7 +1505,7 @@ await this.UpdateSequenceNumberInternal( /// An updated sequence number of your choosing, if /// is /// or . The value should - /// not be provided if is + /// not be provided if is /// . The sequence number /// is a user-controlled property that you can use to track requests /// and manage concurrency issues via . @@ -1585,7 +1585,7 @@ private async Task> UpdateSequenceNumberInternal( /// usual. You can check the /// returned from the to /// determine if the copy has completed. - /// + /// /// For more information, see /// and . /// @@ -1613,13 +1613,13 @@ private async Task> UpdateSequenceNumberInternal( /// /// A will be thrown if /// a failure occurs. - /// + /// /// The destination of an incremental copy must either not exist, or /// must have been created with a previous incremental copy from the /// same source blob. Once created, the destination blob is /// permanently associated with the source and may only be used for /// incremental copies. - /// + /// /// The , /// , and /// @@ -1630,7 +1630,7 @@ private async Task> UpdateSequenceNumberInternal( /// , /// and . The copied snapshots may /// be read and deleted as usual. - /// + /// /// An incremental copy is performed asynchronously on the service and /// must be polled for completion. You can poll /// and check @@ -1638,7 +1638,7 @@ private async Task> UpdateSequenceNumberInternal( /// has completed. When the copy completes, the destination blob will /// contain a new snapshot. The /// operation returns the snapshot time of the newly created snapshot. - /// + /// /// The first time an incremental copy is performed on a destination /// blob, a new blob is created with a snapshot that is fully copied /// from the source. Each subsequent call to @@ -1650,12 +1650,12 @@ private async Task> UpdateSequenceNumberInternal( /// apply to /// . /// Specifically, snapshots must be copied in ascending order and if - /// the source blob is recreated using or + /// the source blob is recreated using or /// /// then /// on new snapshots will fail. - /// - /// The additional storage space consumed by the copied snapshot is + /// + /// The additional storage space consumed by the copied snapshot is /// the size of the differential data transferred during the copy. /// This can be determined by performing a /// call on the snapshot to compare it to the previous snapshot. @@ -1690,7 +1690,7 @@ public virtual CopyFromUriOperation StartCopyIncremental( /// usual. You can check the /// returned from the /// to determine if thecopy has completed. - /// + /// /// For more information, see /// and . /// @@ -1718,13 +1718,13 @@ public virtual CopyFromUriOperation StartCopyIncremental( /// /// A will be thrown if /// a failure occurs. - /// + /// /// The destination of an incremental copy must either not exist, or /// must have been created with a previous incremental copy from the /// same source blob. Once created, the destination blob is /// permanently associated with the source and may only be used for /// incremental copies. - /// + /// /// The , /// , and /// @@ -1735,7 +1735,7 @@ public virtual CopyFromUriOperation StartCopyIncremental( /// , /// and . The copied /// snapshots may be read and deleted as usual. - /// + /// /// An incremental copy is performed asynchronously on the service and /// must be polled for completion. You can poll /// and check @@ -1743,7 +1743,7 @@ public virtual CopyFromUriOperation StartCopyIncremental( /// has completed. When the copy completes, the destination blob will /// contain a new snapshot. The /// operation returns the snapshot time of the newly created snapshot. - /// + /// /// The first time an incremental copy is performed on a destination /// blob, a new blob is created with a snapshot that is fully copied /// from the source. Each subsequent call to @@ -1755,12 +1755,12 @@ public virtual CopyFromUriOperation StartCopyIncremental( /// apply to /// . /// Specifically, snapshots must be copied in ascending order and if - /// the source blob is recreated using or + /// the source blob is recreated using or /// /// then /// on new snapshots will fail. - /// - /// The additional storage space consumed by the copied snapshot is + /// + /// The additional storage space consumed by the copied snapshot is /// the size of the differential data transferred during the copy. /// This can be determined by performing a /// call on the snapshot to compare it to the previous snapshot. @@ -1789,7 +1789,7 @@ public virtual async Task StartCopyIncrementalAsync( /// The /// operation gets the status of an existing copy operation, specified /// by the . - /// + /// /// For more information, see /// and . /// @@ -1824,7 +1824,7 @@ public virtual CopyFromUriOperation StartCopyIncremental( /// The /// operation gets the status of an existing copy operation, specified /// by the . - /// + /// /// For more information, see /// and . /// @@ -1857,16 +1857,16 @@ public virtual async Task StartCopyIncrementalAsync( /// /// The operation starts - /// copying a snapshot of the + /// copying a snapshot of the /// sourceUri page blob to this page blob. The /// snapshot is copied such that only the differential changes between /// the previously copied snapshot are transferred to the destination. - /// The copied snapshots are complete copies of the original snapshot + /// The copied snapshots are complete copies of the original snapshot /// and can be read or copied from as usual. You can check the /// returned from the /// to determine if the /// copy has completed. - /// + /// /// For more information, see /// and . /// @@ -1897,13 +1897,13 @@ public virtual async Task StartCopyIncrementalAsync( /// /// A will be thrown if /// a failure occurs. - /// + /// /// The destination of an incremental copy must either not exist, or /// must have been created with a previous incremental copy from the /// same source blob. Once created, the destination blob is /// permanently associated with the source and may only be used for /// incremental copies. - /// + /// /// The , /// , and /// @@ -1914,7 +1914,7 @@ public virtual async Task StartCopyIncrementalAsync( /// , /// and . The copied /// snapshots may be read and deleted as usual. - /// + /// /// An incremental copy is performed asynchronously on the service and /// must be polled for completion. You can poll /// and check @@ -1922,7 +1922,7 @@ public virtual async Task StartCopyIncrementalAsync( /// has completed. When the copy completes, the destination blob will /// contain a new snapshot. The /// operation returns the snapshot time of the newly created snapshot. - /// + /// /// The first time an incremental copy is performed on a destination /// blob, a new blob is created with a snapshot that is fully copied /// from the source. Each subsequent call to @@ -1938,15 +1938,15 @@ public virtual async Task StartCopyIncrementalAsync( /// or /// then /// on new snapshots will fail. - /// - /// The additional storage space consumed by the copied snapshot is + /// + /// The additional storage space consumed by the copied snapshot is /// the size of the differential data transferred during the copy. /// This can be determined by performing a /// call on the snapshot to compare it to the previous snapshot. /// private async Task> StartCopyIncrementalInternal( - Uri sourceUri, - string snapshot, + Uri sourceUri, + string snapshot, PageBlobAccessConditions? accessConditions, bool async, CancellationToken cancellationToken) @@ -1995,7 +1995,7 @@ private async Task> StartCopyIncrementalInternal( /// The operation writes a range /// of pages to a page blob where the contents are read from /// sourceUri. - /// + /// /// For more information, see . /// /// @@ -2070,7 +2070,7 @@ public virtual Response UploadPagesFromUri( /// The operation writes a range /// of pages to a page blob where the contents are read from /// sourceUri. - /// + /// /// For more information, see . /// /// @@ -2145,7 +2145,7 @@ await this.UploadPagesFromUriInternal( /// The operation writes a /// range of pages to a page blob where the contents are read from /// sourceUri. - /// + /// /// For more information, see . /// /// diff --git a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs index ae661958c9200..35c3878ec9a06 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs @@ -18,8 +18,8 @@ namespace Azure.Storage.Sas public struct BlobSasBuilder : IEquatable { /// - /// The storage service version to use to authenticate requests made - /// with this shared access signature, and the service version to use + /// The storage service version to use to authenticate requests made + /// with this shared access signature, and the service version to use /// when handling requests made with this shared access signature. /// public string Version { get; set; } @@ -43,7 +43,7 @@ public struct BlobSasBuilder : IEquatable /// /// The time at which the shared access signature becomes invalid. - /// This field must be omitted if it has been specified in an + /// This field must be omitted if it has been specified in an /// associated stored access policy. /// public DateTimeOffset ExpiryTime { get; set; } @@ -52,7 +52,7 @@ public struct BlobSasBuilder : IEquatable /// The permissions associated with the shared access signature. The /// user is restricted to operations allowed by the permissions. This /// field must be omitted if it has been specified in an associated - /// stored access policy. The , + /// stored access policy. The , /// , and /// can be used to create the /// permissions string. @@ -61,10 +61,10 @@ public struct BlobSasBuilder : IEquatable /// /// Specifies an IP address or a range of IP addresses from which to - /// accept requests. If the IP address from which the request - /// originates does not match the IP address or address range + /// accept requests. If the IP address from which the request + /// originates does not match the IP address or address range /// specified on the SAS token, the request is not authenticated. - /// When specifying a range of IP addresses, note that the range is + /// When specifying a range of IP addresses, note that the range is /// inclusive. /// public IPRange IPRange { get; set; } @@ -73,7 +73,7 @@ public struct BlobSasBuilder : IEquatable /// An optional unique value up to 64 characters in length that /// correlates to an access policy specified for the container. /// - public string Identifier { get; set; } + public string Identifier { get; set; } /// /// The name of the container being made accessible. @@ -95,17 +95,17 @@ public struct BlobSasBuilder : IEquatable /// /// Specifies which resources are accessible via the shared access /// signature. - /// + /// /// Specify b if the shared resource is a blob. This grants access to /// the content and metadata of the blob. - /// - /// Specify c if the shared resource is a container. This grants - /// access to the content and metadata of any blob in the container, + /// + /// Specify c if the shared resource is a container. This grants + /// access to the content and metadata of any blob in the container, /// and to the list of blobs in the container. - /// + /// /// Beginning in version 2018-11-09, specify bs if the shared resource - /// is a blob snapshot. This grants access to the content and - /// metadata of the specific snapshot, but not the corresponding root + /// is a blob snapshot. This grants access to the content and + /// metadata of the specific snapshot, but not the corresponding root /// blob. /// public string Resource { get; set; } @@ -137,7 +137,7 @@ public struct BlobSasBuilder : IEquatable public string ContentType { get; set; } /// - /// Use an account's to sign this + /// Use an account's to sign this /// shared access signature values to produce the proper SAS query /// parameters for authenticating requests. /// @@ -169,25 +169,25 @@ public BlobSasQueryParameters ToSasQueryParameters(StorageSharedKeyCredential sh this.Version, this.Resource, this.Snapshot, - this.CacheControl, - this.ContentDisposition, - this.ContentEncoding, - this.ContentLanguage, - this.ContentType); + this.CacheControl, + this.ContentDisposition, + this.ContentEncoding, + this.ContentLanguage, + this.ContentType); var signature = sharedKeyCredential.ComputeHMACSHA256(stringToSign); var p = new BlobSasQueryParameters( - version: this.Version, - services: null, - resourceTypes: null, - protocol: this.Protocol, - startTime: this.StartTime, - expiryTime: this.ExpiryTime, - ipRange: this.IPRange, - identifier: this.Identifier, - resource: this.Resource, - permissions: this.Permissions, + version: this.Version, + services: null, + resourceTypes: null, + protocol: this.Protocol, + startTime: this.StartTime, + expiryTime: this.ExpiryTime, + ipRange: this.IPRange, + identifier: this.Identifier, + resource: this.Resource, + permissions: this.Permissions, signature: signature); return p; } diff --git a/sdk/storage/Azure.Storage.Blobs/src/Sas/ContainerSasPermissions.cs b/sdk/storage/Azure.Storage.Blobs/src/Sas/ContainerSasPermissions.cs index 8dc3b62fd3441..bfe07ad2b1549 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Sas/ContainerSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Sas/ContainerSasPermissions.cs @@ -9,7 +9,7 @@ namespace Azure.Storage.Sas { /// - /// supports reading and writing + /// supports reading and writing /// permissions string for a containers's access policy. Use /// to generate a permissions string you can provide to /// . @@ -70,7 +70,7 @@ public override string ToString() /// The parsed . public static ContainerSasPermissions Parse(string s) { - var p = new ContainerSasPermissions(); + var p = new ContainerSasPermissions(); foreach (var c in s) { switch (c) diff --git a/sdk/storage/Azure.Storage.Common/src/LoggingExtensions.cs b/sdk/storage/Azure.Storage.Common/src/LoggingExtensions.cs index b0e46b766f292..af81a1bd8a4df 100644 --- a/sdk/storage/Azure.Storage.Common/src/LoggingExtensions.cs +++ b/sdk/storage/Azure.Storage.Common/src/LoggingExtensions.cs @@ -30,7 +30,7 @@ public static IDisposable BeginLoggingScope( #pragma warning restore CA1801 // Review unused parameters // Methods that return values can't be marked [Conditional], but // using statements will check for null before calling Dispose - => null; + => null; #pragma warning restore IDE0060 // Remove unused parameter [Conditional("EnableLoggingHelpers")] @@ -71,7 +71,7 @@ public static void LogTrace( } /* - Temporarily removing unused code that depends on HttpUtility.ParseQueryString + Temporarily removing unused code that depends on HttpUtility.ParseQueryString public static HttpRequestMessage Sanitize(this HttpRequestMessage httpRequest) diff --git a/sdk/storage/Azure.Storage.Common/src/Sas/AccountSasPermissions.cs b/sdk/storage/Azure.Storage.Common/src/Sas/AccountSasPermissions.cs index 24e5e89ad9795..6ed0099e256d5 100644 --- a/sdk/storage/Azure.Storage.Common/src/Sas/AccountSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Common/src/Sas/AccountSasPermissions.cs @@ -149,7 +149,6 @@ public bool Equals(AccountSasPermissions other) => public static bool operator !=(AccountSasPermissions left, AccountSasPermissions right) => !(left == right); - /// /// Parse a string representing which permissions are granted by a /// shared access signature. diff --git a/sdk/storage/Azure.Storage.Common/src/StorageAsyncCollection.cs b/sdk/storage/Azure.Storage.Common/src/StorageAsyncCollection.cs index 75e3985349a64..e0d01130ce883 100644 --- a/sdk/storage/Azure.Storage.Common/src/StorageAsyncCollection.cs +++ b/sdk/storage/Azure.Storage.Common/src/StorageAsyncCollection.cs @@ -32,7 +32,7 @@ protected StorageAsyncCollection(CancellationToken cancellationToken) /// . /// /// - /// This is all you need to implement when providng a new + /// This is all you need to implement when providng a new /// . /// /// @@ -121,7 +121,7 @@ public override async IAsyncEnumerator> GetAsyncEnumerator(Cancellat { var page = await this.GetNextPageAsync( continuationToken, - null, + null, isAsync: true, cancellationToken: cancellationToken) .ConfigureAwait(false); diff --git a/sdk/storage/Azure.Storage.Common/src/StorageConnectionString.cs b/sdk/storage/Azure.Storage.Common/src/StorageConnectionString.cs index 556bf0f15d961..74f4e61b9a983 100644 --- a/sdk/storage/Azure.Storage.Common/src/StorageConnectionString.cs +++ b/sdk/storage/Azure.Storage.Common/src/StorageConnectionString.cs @@ -261,7 +261,7 @@ public StorageConnectionString(object storageCredentials, (Uri, Uri) blobStorage /// /// Initializes a new instance of the class using the specified - /// credentials, and specifies whether to use HTTP or HTTPS to connect to the storage services. + /// credentials, and specifies whether to use HTTP or HTTPS to connect to the storage services. /// /// A StorageCredentials object. /// true to use HTTPS to connect to storage service endpoints; otherwise, false. @@ -660,7 +660,7 @@ internal static bool ParseImpl(string connectionString, out StorageConnectionStr return false; } - // helper method + // helper method string settingOrDefault(string key) { @@ -840,7 +840,7 @@ private static IDictionary ParseStringIntoSettings(string connec /// The name of the setting. /// A list of valid values for the setting. /// An representing the enumeration constraint. - private static AccountSetting Setting(string name, params string[] validValues) => + private static AccountSetting Setting(string name, params string[] validValues) => new AccountSetting( name, (settingValue) => validValues.Length == 0 ? true : validValues.Contains(settingValue) @@ -939,7 +939,7 @@ private static ConnectionStringFilter Optional(params AccountSetting[] optionalS /// A list of settings of which one must be present. /// The remaining settings or null if the filter's requirement is not satisfied. [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1305:FieldNamesMustNotUseHungarianNotation", Justification = "Reviewed.")] - private static ConnectionStringFilter AtLeastOne(params AccountSetting[] atLeastOneSettings) => + private static ConnectionStringFilter AtLeastOne(params AccountSetting[] atLeastOneSettings) => (settings) => { IDictionary result = new Dictionary(settings); @@ -985,7 +985,7 @@ private static ConnectionStringFilter None(params AccountSetting[] atLeastOneSet /// /// A list of filters of which all must match. /// The remaining settings or null if the filter's requirement is not satisfied. - private static ConnectionStringFilter MatchesAll(params ConnectionStringFilter[] filters) => + private static ConnectionStringFilter MatchesAll(params ConnectionStringFilter[] filters) => (settings) => { IDictionary result = new Dictionary(settings); @@ -1008,7 +1008,7 @@ private static ConnectionStringFilter MatchesAll(params ConnectionStringFilter[] /// /// A list of filters of which exactly one must match. /// The remaining settings or null if the filter's requirement is not satisfied. - private static ConnectionStringFilter MatchesOne(params ConnectionStringFilter[] filters) => + private static ConnectionStringFilter MatchesOne(params ConnectionStringFilter[] filters) => (settings) => { var results = @@ -1026,7 +1026,7 @@ private static ConnectionStringFilter MatchesOne(params ConnectionStringFilter[] /// /// A list of filters of which ensures that the specified filter is an exact match. /// The remaining settings or null if the filter's requirement is not satisfied. - private static ConnectionStringFilter MatchesExactly(ConnectionStringFilter filter) => + private static ConnectionStringFilter MatchesExactly(ConnectionStringFilter filter) => (settings) => { var results = filter(settings); diff --git a/sdk/storage/Azure.Storage.Common/src/StreamPartitioner.cs b/sdk/storage/Azure.Storage.Common/src/StreamPartitioner.cs index fe07a8aa786e6..4b8e2d68f2e68 100644 --- a/sdk/storage/Azure.Storage.Common/src/StreamPartitioner.cs +++ b/sdk/storage/Azure.Storage.Common/src/StreamPartitioner.cs @@ -43,7 +43,7 @@ await this.stream.ReadAsync(segment.Array, 0, segment.Count, ct).ConfigureAwait( return new StreamPartition( buffer.Memory, - count, + count, () => { buffer.Dispose(); @@ -66,7 +66,7 @@ protected virtual void Dispose(bool disposing) if (disposing) { } - + this.stream = default; this.memoryPool = default; diff --git a/sdk/storage/Azure.Storage.Files/src/FileServiceClient.cs b/sdk/storage/Azure.Storage.Files/src/FileServiceClient.cs index 587cd691d25ce..85be4d69c9f78 100644 --- a/sdk/storage/Azure.Storage.Files/src/FileServiceClient.cs +++ b/sdk/storage/Azure.Storage.Files/src/FileServiceClient.cs @@ -24,14 +24,14 @@ public class FileServiceClient /// The file service's primary endpoint. /// private readonly Uri _uri; - + /// /// Gets the file service's primary endpoint. /// public virtual Uri Uri => this._uri; /// - /// The transport pipeline used to send + /// The transport pipeline used to send /// every request. /// private readonly HttpPipeline _pipeline; @@ -59,7 +59,7 @@ protected FileServiceClient() /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. - /// + /// /// For more information, . /// public FileServiceClient(string connectionString) @@ -75,7 +75,7 @@ public FileServiceClient(string 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, . /// /// @@ -185,7 +185,7 @@ internal FileServiceClient(Uri serviceUri, HttpPipeline pipeline) /// of the shares in the storage account. Enumerating the shares may /// make multiple requests to the service while fetching all the /// values. - /// + /// /// For more information, . /// /// @@ -214,7 +214,7 @@ public virtual IEnumerable> GetShares( /// of the shares in the storage account. Enumerating the shares may /// make multiple requests to the service while fetching all the /// values. - /// + /// /// For more information, . /// /// @@ -246,7 +246,7 @@ public virtual AsyncCollection GetSharesAsync( /// and the if it's not /// empty to make subsequent calls to /// to continue enumerating the shares segment by segment. - /// + /// /// For more information, . /// /// @@ -327,7 +327,7 @@ internal async Task> GetSharesInternal( /// The operation gets the properties /// of a storage account’s file service, including properties for /// Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - /// + /// /// For more information, see . /// /// @@ -353,7 +353,7 @@ public virtual Response GetProperties( /// The operation gets the properties /// of a storage account’s file service, including properties for /// Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - /// + /// /// For more information, see . /// /// @@ -379,7 +379,7 @@ await this.GetPropertiesInternal( /// The operation gets the properties /// of a storage account’s file service, including properties for /// Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - /// + /// /// For more information, see . /// /// @@ -436,7 +436,7 @@ private async Task> GetPropertiesInternal( /// and soft delete settings. You can also use this operation to set /// the default request version for all incoming requests to the File /// service that do not have a version specified. - /// + /// /// For more information, see . /// /// The file service properties. @@ -467,7 +467,7 @@ public virtual Response SetProperties( /// and soft delete settings. You can also use this operation to set /// the default request version for all incoming requests to the File /// service that do not have a version specified. - /// + /// /// For more information, see . /// /// The file service properties. @@ -498,7 +498,7 @@ await this.SetPropertiesInternal( /// and soft delete settings. You can also use this operation to set /// the default request version for all incoming requests to the File /// service that do not have a version specified. - /// + /// /// For more information, see . /// /// The file service properties. @@ -554,7 +554,7 @@ private async Task SetPropertiesInternal( /// The operation creates a new share /// under the specified account. If a share with the same name /// already exists, the operation fails. - /// + /// /// For more information, see . /// /// @@ -593,7 +593,7 @@ public virtual Response CreateShare( /// The operation creates a new share /// under the specified account. If a share with the same name /// already exists, the operation fails. - /// + /// /// For more information, see . /// /// @@ -633,7 +633,7 @@ public virtual async Task> CreateShareAsync( /// /// Marks the specified share or share snapshot for deletion. /// The share or share snapshot and any files contained within it are later deleted during garbage collection. - /// + /// /// Currently, this method will always delete snapshots. There's no way to specify a separate value for x-ms-delete-snapshots. /// /// For more information, see . @@ -660,7 +660,7 @@ public virtual Response DeleteShare( /// /// Marks the specified share or share snapshot for deletion. /// The share or share snapshot and any files contained within it are later deleted during garbage collection. - /// + /// /// Currently, this method will always delete snapshots. There's no way to specify a separate value for x-ms-delete-snapshots. /// /// For more information, see . diff --git a/sdk/storage/Azure.Storage.Files/src/Sas/FileSasBuilder.cs b/sdk/storage/Azure.Storage.Files/src/Sas/FileSasBuilder.cs index 45d700dd35e57..ce3f34d651421 100644 --- a/sdk/storage/Azure.Storage.Files/src/Sas/FileSasBuilder.cs +++ b/sdk/storage/Azure.Storage.Files/src/Sas/FileSasBuilder.cs @@ -16,8 +16,8 @@ namespace Azure.Storage.Sas public struct FileSasBuilder : IEquatable { /// - /// The storage service version to use to authenticate requests made - /// with this shared access signature, and the service version to use + /// The storage service version to use to authenticate requests made + /// with this shared access signature, and the service version to use /// when handling requests made with this shared access signature. /// public string Version { get; set; } @@ -40,7 +40,7 @@ public struct FileSasBuilder : IEquatable /// /// The time at which the shared access signature becomes invalid. - /// This field must be omitted if it has been specified in an + /// This field must be omitted if it has been specified in an /// associated stored access policy. /// public DateTimeOffset ExpiryTime { get; set; } @@ -57,10 +57,10 @@ public struct FileSasBuilder : IEquatable /// /// Specifies an IP address or a range of IP addresses from which to - /// accept requests. If the IP address from which the request - /// originates does not match the IP address or address range + /// accept requests. If the IP address from which the request + /// originates does not match the IP address or address range /// specified on the SAS token, the request is not authenticated. - /// When specifying a range of IP addresses, note that the range is + /// When specifying a range of IP addresses, note that the range is /// inclusive. /// public IPRange IPRange { get; set; } @@ -109,7 +109,7 @@ public struct FileSasBuilder : IEquatable public string ContentType { get; set; } /// - /// Use an account's to sign this + /// Use an account's to sign this /// shared access signature values to produce the proper SAS query /// parameters for authenticating requests. /// @@ -156,11 +156,11 @@ public SasQueryParameters ToSasQueryParameters(StorageSharedKeyCredential shared this.IPRange.ToString(), this.Protocol.ToString(), this.Version, - this.CacheControl, - this.ContentDisposition, - this.ContentEncoding, - this.ContentLanguage, - this.ContentType); + this.CacheControl, + this.ContentDisposition, + this.ContentEncoding, + this.ContentLanguage, + this.ContentType); var signature = sharedKeyCredential.ComputeHMACSHA256(stringToSign); @@ -173,8 +173,8 @@ public SasQueryParameters ToSasQueryParameters(StorageSharedKeyCredential shared expiryTime: this.ExpiryTime, ipRange: this.IPRange, identifier: this.Identifier, - resource: resource, - permissions: this.Permissions, + resource: resource, + permissions: this.Permissions, signature: signature); return p; } diff --git a/sdk/storage/Azure.Storage.Files/src/Sas/FileSasPermissions.cs b/sdk/storage/Azure.Storage.Files/src/Sas/FileSasPermissions.cs index 96e8fb9016cbe..ecdf7e12995a0 100644 --- a/sdk/storage/Azure.Storage.Files/src/Sas/FileSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Files/src/Sas/FileSasPermissions.cs @@ -58,7 +58,7 @@ public override string ToString() /// The parsed . public static FileSasPermissions Parse(string s) { - var p = new FileSasPermissions(); + var p = new FileSasPermissions(); foreach (var c in s) { switch (c) diff --git a/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs b/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs index 023a471b50618..3317954c45fa7 100644 --- a/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs +++ b/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs @@ -22,7 +22,7 @@ public class QueueServiceClient /// The Uri endpoint used by the object. /// private readonly Uri _uri; - + /// /// The Uri endpoint used by the object. /// @@ -55,7 +55,7 @@ protected QueueServiceClient() /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. - /// + /// /// For more information, . /// public QueueServiceClient(string connectionString) @@ -71,7 +71,7 @@ public QueueServiceClient(string 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, . /// /// @@ -202,7 +202,7 @@ public virtual QueueClient GetQueueClient(string queueName) /// sequence of queues in the storage account. Enumerating the /// queues may make multiple requests to the service while fetching /// all the values. Queue names are returned in lexicographic order. - /// + /// /// For more information, see /// /// @@ -224,7 +224,7 @@ public virtual IEnumerable> GetQueues( /// collection of queues in the storage account. Enumerating the /// queues may make multiple requests to the service while fetching /// all the values. Queue names are returned in lexicographic order. - /// + /// /// For more information, see /// /// @@ -238,7 +238,7 @@ public virtual IEnumerable> GetQueues( /// /// /// Use an empty marker to start enumeration from the beginning. Queue names are returned in lexicographic order. - /// After getting a segment, process it, and then call ListQueuesSegment again (passing in the next marker) to get the next segment. + /// After getting a segment, process it, and then call ListQueuesSegment again (passing in the next marker) to get the next segment. /// public virtual AsyncCollection GetQueuesAsync( GetQueuesOptions? options = default, @@ -269,7 +269,7 @@ public virtual AsyncCollection GetQueuesAsync( /// /// /// Use an empty marker to start enumeration from the beginning. Queue names are returned in lexicographic order. - /// After getting a segment, process it, and then call ListQueuesSegmentAsync again (passing in the next marker) to get the next segment. + /// After getting a segment, process it, and then call ListQueuesSegmentAsync again (passing in the next marker) to get the next segment. /// internal async Task> GetQueuesInternal( string marker, @@ -575,7 +575,7 @@ private async Task> GetStatisticsInternal( #region CreateQueue /// /// Creates a queue. - /// + /// /// For more information, see . /// /// @@ -602,7 +602,7 @@ public virtual Response CreateQueue( /// /// Creates a queue. - /// + /// /// For more information, see . /// /// @@ -631,7 +631,7 @@ public virtual async Task> CreateQueueAsync( #region DeleteQueue /// /// Deletes a queue. - /// + /// /// For more information, see . /// /// @@ -650,7 +650,7 @@ public virtual Response DeleteQueue( /// /// Deletes a queue. - /// + /// /// For more information, see . /// /// diff --git a/sdk/storage/Azure.Storage.Queues/src/QueueUriBuilder.cs b/sdk/storage/Azure.Storage.Queues/src/QueueUriBuilder.cs index d563926cd1884..bb1446ce1ffa4 100644 --- a/sdk/storage/Azure.Storage.Queues/src/QueueUriBuilder.cs +++ b/sdk/storage/Azure.Storage.Queues/src/QueueUriBuilder.cs @@ -64,8 +64,8 @@ internal struct QueueUriBuilder : IEquatable public string UnparsedParams; /// - /// Parses a URL initializing QueueUriBuilder's fields including any SAS-related query parameters. - /// Any other query parameters remain in the UnparsedParams field. + /// Parses a URL initializing QueueUriBuilder's fields including any SAS-related query parameters. + /// Any other query parameters remain in the UnparsedParams field. /// /// public QueueUriBuilder(Uri uri) @@ -97,7 +97,7 @@ public QueueUriBuilder(Uri uri) // Slash not found; path has account name & no queue name if (accountEndIndex == -1) { - this.AccountName = path; + this.AccountName = path; startIndex = path.Length; } else @@ -109,11 +109,11 @@ public QueueUriBuilder(Uri uri) // Find the next slash (if it exists) var queueEndIndex = path.IndexOf("/", startIndex, StringComparison.InvariantCulture); - + // Slash not found; path has queue name & no message id if (queueEndIndex == -1) { - this.QueueName = path.Substring(startIndex); + this.QueueName = path.Substring(startIndex); } else { @@ -144,7 +144,7 @@ public QueueUriBuilder(Uri uri) /// /// URL returns a URL object whose fields are initialized from the QueueUriBuilder fields. The URL's RawQuery - /// field contains the SAS and unparsed query parameters. + /// field contains the SAS and unparsed query parameters. /// /// public Uri ToUri() @@ -208,7 +208,6 @@ private static bool IsHostIPEndPointStyle(string host) public override bool Equals(object obj) => obj is QueueUriBuilder other && this.Equals(other); - /// /// Check if two QueueUriBuilder instances are equal. /// diff --git a/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasBuilder.cs b/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasBuilder.cs index 389149b341aa9..dfd8b6ebf7d64 100644 --- a/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasBuilder.cs +++ b/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasBuilder.cs @@ -15,8 +15,8 @@ namespace Azure.Storage.Sas public struct QueueSasBuilder : IEquatable { /// - /// The storage service version to use to authenticate requests made - /// with this shared access signature, and the service version to use + /// The storage service version to use to authenticate requests made + /// with this shared access signature, and the service version to use /// when handling requests made with this shared access signature. /// public string Version { get; set; } @@ -40,7 +40,7 @@ public struct QueueSasBuilder : IEquatable /// /// The time at which the shared access signature becomes invalid. - /// This field must be omitted if it has been specified in an + /// This field must be omitted if it has been specified in an /// associated stored access policy. /// public DateTimeOffset ExpiryTime { get; set; } @@ -57,10 +57,10 @@ public struct QueueSasBuilder : IEquatable /// /// Specifies an IP address or a range of IP addresses from which to - /// accept requests. If the IP address from which the request - /// originates does not match the IP address or address range + /// accept requests. If the IP address from which the request + /// originates does not match the IP address or address range /// specified on the SAS token, the request is not authenticated. - /// When specifying a range of IP addresses, note that the range is + /// When specifying a range of IP addresses, note that the range is /// inclusive. /// public IPRange IPRange { get; set; } @@ -77,7 +77,7 @@ public struct QueueSasBuilder : IEquatable public string QueueName { get; set; } /// - /// Use an account's to sign this + /// Use an account's to sign this /// shared access signature values to produce the proper SAS query /// parameters for authenticating requests. /// @@ -113,16 +113,16 @@ public SasQueryParameters ToSasQueryParameters(StorageSharedKeyCredential shared this.Version); var signature = sharedKeyCredential.ComputeHMACSHA256(stringToSign); var p = new SasQueryParameters( - version: this.Version, - services: null, - resourceTypes: null, - protocol: this.Protocol, - startTime: this.StartTime, - expiryTime: this.ExpiryTime, - ipRange: this.IPRange, - identifier: this.Identifier, - resource: null, - permissions: this.Permissions, + version: this.Version, + services: null, + resourceTypes: null, + protocol: this.Protocol, + startTime: this.StartTime, + expiryTime: this.ExpiryTime, + ipRange: this.IPRange, + identifier: this.Identifier, + resource: null, + permissions: this.Permissions, signature: signature); return p; } diff --git a/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasPermissions.cs b/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasPermissions.cs index 67a5dd75993af..4d227dd6bd161 100644 --- a/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasPermissions.cs +++ b/sdk/storage/Azure.Storage.Queues/src/Sas/QueueSasPermissions.cs @@ -58,7 +58,7 @@ public override string ToString() /// The parsed . public static QueueSasPermissions Parse(string s) { - var p = new QueueSasPermissions(); + var p = new QueueSasPermissions(); foreach (var c in s) { switch (c) diff --git a/sdk/storage/Directory.Build.props b/sdk/storage/Directory.Build.props index 6be99702a6e6b..5a666ee8aac1b 100644 --- a/sdk/storage/Directory.Build.props +++ b/sdk/storage/Directory.Build.props @@ -14,9 +14,15 @@ - false + + $(NoWarn); + AZC0001; + AZC0002; + AZC0007; + AZC0006; + +