Skip to main content
Code Review

Return to Answer

Commonmark migration
Source Link

Style

  • The overall reading of these methods is pretty good and the code is well structured.

  • The documentation is good to read and to understand.

  • Your style is a little bit inconsistent. It's about the using of braces {} for single statement if's . One time at the guard clause you use braces and later on for the if(throwErrors) you don't use them.

    Speaking about throwErrors, the method won't ever throw errors but oneException so a better name could be either shouldThrowException or throwsException.

Speaking about throwErrors, the method won't ever throw errors but oneException so a better name could be either shouldThrowException or throwsException.


Speaking about Serialize() method

I don't like ref parameters that much and I try to avoid them if there is a better/different way to solve this.

For the Serialize() method the usage of an ref parameter could be avoided by passing a StringBuilder instead of a string as argument.

You for sure would need to check if the passed in StringBuilder is not null but you could just pass it afterwards to this overload of the Serialize() method.

Style

  • The overall reading of these methods is pretty good and the code is well structured.

  • The documentation is good to read and to understand.

  • Your style is a little bit inconsistent. It's about the using of braces {} for single statement if's . One time at the guard clause you use braces and later on for the if(throwErrors) you don't use them.

Speaking about throwErrors, the method won't ever throw errors but oneException so a better name could be either shouldThrowException or throwsException.


Speaking about Serialize() method

I don't like ref parameters that much and I try to avoid them if there is a better/different way to solve this.

For the Serialize() method the usage of an ref parameter could be avoided by passing a StringBuilder instead of a string as argument.

You for sure would need to check if the passed in StringBuilder is not null but you could just pass it afterwards to this overload of the Serialize() method.

Style

  • The overall reading of these methods is pretty good and the code is well structured.

  • The documentation is good to read and to understand.

  • Your style is a little bit inconsistent. It's about the using of braces {} for single statement if's . One time at the guard clause you use braces and later on for the if(throwErrors) you don't use them.

    Speaking about throwErrors, the method won't ever throw errors but oneException so a better name could be either shouldThrowException or throwsException.


Speaking about Serialize() method

I don't like ref parameters that much and I try to avoid them if there is a better/different way to solve this.

For the Serialize() method the usage of an ref parameter could be avoided by passing a StringBuilder instead of a string as argument.

You for sure would need to check if the passed in StringBuilder is not null but you could just pass it afterwards to this overload of the Serialize() method.

Source Link
Heslacher
  • 50.9k
  • 5
  • 83
  • 177

Style

  • The overall reading of these methods is pretty good and the code is well structured.

  • The documentation is good to read and to understand.

  • Your style is a little bit inconsistent. It's about the using of braces {} for single statement if's . One time at the guard clause you use braces and later on for the if(throwErrors) you don't use them.

Speaking about throwErrors, the method won't ever throw errors but one Exception so a better name could be either shouldThrowException or throwsException.


Speaking about Serialize() method

I don't like ref parameters that much and I try to avoid them if there is a better/different way to solve this.

For the Serialize() method the usage of an ref parameter could be avoided by passing a StringBuilder instead of a string as argument.

You for sure would need to check if the passed in StringBuilder is not null but you could just pass it afterwards to this overload of the Serialize() method.

lang-cs

AltStyle によって変換されたページ (->オリジナル) /