Open jnm2 opened 4 years ago
These messages obscure the interesting part, GetMethod:
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.
How should we change it? Prefer GetProperty(...).GetMethod?
Prefer GetProperty(...).GetMethod
That looks good to me! No parens for GetMethod though because it's a property.
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.