We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb3e451 commit 2ad0142Copy full SHA for 2ad0142
1 file changed
Src/Support/Google.Apis.Core/Util/ReflectionCache.cs
@@ -53,13 +53,8 @@ internal static PropertyWithAttribute[] GetRequestParameterProperties(Type type)
53
{
54
// Get properties, filter by attribute, and cache only the filtered result
55
return t.GetProperties(BindingFlags.Instance | BindingFlags.Public)
56
- .Select(prop =>
57
- {
58
- var attribute = prop.GetCustomAttribute<RequestParameterAttribute>(inherit: false);
59
- return new { Property = prop, Attribute = attribute };
60
- })
61
- .Where(x => x.Attribute != null)
62
- .Select(x => new PropertyWithAttribute(x.Property, x.Attribute))
+ .Select(prop => new PropertyWithAttribute(prop, prop.GetCustomAttribute<RequestParameterAttribute>(inherit: false)))
+ .Where(pwa => pwa.Attribute != null)
63
.ToArray();
64
});
65
}
0 commit comments