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

REFL014 message is hard to read #227

Open
jnm2 opened this issue Mar 25, 2020 · 2 comments
Open

REFL014 message is hard to read #227

jnm2 opened this issue Mar 25, 2020 · 2 comments

Comments

@jnm2
Copy link
Collaborator

jnm2 commented Mar 25, 2020

These messages obscure the interesting part, GetMethod:

Prefer typeof(EvaluatorContextDescriptor).GetProperty(nameof(EvaluatorContextDescriptor.IsTopLevelCollectionSource), BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly, null, typeof(bool), Type.EmptyTypes, null).GetMethod.

Prefer typeof(IEnumerator).GetProperty(nameof(IEnumerator.Current), BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly, null, typeof(object), Type.EmptyTypes, null).GetMethod.

@JohanLarsson
Copy link
Collaborator

JohanLarsson commented May 16, 2020

How should we change it?
Prefer GetProperty(...).GetMethod?

@jnm2
Copy link
Collaborator Author

jnm2 commented May 16, 2020

That looks good to me! No parens for GetMethod though because it's a property.

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

No branches or pull requests

2 participants