diff --git a/Minio/Credentials/AssumeRoleProvider.cs b/Minio/Credentials/AssumeRoleProvider.cs index 022da415..03906ace 100644 --- a/Minio/Credentials/AssumeRoleProvider.cs +++ b/Minio/Credentials/AssumeRoleProvider.cs @@ -88,7 +88,8 @@ public override async ValueTask GetCredentialsAsync() } } - throw new ArgumentNullException(nameof(Client), "Client should have been assigned for the operation to continue."); + throw new ArgumentNullException(nameof(Client), + "Client should have been assigned for the operation to continue."); } internal override async Task BuildRequest() diff --git a/Minio/DataModel/Args/PutObjectPartArgs.cs b/Minio/DataModel/Args/PutObjectPartArgs.cs index 8d4c03a8..a78bc227 100644 --- a/Minio/DataModel/Args/PutObjectPartArgs.cs +++ b/Minio/DataModel/Args/PutObjectPartArgs.cs @@ -29,7 +29,8 @@ internal override void Validate() { base.Validate(); if (string.IsNullOrWhiteSpace(UploadId)) - throw new ArgumentNullException(nameof(UploadId), nameof(UploadId) + " not assigned for PutObjectPart operation."); + throw new ArgumentNullException(nameof(UploadId), + nameof(UploadId) + " not assigned for PutObjectPart operation."); } public new PutObjectPartArgs WithBucket(string bkt) diff --git a/Minio/DataModel/Tags/Tagging.cs b/Minio/DataModel/Tags/Tagging.cs index 9cd9a9b4..a351817e 100644 --- a/Minio/DataModel/Tags/Tagging.cs +++ b/Minio/DataModel/Tags/Tagging.cs @@ -55,8 +55,10 @@ public Tagging(IDictionary tags, bool isObjects) foreach (var tag in tags) { - if (!ValidateTagKey(tag.Key)) throw new ArgumentException("Invalid Tagging key " + tag.Key, nameof(tag.Key)); - if (!ValidateTagValue(tag.Value)) throw new ArgumentException("Invalid Tagging value " + tag.Value, nameof(tag.Value)); + if (!ValidateTagKey(tag.Key)) + throw new ArgumentException("Invalid Tagging key " + tag.Key, nameof(tag.Key)); + if (!ValidateTagValue(tag.Value)) + throw new ArgumentException("Invalid Tagging value " + tag.Value, nameof(tag.Value)); } TaggingSet = new TagSet(tags); diff --git a/Minio/ResponseResult.cs b/Minio/ResponseResult.cs index ecadc0db..fb811515 100644 --- a/Minio/ResponseResult.cs +++ b/Minio/ResponseResult.cs @@ -25,8 +25,8 @@ public sealed class ResponseResult : IDisposable private readonly Dictionary headers = new(StringComparer.Ordinal); private string content; private ReadOnlyMemory contentBytes; - private Stream stream; private bool disposed; + private Stream stream; public ResponseResult(HttpRequestMessage request, HttpResponseMessage response) { @@ -124,10 +124,7 @@ public IDictionary Headers public void Dispose() { - if (disposed) - { - return; - } + if (disposed) return; stream?.Dispose(); Request?.Dispose();