chore(dotnet): no nested namespace in transport channels (#17273)
This commit is contained in:
Родитель
48ac918cec
Коммит
c7367b7065
|
@ -226,11 +226,6 @@ for (const [name, type] of modelTypes)
|
|||
for (const [name, literals] of enumTypes)
|
||||
renderEnum(name, literals);
|
||||
|
||||
if (process.argv[3] !== '--skip-format') {
|
||||
// run the formatting tool for .NET, to ensure the files are prepped
|
||||
execSync(`dotnet format "${outputDir}"`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
*/
|
||||
|
|
|
@ -209,11 +209,10 @@ function writeCSharpClass(className, inheritFrom, serializedProperties) {
|
|||
channels_ts.push('using System.Collections.Generic;');
|
||||
channels_ts.push('using System.Text.Json.Serialization;');
|
||||
channels_ts.push(``);
|
||||
channels_ts.push(`namespace Microsoft.Playwright.Transport.Protocol`);
|
||||
channels_ts.push(`{`);
|
||||
channels_ts.push(` internal class ${className}${inheritFrom ? ' : ' + inheritFrom : ''}`);
|
||||
channels_ts.push(`namespace Microsoft.Playwright.Transport.Protocol;`);
|
||||
channels_ts.push(``);
|
||||
channels_ts.push(`internal class ${className}${inheritFrom ? ' : ' + inheritFrom : ''}`);
|
||||
channels_ts.push(serializedProperties);
|
||||
channels_ts.push(`}`);
|
||||
channels_ts.push(``);
|
||||
writeFile(`${className}.cs`, channels_ts.join('\n'));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче