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

Revised Type class to better document BindingFlags behavior #2387

Merged
merged 4 commits into from May 21, 2019

Conversation

rpetrusha
Copy link

@rpetrusha rpetrusha commented May 1, 2019

Revised to document BindingFlags behavior

This PR corrects a number of inaccuracies in the Type documentation:

  • BindingFlags.Static and/or BindingFlags.Instance are not sufficient to get a return value. Either BindingFlags.Public and/or BindingFlags.NonPublic must also be used.
  • The methods that return an array don't return null.
  • Supplying a value of 0 for a BindingFlags enumeration member seems confusing. I've replaced it with BindingFlags.Default.
  • Numerous other changes.

Fixes #2052

//cc @tarekgh @GrabYourPitchforks

@rpetrusha rpetrusha self-assigned this May 1, 2019
@rpetrusha
Copy link
Author

Closing and reopening to begin new build.

@rpetrusha rpetrusha closed this May 2, 2019
@rpetrusha rpetrusha reopened this May 2, 2019
@tarekgh
Copy link
Member

tarekgh commented May 2, 2019

@steveharter may help reviewing the changes here.

Copy link
Contributor

@mairaw mairaw left a comment

Choose a reason for hiding this comment

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

I left some comments re. the style rule for flag enums but it doesn't cover all of them.

xml/System/Type.xml Show resolved Hide resolved
xml/System/Type.xml Show resolved Hide resolved
xml/System/Type.xml Show resolved Hide resolved
xml/System/Type.xml Show resolved Hide resolved
xml/System/Type.xml Show resolved Hide resolved
xml/System/Type.xml Show resolved Hide resolved
xml/System/Type.xml Show resolved Hide resolved
xml/System/Type.xml Show resolved Hide resolved
xml/System/Type.xml Show resolved Hide resolved
xml/System/Type.xml Show resolved Hide resolved
@rpetrusha
Copy link
Author

I wasn't able to batch merge your suggestions, @mairaw, so I did them in a separate local commit. Thanks for the suggestions.

Copy link
Contributor

@mairaw mairaw left a comment

Choose a reason for hiding this comment

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

LGTM

@rpetrusha rpetrusha merged commit fbfb1e9 into dotnet:master May 21, 2019
@rpetrusha rpetrusha deleted the bindingflags branch June 10, 2019 22:51
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.

Type.GetProperties doc need to fixes
3 participants