chore(dotnet): fix properties with Is prefix (#5981)

This commit is contained in:
Darío Kondratiuk 2021-03-30 00:05:51 -03:00 committed by GitHub
parent ca7cd7a677
commit 5c1e8dcd80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -443,15 +443,15 @@ function renderMethod(member, parent, output, name) {
// set-only methods to settable properties
if (member.args.size == 0
&& type !== 'void'
&& !name.startsWith('Get')
&& !/Is[A-Z]/.test(name)) {
&& !name.startsWith('Get')) {
if (!member.async) {
if (member.spec)
output(XmlDoc.renderXmlDoc(member.spec, maxDocumentationColumnWidth));
output(`${type} ${name} { get; }`);
return;
}
name = `Get${name}`;
if (!/Is[A-Z]/.test(name))
name = `Get${name}`;
} else if (member.args.size == 1
&& type === 'void'
&& name.startsWith('Set')