Skip to content

Commit 348d75a

Browse files
authored
[dotnet] Suppress arrays as attribute arguments is not CLS-compliant (#17083)
1 parent b771944 commit 348d75a

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

dotnet/src/webdriver/Command.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,8 @@ public override string ToString()
168168
[JsonSerializable(typeof(Dictionary<string, short>))]
169169
[JsonSerializable(typeof(Dictionary<string, ushort>))]
170170
[JsonSerializable(typeof(Dictionary<string, string>))]
171+
#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant
172+
// This is not part of the public API, so we can ignore this warning
171173
[JsonSourceGenerationOptions(Converters = [typeof(ResponseValueJsonConverter)])]
174+
#pragma warning restore CS3016 // Arrays as attribute arguments is not CLS-compliant
172175
internal partial class CommandJsonSerializerContext : JsonSerializerContext;

dotnet/src/webdriver/Response.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,5 +204,8 @@ public override string ToString()
204204
}
205205

206206
[JsonSerializable(typeof(object))]
207+
#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant
208+
// This is not part of the public API, so we can ignore this warning
207209
[JsonSourceGenerationOptions(Converters = [typeof(ResponseValueJsonConverter)])] // we still need it to make `Object` as `Dictionary`
210+
#pragma warning restore CS3016 // Arrays as attribute arguments is not CLS-compliant
208211
internal sealed partial class ResponseJsonSerializerContext : JsonSerializerContext;

0 commit comments

Comments
 (0)