3535import  static  uk .co .real_logic .sbe .ir .GenerationUtil .collectGroups ;
3636import  static  uk .co .real_logic .sbe .ir .GenerationUtil .collectFields ;
3737
38+ @ SuppressWarnings ("MethodLength" )
3839public  class  CSharpGenerator  implements  CodeGenerator 
3940{
4041 private  static  final  String  META_ATTRIBUTE_ENUM  = "MetaAttribute" ;
@@ -357,6 +358,7 @@ private CharSequence generateVarData(final List<Token> tokens, final String inde
357358 indent  + "public const int %sHeaderSize = %d;\n " ,
358359 propertyName ,
359360 sizeOfLengthField ));
361+ 
360362 sb .append (String .format (indent  + "\n "  +
361363 indent  + "public int %1$sLength()\n "  +
362364 indent  + "{\n "  +
@@ -367,10 +369,12 @@ private CharSequence generateVarData(final List<Token> tokens, final String inde
367369 sizeOfLengthField ,
368370 lengthTypePrefix ,
369371 byteOrderStr ));
372+ 
370373 sb .append (String .format ("\n "  +
371374 indent  + "public int Get%1$s(byte[] dst, int dstOffset, int length) =>\n "  +
372375 indent  + INDENT  + "Get%1$s(new Span<byte>(dst, dstOffset, length));\n " ,
373376 propertyName ));
377+ 
374378 sb .append (String .format ("\n "  +
375379 indent  + "public int Get%1$s(Span<byte> dst)\n "  +
376380 indent  + "{\n "  +
@@ -389,6 +393,7 @@ private CharSequence generateVarData(final List<Token> tokens, final String inde
389393 sizeOfLengthField ,
390394 lengthTypePrefix ,
391395 byteOrderStr ));
396+ 
392397 sb .append (String .format (indent  + "\n "  +
393398 indent  + "// Allocates and returns a new byte array\n "  +
394399 indent  + "public byte[] Get%1$sBytes()\n "  +
@@ -407,10 +412,12 @@ private CharSequence generateVarData(final List<Token> tokens, final String inde
407412 sizeOfLengthField ,
408413 lengthTypePrefix ,
409414 byteOrderStr ));
415+ 
410416 sb .append (String .format ("\n "  +
411417 indent  + "public int Set%1$s(byte[] src, int srcOffset, int length) =>\n "  +
412418 indent  + INDENT  + "Set%1$s(new ReadOnlySpan<byte>(src, srcOffset, length));\n " ,
413419 propertyName ));
420+ 
414421 sb .append (String .format ("\n "  +
415422 indent  + "public int Set%1$s(ReadOnlySpan<byte> src)\n "  +
416423 indent  + "{\n "  +
@@ -492,7 +499,7 @@ private CharSequence generateCompositePropertyElements(final List<Token> tokens,
492499 final  Token  token  = tokens .get (i );
493500 final  String  propertyName  = formatPropertyName (token .name ());
494501
495-  // FIXME: do I need to pass classname  down here for disambiguation 
502+  // FIXME: do I need to pass class name  down here for disambiguation 
496503 switch  (token .signal ())
497504 {
498505 case  ENCODING :
0 commit comments