Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

605: Fix enum no display attrib #608

Merged
merged 3 commits into from
Apr 18, 2017

Conversation

basildk
Copy link
Contributor

@basildk basildk commented Dec 30, 2016

Here is a checklist you should tick through before submitting a pull request:

  • Implementation is clean
  • Code adheres to the existing coding standards; e.g. no curlies for one-line blocks, no redundant empty lines between methods or code blocks, spaces rather than tabs, etc.
  • No ReSharper warnings
  • There is proper unit test coverage
  • If the code is copied from StackOverflow (or a blog or OSS) full disclosure is included. That includes required license files and/or file headers explaining where the code came from with proper attribution
  • There are very few or no comments (because comments shouldn't be needed if you write clean code)
  • Xml documentation is added/updated for the addition/change
  • Your PR is (re)based on top of the latest commits from the dev branch (more info below)
  • Link to the issue(s) you're fixing from your PR description. Use fixes #<the issue number>
  • Readme is updated if you change an existing feature or add a new one
  • Run either build.cmd or build.ps1 and ensure there are no test failures

So this is my take on solving #605.
I am very new to contributing to these kind of things, and my Github-skills are kindda none existing, but i think i have done everything needed.

Please let me know what you think.

Utilize null-checks to verify there is a description in the enums
display attribute
if (executedMethod != null) return executedMethod.ToString();
}
var methodGetName = attrType.GetRuntimeMethod(DisplayAttributeGetNameMethodName, new Type[0]);
if(methodGetName != null)
Copy link
Contributor

@aloisdg aloisdg Jan 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space here if ( ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed :)

Added a whitespace before if-statement
@clairernovotny clairernovotny merged commit 4b0ae7a into Humanizr:dev Apr 18, 2017
@clairernovotny
Copy link
Member

Thanks!

@clairernovotny clairernovotny modified the milestone: v2.2 Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants