@@ -31,7 +31,7 @@ public CSharpElement Build(string? path, bool isInternal)
3131
3232 cls . Modifiers |= CSharpModifiers . Unsafe ;
3333
34- cls . AddTypeSupportAttribute ( _context . Metadata . ToString ( ) ) ;
34+ cls . AddTypeSupportAttribute ( _context . Metadata ) ;
3535 cls . AddTypeSupportInterface ( _context ) ;
3636
3737 cls . Members . Add ( EmitTypeSupportNameProperty ( ) ) ;
@@ -514,9 +514,8 @@ el.ValueType is PrimitiveTypes.String or PrimitiveTypes.WString &&
514514
515515 private CSharpMethod EmitCreateFrom ( )
516516 {
517- var method = new CSharpMethod ( )
517+ var method = new CSharpMethod ( "CreateFrom" )
518518 {
519- Name = "CreateFrom" ,
520519 Modifiers = CSharpModifiers . Static ,
521520 Visibility = CSharpVisibility . Public ,
522521 ReturnType = new CSharpFreeType ( "global::Rosidl.Runtime.IMessage" )
@@ -534,9 +533,8 @@ private CSharpMethod EmitCreateFrom()
534533
535534 private CSharpMethod EmitUnsafeCreate ( )
536535 {
537- var method = new CSharpMethod ( )
536+ var method = new CSharpMethod ( "UnsafeCreate" )
538537 {
539- Name = "UnsafeCreate" ,
540538 Modifiers = CSharpModifiers . Static ,
541539 Visibility = CSharpVisibility . Public ,
542540 ReturnType = new CSharpFreeType ( "nint" )
@@ -551,9 +549,8 @@ private CSharpMethod EmitUnsafeCreate()
551549
552550 private CSharpMethod EmitUnsafeInitialize ( )
553551 {
554- var method = new CSharpMethod ( )
552+ var method = new CSharpMethod ( "UnsafeInitialize" )
555553 {
556- Name = "UnsafeInitialize" ,
557554 Modifiers = CSharpModifiers . Static ,
558555 Visibility = CSharpVisibility . Public ,
559556 ReturnType = new CSharpPrimitiveType ( CSharpPrimitiveKind . Bool )
@@ -573,9 +570,8 @@ private CSharpMethod EmitUnsafeInitialize()
573570
574571 private CSharpMethod EmitUnsafeFinalize ( )
575572 {
576- var method = new CSharpMethod ( )
573+ var method = new CSharpMethod ( "UnsafeFinalize" )
577574 {
578- Name = "UnsafeFinalize" ,
579575 Modifiers = CSharpModifiers . Static ,
580576 Visibility = CSharpVisibility . Public ,
581577 ReturnType = new CSharpPrimitiveType ( CSharpPrimitiveKind . Void )
@@ -595,9 +591,8 @@ private CSharpMethod EmitUnsafeFinalize()
595591
596592 private CSharpMethod EmitUnsafeInitializeSequence ( )
597593 {
598- var method = new CSharpMethod ( )
594+ var method = new CSharpMethod ( "UnsafeInitializeSequence" )
599595 {
600- Name = "UnsafeInitializeSequence" ,
601596 Modifiers = CSharpModifiers . Static ,
602597 Visibility = CSharpVisibility . Public ,
603598 ReturnType = new CSharpPrimitiveType ( CSharpPrimitiveKind . Bool )
@@ -618,9 +613,8 @@ private CSharpMethod EmitUnsafeInitializeSequence()
618613
619614 private CSharpMethod EmitUnsafeFinalizeSequence ( )
620615 {
621- var method = new CSharpMethod ( )
616+ var method = new CSharpMethod ( "UnsafeFinalizeSequence" )
622617 {
623- Name = "UnsafeFinalizeSequence" ,
624618 Modifiers = CSharpModifiers . Static ,
625619 Visibility = CSharpVisibility . Public ,
626620 ReturnType = new CSharpPrimitiveType ( CSharpPrimitiveKind . Void )
@@ -640,9 +634,8 @@ private CSharpMethod EmitUnsafeFinalizeSequence()
640634
641635 private CSharpMethod EmitUnsafeDestroy ( )
642636 {
643- var method = new CSharpMethod ( )
637+ var method = new CSharpMethod ( "UnsafeDestroy" )
644638 {
645- Name = "UnsafeDestroy" ,
646639 Modifiers = CSharpModifiers . Static ,
647640 Visibility = CSharpVisibility . Public ,
648641 ReturnType = new CSharpPrimitiveType ( CSharpPrimitiveKind . Void )
@@ -659,9 +652,8 @@ private CSharpMethod EmitUnsafeDestroy()
659652
660653 private CSharpMethod EmitGetTypeSupportHandle ( )
661654 {
662- var method = new CSharpMethod ( )
655+ var method = new CSharpMethod ( "GetTypeSupportHandle" )
663656 {
664- Name = "GetTypeSupportHandle" ,
665657 Modifiers = CSharpModifiers . Static ,
666658 Visibility = CSharpVisibility . Public ,
667659 ReturnType = new CSharpFreeType ( "global::Rosidl.Runtime.TypeSupportHandle" )
@@ -698,9 +690,8 @@ private CSharpProperty EmitTypeSupportNameProperty()
698690
699691 private CSharpMethod EmitWriteTo ( )
700692 {
701- var method = new CSharpMethod ( )
693+ var method = new CSharpMethod ( "WriteTo" )
702694 {
703- Name = "WriteTo" ,
704695 Visibility = CSharpVisibility . Public ,
705696 ReturnType = new CSharpPrimitiveType ( CSharpPrimitiveKind . Void )
706697 } ;
@@ -717,9 +708,8 @@ private CSharpMethod EmitWriteTo()
717708
718709 private CSharpMethod EmitWriteToRef ( )
719710 {
720- var method = new CSharpMethod ( )
711+ var method = new CSharpMethod ( "WriteTo" )
721712 {
722- Name = "WriteTo" ,
723713 Visibility = CSharpVisibility . Public ,
724714 ReturnType = new CSharpPrimitiveType ( CSharpPrimitiveKind . Void )
725715 } ;
0 commit comments