Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FindEnumerableMethodForQueryable()

static MethodInfo System.Linq.EnumerableRewriter.FindEnumerableMethodForQueryable ( string name,
ReadOnlyCollection< Expression > args,
params Type[] typeArgs )
inlinestaticprivate

Definition at line 249 of file EnumerableRewriter.cs.

250 {
251 if (s_seqMethods == null)
252 {
253 s_seqMethods = GetEnumerableStaticMethods(typeof(Enumerable)).ToLookup((MethodInfo m) => m.Name);
254 }
256 if (typeArgs != null)
257 {
258 return methodInfo.MakeGenericMethod(typeArgs);
259 }
260 return methodInfo;
261 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2070:UnrecognizedReflectionPattern", Justification = "This method is intentionally hiding the Enumerable type from the trimmer so it doesn't preserve all Enumerable's methods. This is safe because all Queryable methods have a DynamicDependency to the corresponding Enumerable method.")]
263 {
264 return type.GetMethods(BindingFlags.Static | BindingFlags.Public);
265 }
266 }
static bool ArgsMatch(MethodInfo m, ReadOnlyCollection< Expression > args, Type[] typeArgs)
static ILookup< string, MethodInfo > s_seqMethods

References System.Linq.EnumerableRewriter.ArgsMatch(), System.Linq.EnumerableRewriter.s_seqMethods, and System.type.

Referenced by System.Linq.EnumerableRewriter.VisitMethodCall().