mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(dotnet): fix properties with Is prefix (#5981)
This commit is contained in:
parent
ca7cd7a677
commit
5c1e8dcd80
@ -443,14 +443,14 @@ function renderMethod(member, parent, output, name) {
|
|||||||
// set-only methods to settable properties
|
// set-only methods to settable properties
|
||||||
if (member.args.size == 0
|
if (member.args.size == 0
|
||||||
&& type !== 'void'
|
&& type !== 'void'
|
||||||
&& !name.startsWith('Get')
|
&& !name.startsWith('Get')) {
|
||||||
&& !/Is[A-Z]/.test(name)) {
|
|
||||||
if (!member.async) {
|
if (!member.async) {
|
||||||
if (member.spec)
|
if (member.spec)
|
||||||
output(XmlDoc.renderXmlDoc(member.spec, maxDocumentationColumnWidth));
|
output(XmlDoc.renderXmlDoc(member.spec, maxDocumentationColumnWidth));
|
||||||
output(`${type} ${name} { get; }`);
|
output(`${type} ${name} { get; }`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!/Is[A-Z]/.test(name))
|
||||||
name = `Get${name}`;
|
name = `Get${name}`;
|
||||||
} else if (member.args.size == 1
|
} else if (member.args.size == 1
|
||||||
&& type === 'void'
|
&& type === 'void'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user