Skip to content

Commit

Permalink
chery-pick(#17248): chore(dotnet): use csharp 10 namespace declaration (
Browse files Browse the repository at this point in the history
#17305)

This PR cherry-picks the following commits:

- 0b4de0d

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
playwrightmachine and github-actions[bot] authored Sep 13, 2022
1 parent 991f2f9 commit ce68b2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions utils/doclint/templates/interface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@

#nullable enable

namespace Microsoft.Playwright
{
[CONTENT]
}
namespace Microsoft.Playwright;

[CONTENT]

#nullable disable
4 changes: 2 additions & 2 deletions utils/generate_dotnet_channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit ce68b2f

Please sign in to comment.