Skip to content

Commit f5964bb

Browse files
committed
Fix build
1 parent e34ccca commit f5964bb

20 files changed

+26
-87
lines changed

FileUploader/FileUpload.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private static bool IsWindows()
3434
return OperatingSystem.IsWindows();
3535
}
3636

37-
private static async Task Main(string[] args)
37+
private static async Task Main()
3838
{
3939
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
4040
| SecurityProtocolType.Tls11

Minio.Examples/Cases/GetBucketPolicy.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ internal static class GetBucketPolicy
2222
{
2323
// Get bucket policy
2424
public static async Task Run(IMinioClient minio,
25-
string bucketName = "my-bucket-name",
26-
string prefix = "")
25+
string bucketName = "my-bucket-name")
2726
{
2827
try
2928
{

Minio.Examples/Cases/ListenBucketNotifications.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ public static void Run(IMinioClient minio,
2626
string bucketName = "my-bucket-name",
2727
List<EventType> events = null,
2828
string prefix = "",
29-
string suffix = "",
30-
bool recursive = true)
29+
string suffix = "")
3130
{
3231
try
3332
{

Minio.Examples/Cases/PresignedGetObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public static async Task Run(IMinioClient client,
3535
.WithObject(objectName)
3636
.WithExpiry(1000)
3737
.WithHeaders(reqParams);
38-
var presignedUrl = await client.PresignedGetObjectAsync(args).ConfigureAwait(false);
38+
_ = await client.PresignedGetObjectAsync(args).ConfigureAwait(false);
3939
}
4040
}

Minio.Examples/Cases/PresignedPostPolicy.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616

1717
using Minio.DataModel;
18-
using Minio.DataModel.Args;
1918

2019
namespace Minio.Examples.Cases;
2120

@@ -34,14 +33,10 @@ public static async Task Run(IMinioClient client,
3433
form.SetBucket(bucketName);
3534
form.SetExpires(expiration);
3635

37-
var args = new PresignedPostPolicyArgs()
38-
.WithBucket(bucketName)
39-
.WithObject(objectName)
40-
.WithPolicy(form);
41-
4236
var tuple = await client.PresignedPostPolicyAsync(form).ConfigureAwait(false);
4337
var curlCommand = "curl -k --insecure -X POST";
4438
foreach (var pair in tuple.Item2) curlCommand += $" -F {pair.Key}={pair.Value}";
4539
curlCommand = curlCommand + " -F file=@/etc/issue " + tuple.Item1 + bucketName + "/";
40+
_ = curlCommand;
4641
}
4742
}

Minio.Examples/Cases/SelectObjectContent.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ internal static class SelectObjectContent
2626
// Get object in a bucket
2727
public static async Task Run(IMinioClient minio,
2828
string bucketName = "my-bucket-name",
29-
string objectName = "my-object-name",
30-
string fileName = "my-file-name")
29+
string objectName = "my-object-name")
3130
{
3231
if (minio is null) throw new ArgumentNullException(nameof(minio));
3332

Minio.Examples/Cases/StatObjectQuery.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ public static async Task Run(IMinioClient minio,
5959
{
6060
var objectNameInfo = $"{bucketName}-{bucketObject}";
6161
if (!string.IsNullOrEmpty(versionID))
62-
objectNameInfo = objectNameInfo +
63-
$" (Version ID) {me.Response.VersionId} (Marked DEL) {me.Response.DeleteMarker}";
62+
objectNameInfo += $" (Version ID) {me.Response.VersionId} (Marked DEL) {me.Response.DeleteMarker}";
6463

6564
Console.WriteLine($"[StatObject] {objectNameInfo} Exception: {me}");
6665
}

Minio.Examples/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static async Task Main()
123123
for (var i = 0; i < 10; i++) objectsList.Add(objectName + i);
124124

125125
// Set app Info
126-
minioClient.SetAppInfo("app-name", "app-version");
126+
_ = minioClient.SetAppInfo("app-name", "app-version");
127127

128128
// Set HTTP Tracing On
129129
// minioClient.SetTraceOn();

Minio.Functional.Tests/FunctionalTest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5959,8 +5959,6 @@ internal static async Task ListIncompleteUpload_Test1(IMinioClient minio)
59595959
var bucketName = GetRandomName(15);
59605960
var objectName = GetRandomObjectName(10);
59615961
var contentType = "gzip";
5962-
var args = new Dictionary<string, string>
5963-
(StringComparer.Ordinal) { { "bucketName", bucketName }, { "recursive", "true" } };
59645962
try
59655963
{
59665964
await Setup_Test(minio, bucketName).ConfigureAwait(false);

Minio.Tests/EndpointTest.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ public class EndpointTest
2727
public void TestGetEndpointURL()
2828
{
2929
_ = RequestUtil.GetEndpointURL("s3.amazonaws.com", true);
30-
object[] parameterValuesArray =
31-
{
32-
new object[] { "s3.amazonaws.com", true, "testbucket", null, false },
33-
new object[] { "testbucket.s3.amazonaws.com", true }
34-
};
35-
36-
object[] parameterValuesArray1 = { "s3.amazonaws.com", true, "testbucket", "testobject", false };
37-
3830
object[][] testCases =
3931
{
4032
new object[]
@@ -165,10 +157,7 @@ public void TestIsAmazonEndpoint()
165157
};
166158

167159
foreach (var testCase in testAmazonDict)
168-
{
169-
var value = S3utils.IsAmazonEndPoint(testCase.Key);
170160
Assert.AreEqual(S3utils.IsAmazonEndPoint(testCase.Key), testCase.Value);
171-
}
172161
}
173162

174163
[TestMethod]
@@ -188,9 +177,6 @@ public void TestIsAmazonChinaEndpoint()
188177
};
189178

190179
foreach (var testCase in testAmazonDict)
191-
{
192-
var value = S3utils.IsAmazonChinaEndPoint(testCase.Key);
193180
Assert.AreEqual(S3utils.IsAmazonChinaEndPoint(testCase.Key), testCase.Value);
194-
}
195181
}
196182
}

0 commit comments

Comments
 (0)