minio-dotnet icon indicating copy to clipboard operation
minio-dotnet copied to clipboard

Make properties getters and setters public

Open Cologler opened this issue 2 years ago • 1 comments

Currently API:

var args = new BucketExistsArgs()
    .WithBucket(bucketName);

I cannot read the BucketName property from args for logging, too.

I prefer to use the C# object initializer for better readable (without the With prefix):

var args = new BucketExistsArgs
{
    BucketName = bucketName
};

Why do they use internal as the modifier?

Cologler avatar Oct 27 '23 20:10 Cologler

The with keyword of the C# record always returns a new instance, The original instance does not change. However, the minio SDK always modifies the instance itself, which causes a lot of confusion.

Cologler avatar Oct 27 '23 20:10 Cologler