Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Aug 3, 2023
1 parent 758fa3b commit b197539
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Minio/Credentials/AssumeRoleProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ public override async ValueTask<AccessCredentials> 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<HttpRequestMessageBuilder> BuildRequest()
Expand Down
3 changes: 2 additions & 1 deletion Minio/DataModel/Args/PutObjectPartArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions Minio/DataModel/Tags/Tagging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ public Tagging(IDictionary<string, string> 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);
Expand Down
7 changes: 2 additions & 5 deletions Minio/ResponseResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public sealed class ResponseResult : IDisposable
private readonly Dictionary<string, string> headers = new(StringComparer.Ordinal);
private string content;
private ReadOnlyMemory<byte> contentBytes;
private Stream stream;
private bool disposed;
private Stream stream;

public ResponseResult(HttpRequestMessage request, HttpResponseMessage response)
{
Expand Down Expand Up @@ -124,10 +124,7 @@ public IDictionary<string, string> Headers

public void Dispose()
{
if (disposed)
{
return;
}
if (disposed) return;

stream?.Dispose();
Request?.Dispose();
Expand Down

0 comments on commit b197539

Please sign in to comment.