fix(dotnet): correctly mark members as deprecated (#9977)

This commit is contained in:
Joel Einbinder 2021-11-23 03:00:12 -05:00 committed by GitHub
parent 9c1ff08186
commit bd5ae9e0cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,7 +293,6 @@ function renderMember(member, parent, options, out) {
return;
}
/** @type string */
let type = translateType(member.type, parent, t => generateNameDefault(member, name, t, parent));
if (member.kind === 'event') {
if (!member.type)
@ -301,6 +300,8 @@ function renderMember(member, parent, options, out) {
out.push('');
if (member.spec)
out.push(...XmlDoc.renderXmlDoc(member.spec, maxDocumentationColumnWidth));
if (member.deprecated)
out.push(`[System.Obsolete]`);
out.push(`event EventHandler<${type}> ${name};`);
return;
}
@ -499,6 +500,8 @@ function renderMethod(member, parent, name, options, out) {
if (!member.async) {
if (member.spec && !options.nodocs)
out.push(...XmlDoc.renderXmlDoc(member.spec, maxDocumentationColumnWidth));
if (member.deprecated)
out.push(`[System.Obsolete]`);
out.push(`${type} ${name} { get; }`);
return;
}