Skip to main content
Code Review

Return to Answer

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

Some changes I made (after noticing a few issues with it):

  • ExtraClasses has no need to be a field and a property; replaced both with public List<string> ExtraClasses { get; } = new List<string>();.
  • Since GetBodyDivContent is not static, I made removed extraClasses from the parameter, and made it directly used in the method.
  • I extracted a lot of Validate out to other protected methods.
  • I replaced ParseJson with TryParseJson as per RobH's RobH's answer answer.

Version as of this answer: ReCaptchaValidator.cs

Some changes I made (after noticing a few issues with it):

  • ExtraClasses has no need to be a field and a property; replaced both with public List<string> ExtraClasses { get; } = new List<string>();.
  • Since GetBodyDivContent is not static, I made removed extraClasses from the parameter, and made it directly used in the method.
  • I extracted a lot of Validate out to other protected methods.
  • I replaced ParseJson with TryParseJson as per RobH's answer.

Version as of this answer: ReCaptchaValidator.cs

Some changes I made (after noticing a few issues with it):

  • ExtraClasses has no need to be a field and a property; replaced both with public List<string> ExtraClasses { get; } = new List<string>();.
  • Since GetBodyDivContent is not static, I made removed extraClasses from the parameter, and made it directly used in the method.
  • I extracted a lot of Validate out to other protected methods.
  • I replaced ParseJson with TryParseJson as per RobH's answer.

Version as of this answer: ReCaptchaValidator.cs

Source Link
Der Kommissar
  • 20.3k
  • 4
  • 70
  • 158

Some changes I made (after noticing a few issues with it):

  • ExtraClasses has no need to be a field and a property; replaced both with public List<string> ExtraClasses { get; } = new List<string>();.
  • Since GetBodyDivContent is not static, I made removed extraClasses from the parameter, and made it directly used in the method.
  • I extracted a lot of Validate out to other protected methods.
  • I replaced ParseJson with TryParseJson as per RobH's answer.

Version as of this answer: ReCaptchaValidator.cs

lang-cs

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