diff --git a/Minio.Examples/Cases/SetBucketTags.cs b/Minio.Examples/Cases/SetBucketTags.cs index 45777291..4211c5a3 100644 --- a/Minio.Examples/Cases/SetBucketTags.cs +++ b/Minio.Examples/Cases/SetBucketTags.cs @@ -1,4 +1,4 @@ -/* +/* * MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020, 2021 MinIO, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,7 +24,7 @@ public static class SetBucketTags // Set Tags to the bucket public static async Task Run(IMinioClient minio, string bucketName = "my-bucket-name", - IDictionary tags = null) + IReadOnlyDictionary tags = null) { if (minio is null) throw new ArgumentNullException(nameof(minio)); diff --git a/Minio.Examples/Cases/SetObjectTags.cs b/Minio.Examples/Cases/SetObjectTags.cs index 2c151ba3..c9ee8b35 100644 --- a/Minio.Examples/Cases/SetObjectTags.cs +++ b/Minio.Examples/Cases/SetObjectTags.cs @@ -1,4 +1,4 @@ -/* +/* * MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020, 2021 MinIO, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +25,7 @@ public static class SetObjectTags public static async Task Run(IMinioClient minio, string bucketName = "my-bucket-name", string objectName = "my-object-name", - IDictionary tags = null, + IReadOnlyDictionary tags = null, string versionId = null) { if (minio is null) throw new ArgumentNullException(nameof(minio)); diff --git a/Minio/DataModel/ILM/AndOperator.cs b/Minio/DataModel/ILM/AndOperator.cs index a50ce35a..39d3242b 100644 --- a/Minio/DataModel/ILM/AndOperator.cs +++ b/Minio/DataModel/ILM/AndOperator.cs @@ -42,7 +42,7 @@ public AndOperator(string prefix, IList tag) Tags = new Collection(tag); } - public AndOperator(string prefix, IDictionary tags) + public AndOperator(string prefix, IReadOnlyDictionary tags) { Prefix = prefix; if (tags is null || tags.Count == 0) diff --git a/Minio/DataModel/Replication/AndOperator.cs b/Minio/DataModel/Replication/AndOperator.cs index ebc66965..50848b4f 100644 --- a/Minio/DataModel/Replication/AndOperator.cs +++ b/Minio/DataModel/Replication/AndOperator.cs @@ -50,7 +50,7 @@ public AndOperator(string prefix, ICollection tag) Tags = tag; } - public AndOperator(string prefix, IDictionary tags) + public AndOperator(string prefix, IReadOnlyDictionary tags) { if (tags is null) throw new ArgumentNullException(nameof(tags)); diff --git a/Minio/DataModel/Tags/TagSet.cs b/Minio/DataModel/Tags/TagSet.cs index d546ee8f..de89494a 100644 --- a/Minio/DataModel/Tags/TagSet.cs +++ b/Minio/DataModel/Tags/TagSet.cs @@ -1,4 +1,4 @@ -/* +/* * MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -28,7 +28,7 @@ public TagSet() Tag = null; } - public TagSet(IDictionary tags) + public TagSet(IReadOnlyDictionary tags) { if (tags is null || tags.Count == 0) return; Tag = new Collection(); diff --git a/Minio/DataModel/Tags/Tagging.cs b/Minio/DataModel/Tags/Tagging.cs index 90539488..329c49d8 100644 --- a/Minio/DataModel/Tags/Tagging.cs +++ b/Minio/DataModel/Tags/Tagging.cs @@ -40,7 +40,7 @@ public Tagging() TaggingSet = null; } - public Tagging(IDictionary tags, bool isObjects) + public Tagging(IReadOnlyDictionary tags, bool isObjects) { if (tags is null) { @@ -67,7 +67,7 @@ public Tagging(IDictionary tags, bool isObjects) [XmlElement("TagSet")] public TagSet TaggingSet { get; set; } [XmlIgnore] - public IDictionary Tags + public IReadOnlyDictionary Tags { get { @@ -133,12 +133,12 @@ public string MarshalXML() return str; } - public static Tagging GetBucketTags(IDictionary tags) + public static Tagging GetBucketTags(IReadOnlyDictionary tags) { return new Tagging(tags, false); } - public static Tagging GetObjectTags(IDictionary tags) + public static Tagging GetObjectTags(IReadOnlyDictionary tags) { return new Tagging(tags, true); }