chore(dotnet): use csharp 10 namespace declaration (#17248)

This commit is contained in:
Max Schmitt 2022-09-12 20:01:49 +02:00 committed by GitHub
parent bc942ef9ea
commit 0b4de0df7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -37,9 +37,8 @@ using System.Threading.Tasks;
#nullable enable #nullable enable
namespace Microsoft.Playwright namespace Microsoft.Playwright;
{
[CONTENT] [CONTENT]
}
#nullable disable #nullable disable

View File

@ -183,14 +183,14 @@ fs.mkdirSync(dir, { recursive: true });
for (const [name, item] of Object.entries(protocol)) { for (const [name, item] of Object.entries(protocol)) {
if (item.type === 'interface') { if (item.type === 'interface') {
const init = objectType(item.initializer || {}, ' '); const init = objectType(item.initializer || {}, '');
const initializerName = name + 'Initializer'; const initializerName = name + 'Initializer';
const superName = inherits.has(name) ? inherits.get(name) + 'Initializer' : null; const superName = inherits.has(name) ? inherits.get(name) + 'Initializer' : null;
writeCSharpClass(initializerName, superName, init.ts); writeCSharpClass(initializerName, superName, init.ts);
} else if (item.type === 'object') { } else if (item.type === 'object') {
if (Object.keys(item.properties).length === 0) if (Object.keys(item.properties).length === 0)
continue; continue;
const init = objectType(item.properties, ' ', false, name); const init = objectType(item.properties, '', false, name);
writeCSharpClass(name, null, init.ts); writeCSharpClass(name, null, init.ts);
} }
} }