@@ -161,8 +161,24 @@ export default class CSharpAstPrinter extends AstPrinterBase {
161161 }
162162 }
163163
164+ protected writeDelegateDeclaration ( d : cs . DelegateDeclaration ) {
165+ this . writeDocumentation ( d ) ;
166+ this . writeAttributes ( d ) ;
167+ this . writeVisibility ( d . visibility ) ;
168+
169+ this . write ( 'delegate ' ) ;
170+ this . writeType ( d . returnType ) ;
171+ this . write ( ` ${ d . name } ` ) ;
172+ this . writeTypeParameters ( d . typeParameters ) ;
173+ this . writeParameters ( d . parameters ) ;
174+ this . writeTypeParameterConstraints ( d . typeParameters ) ;
175+
176+ this . writeSemicolon ( ) ;
177+ }
178+
164179 protected writeInterfaceDeclaration ( d : cs . InterfaceDeclaration ) {
165180 this . writeDocumentation ( d ) ;
181+ this . writeAttributes ( d ) ;
166182 this . writeVisibility ( d . visibility ) ;
167183
168184 if ( d . partial ) {
@@ -190,6 +206,7 @@ export default class CSharpAstPrinter extends AstPrinterBase {
190206
191207 protected writeEnumDeclaration ( d : cs . EnumDeclaration ) {
192208 this . writeDocumentation ( d ) ;
209+ this . writeAttributes ( d ) ;
193210 this . writeVisibility ( d . visibility ) ;
194211 this . write ( `enum ${ d . name } ` ) ;
195212 this . writeLine ( ) ;
@@ -204,6 +221,7 @@ export default class CSharpAstPrinter extends AstPrinterBase {
204221
205222 protected writeEnumMember ( m : cs . EnumMember ) : void {
206223 this . writeDocumentation ( m ) ;
224+ this . writeAttributes ( m ) ;
207225 this . write ( m . name ) ;
208226 if ( m . initializer ) {
209227 this . write ( ' = ' ) ;
@@ -416,6 +434,7 @@ export default class CSharpAstPrinter extends AstPrinterBase {
416434
417435 protected writeConstructorDeclaration ( d : cs . ConstructorDeclaration ) {
418436 this . writeDocumentation ( d ) ;
437+ this . writeAttributes ( d ) ;
419438 this . writeVisibility ( d . visibility ) ;
420439 if ( d . isStatic ) {
421440 this . write ( 'static ' ) ;
@@ -437,6 +456,7 @@ export default class CSharpAstPrinter extends AstPrinterBase {
437456
438457 protected writePropertyDeclaration ( d : cs . PropertyDeclaration ) {
439458 this . writeDocumentation ( d ) ;
459+ this . writeAttributes ( d ) ;
440460 this . writeVisibility ( d . visibility ) ;
441461
442462 const writeAsField = this . writePropertyAsField ( d ) ;
@@ -491,6 +511,7 @@ export default class CSharpAstPrinter extends AstPrinterBase {
491511
492512 protected writeFieldDeclarat1on ( d : cs . FieldDeclaration ) {
493513 this . writeDocumentation ( d ) ;
514+ this . writeAttributes ( d ) ;
494515 this . writeVisibility ( d . visibility ) ;
495516
496517 if ( this . _context . isConst ( d ) ) {
0 commit comments