From 12fc8e90fee4c604187b7c225abd8067e27d23c5 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Sun, 11 Sep 2022 17:00:08 +0200 Subject: [PATCH] chore(dotnet): use csharp 10 namespace declaration --- utils/doclint/templates/interface.cs | 7 +++---- utils/generate_dotnet_channels.js | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/utils/doclint/templates/interface.cs b/utils/doclint/templates/interface.cs index e2b3da3c1f1eb..a0fadccb2d6a5 100644 --- a/utils/doclint/templates/interface.cs +++ b/utils/doclint/templates/interface.cs @@ -37,9 +37,8 @@ #nullable enable -namespace Microsoft.Playwright -{ - [CONTENT] -} +namespace Microsoft.Playwright; + +[CONTENT] #nullable disable diff --git a/utils/generate_dotnet_channels.js b/utils/generate_dotnet_channels.js index 71e35aa5a9ae3..6852ffda571b7 100644 --- a/utils/generate_dotnet_channels.js +++ b/utils/generate_dotnet_channels.js @@ -183,14 +183,14 @@ fs.mkdirSync(dir, { recursive: true }); for (const [name, item] of Object.entries(protocol)) { if (item.type === 'interface') { - const init = objectType(item.initializer || {}, ' '); + const init = objectType(item.initializer || {}, ''); const initializerName = name + 'Initializer'; const superName = inherits.has(name) ? inherits.get(name) + 'Initializer' : null; writeCSharpClass(initializerName, superName, init.ts); } else if (item.type === 'object') { if (Object.keys(item.properties).length === 0) continue; - const init = objectType(item.properties, ' ', false, name); + const init = objectType(item.properties, '', false, name); writeCSharpClass(name, null, init.ts); } }