chore(dotnet): generate generic EventHandlers (#6076)

This commit is contained in:
Darío Kondratiuk 2021-04-06 07:23:26 -03:00 committed by GitHub
parent 33198c3d1a
commit fd40c92a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -280,10 +280,7 @@ function renderMember(member, parent, out) {
throw new Error(`No Event Type for ${name} in ${parent.name}`);
if (member.spec)
output(XmlDoc.renderXmlDoc(member.spec, maxDocumentationColumnWidth));
if (parent && (classNameMap.get(parent.name) === type))
output(`event EventHandler ${name};`); // event sender will be the type, so we're fine to ignore
else
output(`event EventHandler<${type}> ${name};`);
output(`event EventHandler<${type}> ${name};`);
} else if (member.kind === 'property') {
if (member.spec)
output(XmlDoc.renderXmlDoc(member.spec, maxDocumentationColumnWidth));