diff --git a/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.cs b/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.cs index f8282977280bf0..1f99c525352dc6 100644 --- a/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.cs +++ b/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.cs @@ -18,11 +18,11 @@ public abstract partial class EnumerableQuery { internal EnumerableQuery() { } } + [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Enumerating in-memory collections as IQueryable can require unreferenced code because expressions referencing IQueryable extension methods can get rebound to IEnumerable extension methods. The IEnumerable extension methods could be trimmed causing the application to fail at runtime.")] + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public partial class EnumerableQuery : System.Linq.EnumerableQuery, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable, System.Linq.IOrderedQueryable, System.Linq.IOrderedQueryable, System.Linq.IQueryable, System.Linq.IQueryable, System.Linq.IQueryProvider { - [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Enumerating in-memory collections as IQueryable can require unreferenced code because expressions referencing IQueryable extension methods can get rebound to IEnumerable extension methods. The IEnumerable extension methods could be trimmed causing the application to fail at runtime.")] public EnumerableQuery(System.Collections.Generic.IEnumerable enumerable) { } - [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Enumerating in-memory collections as IQueryable can require unreferenced code because expressions referencing IQueryable extension methods can get rebound to IEnumerable extension methods. The IEnumerable extension methods could be trimmed causing the application to fail at runtime.")] public EnumerableQuery(System.Linq.Expressions.Expression expression) { } System.Type System.Linq.IQueryable.ElementType { get { throw null; } } System.Linq.Expressions.Expression System.Linq.IQueryable.Expression { get { throw null; } } @@ -37,16 +37,25 @@ public EnumerableQuery(System.Linq.Expressions.Expression expression) { } } public static partial class Queryable { + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource Aggregate(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> func) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TAccumulate Aggregate(this System.Linq.IQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> func) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TResult Aggregate(this System.Linq.IQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> func, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static bool All(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static bool Any(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static bool Any(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Append(this System.Linq.IQueryable source, TSource element) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Enumerating in-memory collections as IQueryable can require unreferenced code because expressions referencing IQueryable extension methods can get rebound to IEnumerable extension methods. The IEnumerable extension methods could be trimmed causing the application to fail at runtime.")] + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable AsQueryable(this System.Collections.IEnumerable source) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Enumerating in-memory collections as IQueryable can require unreferenced code because expressions referencing IQueryable extension methods can get rebound to IEnumerable extension methods. The IEnumerable extension methods could be trimmed causing the application to fail at runtime.")] + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable AsQueryable(this System.Collections.Generic.IEnumerable source) { throw null; } public static decimal Average(this System.Linq.IQueryable source) { throw null; } public static double Average(this System.Linq.IQueryable source) { throw null; } @@ -58,105 +67,205 @@ public static partial class Queryable public static double? Average(this System.Linq.IQueryable source) { throw null; } public static float? Average(this System.Linq.IQueryable source) { throw null; } public static float Average(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static decimal Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static double Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static double Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static double Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static decimal? Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static double? Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static double? Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static double? Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static float? Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static float Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Cast(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Chunk(this System.Linq.IQueryable source, int size) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Concat(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static bool Contains(this System.Linq.IQueryable source, TSource item) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static bool Contains(this System.Linq.IQueryable source, TSource item, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static int Count(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static int Count(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable DefaultIfEmpty(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable DefaultIfEmpty(this System.Linq.IQueryable source, TSource defaultValue) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable DistinctBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable DistinctBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Distinct(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Distinct(this System.Linq.IQueryable source, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? ElementAtOrDefault(this System.Linq.IQueryable source, System.Index index) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? ElementAtOrDefault(this System.Linq.IQueryable source, int index) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource ElementAt(this System.Linq.IQueryable source, System.Index index) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource ElementAt(this System.Linq.IQueryable source, int index) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable ExceptBy(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable ExceptBy(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Except(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Except(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? FirstOrDefault(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? FirstOrDefault(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource FirstOrDefault(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, TSource defaultValue) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource FirstOrDefault(this System.Linq.IQueryable source, TSource defaultValue) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource First(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource First(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable> GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable> GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable> GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable> GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression, TResult>> resultSelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Linq.Expressions.Expression, TResult>> resultSelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable GroupJoin(this System.Linq.IQueryable outer, System.Collections.Generic.IEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression, TResult>> resultSelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable GroupJoin(this System.Linq.IQueryable outer, System.Collections.Generic.IEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable IntersectBy(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable IntersectBy(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Intersect(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Intersect(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Join(this System.Linq.IQueryable outer, System.Collections.Generic.IEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression> resultSelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Join(this System.Linq.IQueryable outer, System.Collections.Generic.IEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? LastOrDefault(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? LastOrDefault(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource LastOrDefault(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, TSource defaultValue) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource LastOrDefault(this System.Linq.IQueryable source, TSource defaultValue) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource Last(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource Last(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static long LongCount(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static long LongCount(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? MaxBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? MaxBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? Max(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? Max(this System.Linq.IQueryable source, System.Collections.Generic.IComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TResult? Max(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? MinBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? MinBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? Min(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? Min(this System.Linq.IQueryable source, System.Collections.Generic.IComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TResult? Min(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable OfType(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable OrderByDescending(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable OrderByDescending(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable OrderBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable OrderBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable OrderDescending(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable OrderDescending(this System.Linq.IQueryable source, System.Collections.Generic.IComparer comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable Order(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable Order(this System.Linq.IQueryable source, System.Collections.Generic.IComparer comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Prepend(this System.Linq.IQueryable source, TSource element) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Reverse(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable SelectMany(this System.Linq.IQueryable source, System.Linq.Expressions.Expression>> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable SelectMany(this System.Linq.IQueryable source, System.Linq.Expressions.Expression>> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable SelectMany(this System.Linq.IQueryable source, System.Linq.Expressions.Expression>> collectionSelector, System.Linq.Expressions.Expression> resultSelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable SelectMany(this System.Linq.IQueryable source, System.Linq.Expressions.Expression>> collectionSelector, System.Linq.Expressions.Expression> resultSelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Select(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Select(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static bool SequenceEqual(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static bool SequenceEqual(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? SingleOrDefault(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource? SingleOrDefault(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource SingleOrDefault(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, TSource defaultValue) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource SingleOrDefault(this System.Linq.IQueryable source, TSource defaultValue) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource Single(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static TSource Single(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable SkipLast(this System.Linq.IQueryable source, int count) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable SkipWhile(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable SkipWhile(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Skip(this System.Linq.IQueryable source, int count) { throw null; } public static decimal Sum(this System.Linq.IQueryable source) { throw null; } public static double Sum(this System.Linq.IQueryable source) { throw null; } @@ -168,33 +277,61 @@ public static partial class Queryable public static long? Sum(this System.Linq.IQueryable source) { throw null; } public static float? Sum(this System.Linq.IQueryable source) { throw null; } public static float Sum(this System.Linq.IQueryable source) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static decimal Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static double Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static int Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static long Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static decimal? Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static double? Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static int? Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static long? Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static float? Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static float Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable TakeLast(this System.Linq.IQueryable source, int count) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable TakeWhile(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable TakeWhile(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Take(this System.Linq.IQueryable source, int count) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Take(this System.Linq.IQueryable source, System.Range range) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable ThenByDescending(this System.Linq.IOrderedQueryable source, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable ThenByDescending(this System.Linq.IOrderedQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable ThenBy(this System.Linq.IOrderedQueryable source, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IOrderedQueryable ThenBy(this System.Linq.IOrderedQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable UnionBy(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Linq.Expressions.Expression> keySelector) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable UnionBy(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Union(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Union(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Where(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Where(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable<(TFirst First, TSecond Second)> Zip(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable<(TFirst First, TSecond Second, TThird Third)> Zip(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Collections.Generic.IEnumerable source3) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")] public static System.Linq.IQueryable Zip(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Linq.Expressions.Expression> resultSelector) { throw null; } } } diff --git a/src/libraries/System.Linq.Queryable/src/System.Linq.Queryable.csproj b/src/libraries/System.Linq.Queryable/src/System.Linq.Queryable.csproj index 4d7656af1da60a..75fb21c085ac1c 100644 --- a/src/libraries/System.Linq.Queryable/src/System.Linq.Queryable.csproj +++ b/src/libraries/System.Linq.Queryable/src/System.Linq.Queryable.csproj @@ -1,6 +1,7 @@ $(NetCoreAppCurrent) + true diff --git a/src/libraries/System.Linq.Queryable/src/System/Linq/CachedReflection.cs b/src/libraries/System.Linq.Queryable/src/System/Linq/CachedReflection.cs index 99c98faf7ecbe3..514580fb334c0e 100644 --- a/src/libraries/System.Linq.Queryable/src/System/Linq/CachedReflection.cs +++ b/src/libraries/System.Linq.Queryable/src/System/Linq/CachedReflection.cs @@ -14,36 +14,42 @@ internal static class CachedReflectionInfo { private static MethodInfo? s_Aggregate_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Aggregate_TSource_2(Type TSource) => (s_Aggregate_TSource_2 ??= new Func, Expression>, object>(Queryable.Aggregate).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Aggregate_TSource_TAccumulate_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Aggregate_TSource_TAccumulate_3(Type TSource, Type TAccumulate) => (s_Aggregate_TSource_TAccumulate_3 ??= new Func, object, Expression>, object>(Queryable.Aggregate).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TAccumulate); private static MethodInfo? s_Aggregate_TSource_TAccumulate_TResult_4; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Aggregate_TSource_TAccumulate_TResult_4(Type TSource, Type TAccumulate, Type TResult) => (s_Aggregate_TSource_TAccumulate_TResult_4 ??= new Func, object, Expression>, Expression>, object>(Queryable.Aggregate).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TAccumulate, TResult); private static MethodInfo? s_All_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo All_TSource_2(Type TSource) => (s_All_TSource_2 ??= new Func, Expression>, bool>(Queryable.All).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Any_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Any_TSource_1(Type TSource) => (s_Any_TSource_1 ??= new Func, bool>(Queryable.Any).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Any_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Any_TSource_2(Type TSource) => (s_Any_TSource_2 ??= new Func, Expression>, bool>(Queryable.Any).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); @@ -100,588 +106,686 @@ public static MethodInfo Any_TSource_2(Type TSource) => private static MethodInfo? s_Average_Int32_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Average_Int32_TSource_2(Type TSource) => (s_Average_Int32_TSource_2 ??= new Func, Expression>, double>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Average_NullableInt32_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Average_NullableInt32_TSource_2(Type TSource) => (s_Average_NullableInt32_TSource_2 ??= new Func, Expression>, double?>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Average_Single_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Average_Single_TSource_2(Type TSource) => (s_Average_Single_TSource_2 ??= new Func, Expression>, float>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Average_NullableSingle_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Average_NullableSingle_TSource_2(Type TSource) => (s_Average_NullableSingle_TSource_2 ??= new Func, Expression>, float?>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Average_Int64_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Average_Int64_TSource_2(Type TSource) => (s_Average_Int64_TSource_2 ??= new Func, Expression>, double>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Average_NullableInt64_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Average_NullableInt64_TSource_2(Type TSource) => (s_Average_NullableInt64_TSource_2 ??= new Func, Expression>, double?>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Average_Double_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Average_Double_TSource_2(Type TSource) => (s_Average_Double_TSource_2 ??= new Func, Expression>, double>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Average_NullableDouble_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Average_NullableDouble_TSource_2(Type TSource) => (s_Average_NullableDouble_TSource_2 ??= new Func, Expression>, double?>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Average_Decimal_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Average_Decimal_TSource_2(Type TSource) => (s_Average_Decimal_TSource_2 ??= new Func, Expression>, decimal>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Average_NullableDecimal_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Average_NullableDecimal_TSource_2(Type TSource) => (s_Average_NullableDecimal_TSource_2 ??= new Func, Expression>, decimal?>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Cast_TResult_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Cast_TResult_1(Type TResult) => (s_Cast_TResult_1 ??= new Func>(Queryable.Cast).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TResult); private static MethodInfo? s_Chunk_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Chunk_TSource_1(Type TSource) => (s_Chunk_TSource_1 ??= new Func, int, IQueryable>(Queryable.Chunk).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Concat_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Concat_TSource_2(Type TSource) => (s_Concat_TSource_2 ??= new Func, IEnumerable, IQueryable>(Queryable.Concat).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Contains_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Contains_TSource_2(Type TSource) => (s_Contains_TSource_2 ??= new Func, object, bool>(Queryable.Contains).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Contains_TSource_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Contains_TSource_3(Type TSource) => (s_Contains_TSource_3 ??= new Func, object, IEqualityComparer, bool>(Queryable.Contains).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Count_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Count_TSource_1(Type TSource) => (s_Count_TSource_1 ??= new Func, int>(Queryable.Count).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Count_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Count_TSource_2(Type TSource) => (s_Count_TSource_2 ??= new Func, Expression>, int>(Queryable.Count).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_DefaultIfEmpty_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo DefaultIfEmpty_TSource_1(Type TSource) => (s_DefaultIfEmpty_TSource_1 ??= new Func, IQueryable>(Queryable.DefaultIfEmpty).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_DefaultIfEmpty_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo DefaultIfEmpty_TSource_2(Type TSource) => (s_DefaultIfEmpty_TSource_2 ??= new Func, object, IQueryable>(Queryable.DefaultIfEmpty).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Distinct_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Distinct_TSource_1(Type TSource) => (s_Distinct_TSource_1 ??= new Func, IQueryable>(Queryable.Distinct).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Distinct_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Distinct_TSource_2(Type TSource) => (s_Distinct_TSource_2 ??= new Func, IEqualityComparer, IQueryable>(Queryable.Distinct).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_DistinctBy_TSource_TKey_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo DistinctBy_TSource_TKey_2(Type TSource, Type TKey) => (s_DistinctBy_TSource_TKey_2 ??= new Func, Expression>, IQueryable>(Queryable.DistinctBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_DistinctBy_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo DistinctBy_TSource_TKey_3(Type TSource, Type TKey) => (s_DistinctBy_TSource_TKey_3 ??= new Func, Expression>, IEqualityComparer, IQueryable>(Queryable.DistinctBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_ElementAt_Int32_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo ElementAt_Int32_TSource_2(Type TSource) => (s_ElementAt_Int32_TSource_2 ??= new Func, int, object>(Queryable.ElementAt).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_ElementAt_Index_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo ElementAt_Index_TSource_2(Type TSource) => (s_ElementAt_Index_TSource_2 ??= new Func, Index, object>(Queryable.ElementAt).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_ElementAtOrDefault_Int32_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo ElementAtOrDefault_Int32_TSource_2(Type TSource) => (s_ElementAtOrDefault_Int32_TSource_2 ??= new Func, int, object?>(Queryable.ElementAtOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_ElementAtOrDefault_Index_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo ElementAtOrDefault_Index_TSource_2(Type TSource) => (s_ElementAtOrDefault_Index_TSource_2 ??= new Func, Index, object?>(Queryable.ElementAtOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Except_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Except_TSource_2(Type TSource) => (s_Except_TSource_2 ??= new Func, IEnumerable, IQueryable>(Queryable.Except).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Except_TSource_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Except_TSource_3(Type TSource) => (s_Except_TSource_3 ??= new Func, IEnumerable, IEqualityComparer, IQueryable>(Queryable.Except).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_ExceptBy_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo ExceptBy_TSource_TKey_3(Type TSource, Type TKey) => (s_ExceptBy_TSource_TKey_3 ??= new Func, IEnumerable, Expression>, IQueryable>(Queryable.ExceptBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_ExceptBy_TSource_TKey_4; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo ExceptBy_TSource_TKey_4(Type TSource, Type TKey) => (s_ExceptBy_TSource_TKey_4 ??= new Func, IEnumerable, Expression>, IEqualityComparer, IQueryable>(Queryable.ExceptBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_First_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo First_TSource_1(Type TSource) => (s_First_TSource_1 ??= new Func, object>(Queryable.First).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_First_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo First_TSource_2(Type TSource) => (s_First_TSource_2 ??= new Func, Expression>, object>(Queryable.First).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_FirstOrDefault_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo FirstOrDefault_TSource_1(Type TSource) => (s_FirstOrDefault_TSource_1 ??= new Func, object?>(Queryable.FirstOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_FirstOrDefault_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo FirstOrDefault_TSource_2(Type TSource) => (s_FirstOrDefault_TSource_2 ??= new Func, Expression>, object?>(Queryable.FirstOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_FirstOrDefault_TSource_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo FirstOrDefault_TSource_3(Type TSource) => (s_FirstOrDefault_TSource_3 ??= new Func, object, object>(Queryable.FirstOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_FirstOrDefault_TSource_4; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo FirstOrDefault_TSource_4(Type TSource) => (s_FirstOrDefault_TSource_4 ??= new Func, Expression>, object, object>(Queryable.FirstOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_GroupBy_TSource_TKey_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo GroupBy_TSource_TKey_2(Type TSource, Type TKey) => (s_GroupBy_TSource_TKey_2 ??= new Func, Expression>, IQueryable>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_GroupBy_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo GroupBy_TSource_TKey_3(Type TSource, Type TKey) => (s_GroupBy_TSource_TKey_3 ??= new Func, Expression>, IEqualityComparer, IQueryable>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_GroupBy_TSource_TKey_TElement_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo GroupBy_TSource_TKey_TElement_3(Type TSource, Type TKey, Type TElement) => (s_GroupBy_TSource_TKey_TElement_3 ??= new Func, Expression>, Expression>, IQueryable>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey, TElement); private static MethodInfo? s_GroupBy_TSource_TKey_TElement_4; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo GroupBy_TSource_TKey_TElement_4(Type TSource, Type TKey, Type TElement) => (s_GroupBy_TSource_TKey_TElement_4 ??= new Func, Expression>, Expression>, IEqualityComparer, IQueryable>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey, TElement); private static MethodInfo? s_GroupBy_TSource_TKey_TResult_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo GroupBy_TSource_TKey_TResult_3(Type TSource, Type TKey, Type TResult) => (s_GroupBy_TSource_TKey_TResult_3 ??= new Func, Expression>, Expression, object>>, IQueryable>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey, TResult); private static MethodInfo? s_GroupBy_TSource_TKey_TResult_4; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo GroupBy_TSource_TKey_TResult_4(Type TSource, Type TKey, Type TResult) => (s_GroupBy_TSource_TKey_TResult_4 ??= new Func, Expression>, Expression, object>>, IEqualityComparer, IQueryable>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey, TResult); private static MethodInfo? s_GroupBy_TSource_TKey_TElement_TResult_4; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo GroupBy_TSource_TKey_TElement_TResult_4(Type TSource, Type TKey, Type TElement, Type TResult) => (s_GroupBy_TSource_TKey_TElement_TResult_4 ??= new Func, Expression>, Expression>, Expression, object>>, IQueryable>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey, TElement, TResult); private static MethodInfo? s_GroupBy_TSource_TKey_TElement_TResult_5; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo GroupBy_TSource_TKey_TElement_TResult_5(Type TSource, Type TKey, Type TElement, Type TResult) => (s_GroupBy_TSource_TKey_TElement_TResult_5 ??= new Func, Expression>, Expression>, Expression, object>>, IEqualityComparer, IQueryable>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey, TElement, TResult); private static MethodInfo? s_GroupJoin_TOuter_TInner_TKey_TResult_5; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo GroupJoin_TOuter_TInner_TKey_TResult_5(Type TOuter, Type TInner, Type TKey, Type TResult) => (s_GroupJoin_TOuter_TInner_TKey_TResult_5 ??= new Func, IEnumerable, Expression>, Expression>, Expression, object>>, IQueryable>(Queryable.GroupJoin).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TOuter, TInner, TKey, TResult); private static MethodInfo? s_GroupJoin_TOuter_TInner_TKey_TResult_6; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo GroupJoin_TOuter_TInner_TKey_TResult_6(Type TOuter, Type TInner, Type TKey, Type TResult) => (s_GroupJoin_TOuter_TInner_TKey_TResult_6 ??= new Func, IEnumerable, Expression>, Expression>, Expression, object>>, IEqualityComparer, IQueryable>(Queryable.GroupJoin).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TOuter, TInner, TKey, TResult); private static MethodInfo? s_Intersect_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Intersect_TSource_2(Type TSource) => (s_Intersect_TSource_2 ??= new Func, IEnumerable, IQueryable>(Queryable.Intersect).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Intersect_TSource_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Intersect_TSource_3(Type TSource) => (s_Intersect_TSource_3 ??= new Func, IEnumerable, IEqualityComparer, IQueryable>(Queryable.Intersect).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_IntersectBy_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo IntersectBy_TSource_TKey_3(Type TSource, Type TKey) => (s_IntersectBy_TSource_TKey_3 ??= new Func, IEnumerable, Expression>, IQueryable>(Queryable.IntersectBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_IntersectBy_TSource_TKey_4; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo IntersectBy_TSource_TKey_4(Type TSource, Type TKey) => (s_IntersectBy_TSource_TKey_4 ??= new Func, IEnumerable, Expression>, IEqualityComparer, IQueryable>(Queryable.IntersectBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_Join_TOuter_TInner_TKey_TResult_5; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Join_TOuter_TInner_TKey_TResult_5(Type TOuter, Type TInner, Type TKey, Type TResult) => (s_Join_TOuter_TInner_TKey_TResult_5 ??= new Func, IEnumerable, Expression>, Expression>, Expression>, IQueryable>(Queryable.Join).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TOuter, TInner, TKey, TResult); private static MethodInfo? s_Join_TOuter_TInner_TKey_TResult_6; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Join_TOuter_TInner_TKey_TResult_6(Type TOuter, Type TInner, Type TKey, Type TResult) => (s_Join_TOuter_TInner_TKey_TResult_6 ??= new Func, IEnumerable, Expression>, Expression>, Expression>, IEqualityComparer, IQueryable>(Queryable.Join).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TOuter, TInner, TKey, TResult); private static MethodInfo? s_Last_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Last_TSource_1(Type TSource) => (s_Last_TSource_1 ??= new Func, object>(Queryable.Last).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Last_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Last_TSource_2(Type TSource) => (s_Last_TSource_2 ??= new Func, Expression>, object>(Queryable.Last).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_LastOrDefault_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo LastOrDefault_TSource_1(Type TSource) => (s_LastOrDefault_TSource_1 ??= new Func, object?>(Queryable.LastOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_LastOrDefault_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo LastOrDefault_TSource_2(Type TSource) => (s_LastOrDefault_TSource_2 ??= new Func, Expression>, object?>(Queryable.LastOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_LastOrDefault_TSource_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo LastOrDefault_TSource_3(Type TSource) => (s_LastOrDefault_TSource_3 ??= new Func, object, object>(Queryable.LastOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_LastOrDefault_TSource_4; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo LastOrDefault_TSource_4(Type TSource) => (s_LastOrDefault_TSource_4 ??= new Func, Expression>, object, object>(Queryable.LastOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_LongCount_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo LongCount_TSource_1(Type TSource) => (s_LongCount_TSource_1 ??= new Func, long>(Queryable.LongCount).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_LongCount_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo LongCount_TSource_2(Type TSource) => (s_LongCount_TSource_2 ??= new Func, Expression>, long>(Queryable.LongCount).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Max_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Max_TSource_1(Type TSource) => (s_Max_TSource_1 ??= new Func, object?>(Queryable.Max).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Max_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Max_TSource_2(Type TSource) => (s_Max_TSource_2 ??= new Func, IComparer, object?>(Queryable.Max).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Max_TSource_TResult_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Max_TSource_TResult_2(Type TSource, Type TResult) => (s_Max_TSource_TResult_2 ??= new Func, Expression>, object?>(Queryable.Max).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TResult); private static MethodInfo? s_MaxBy_TSource_TKey_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo MaxBy_TSource_TKey_2(Type TSource, Type TKey) => (s_MaxBy_TSource_TKey_2 ??= new Func, Expression>, object?>(Queryable.MaxBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_MaxBy_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo MaxBy_TSource_TKey_3(Type TSource, Type TKey) => (s_MaxBy_TSource_TKey_3 ??= new Func, Expression>, IComparer, object?>(Queryable.MaxBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_Min_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Min_TSource_1(Type TSource) => (s_Min_TSource_1 ??= new Func, object?>(Queryable.Min).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Min_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Min_TSource_2(Type TSource) => (s_Min_TSource_2 ??= new Func, IComparer, object?>(Queryable.Min).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Min_TSource_TResult_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Min_TSource_TResult_2(Type TSource, Type TResult) => (s_Min_TSource_TResult_2 ??= new Func, Expression>, object?>(Queryable.Min).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TResult); private static MethodInfo? s_MinBy_TSource_TKey_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo MinBy_TSource_TKey_2(Type TSource, Type TKey) => (s_MinBy_TSource_TKey_2 ??= new Func, Expression>, object?>(Queryable.MinBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_MinBy_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo MinBy_TSource_TKey_3(Type TSource, Type TKey) => (s_MinBy_TSource_TKey_3 ??= new Func, Expression>, IComparer, object?>(Queryable.MinBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_OfType_TResult_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo OfType_TResult_1(Type TResult) => (s_OfType_TResult_1 ??= new Func>(Queryable.OfType).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TResult); private static MethodInfo? s_Order_T_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Order_T_1(Type T) => (s_Order_T_1 ??= new Func, IOrderedQueryable>(Queryable.Order).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(T); private static MethodInfo? s_Order_T_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Order_T_2(Type T) => (s_Order_T_2 ??= new Func, IComparer, IOrderedQueryable>(Queryable.Order).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(T); private static MethodInfo? s_OrderBy_TSource_TKey_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo OrderBy_TSource_TKey_2(Type TSource, Type TKey) => (s_OrderBy_TSource_TKey_2 ??= new Func, Expression>, IOrderedQueryable>(Queryable.OrderBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_OrderDescending_T_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo OrderDescending_T_1(Type T) => (s_OrderDescending_T_1 ??= new Func, IOrderedQueryable>(Queryable.OrderDescending).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(T); private static MethodInfo? s_OrderDescending_T_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo OrderDescending_T_2(Type T) => (s_OrderDescending_T_2 ??= new Func, IComparer, IOrderedQueryable>(Queryable.OrderDescending).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(T); private static MethodInfo? s_OrderBy_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo OrderBy_TSource_TKey_3(Type TSource, Type TKey) => (s_OrderBy_TSource_TKey_3 ??= new Func, Expression>, IComparer, IOrderedQueryable>(Queryable.OrderBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_OrderByDescending_TSource_TKey_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo OrderByDescending_TSource_TKey_2(Type TSource, Type TKey) => (s_OrderByDescending_TSource_TKey_2 ??= new Func, Expression>, IOrderedQueryable>(Queryable.OrderByDescending).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_OrderByDescending_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo OrderByDescending_TSource_TKey_3(Type TSource, Type TKey) => (s_OrderByDescending_TSource_TKey_3 ??= new Func, Expression>, IComparer, IOrderedQueryable>(Queryable.OrderByDescending).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_Reverse_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Reverse_TSource_1(Type TSource) => (s_Reverse_TSource_1 ??= new Func, IQueryable>(Queryable.Reverse).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Select_TSource_TResult_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Select_TSource_TResult_2(Type TSource, Type TResult) => (s_Select_TSource_TResult_2 ??= new Func, Expression>, IQueryable>(Queryable.Select).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TResult); private static MethodInfo? s_Select_Index_TSource_TResult_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Select_Index_TSource_TResult_2(Type TSource, Type TResult) => (s_Select_Index_TSource_TResult_2 ??= new Func, Expression>, IQueryable>(Queryable.Select).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TResult); private static MethodInfo? s_SelectMany_TSource_TResult_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SelectMany_TSource_TResult_2(Type TSource, Type TResult) => (s_SelectMany_TSource_TResult_2 ??= new Func, Expression>>, IQueryable>(Queryable.SelectMany).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TResult); private static MethodInfo? s_SelectMany_Index_TSource_TResult_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SelectMany_Index_TSource_TResult_2(Type TSource, Type TResult) => (s_SelectMany_Index_TSource_TResult_2 ??= new Func, Expression>>, IQueryable>(Queryable.SelectMany).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TResult); private static MethodInfo? s_SelectMany_Index_TSource_TCollection_TResult_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SelectMany_Index_TSource_TCollection_TResult_3(Type TSource, Type TCollection, Type TResult) => (s_SelectMany_Index_TSource_TCollection_TResult_3 ??= new Func, Expression>>, Expression>, IQueryable>(Queryable.SelectMany).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TCollection, TResult); private static MethodInfo? s_SelectMany_TSource_TCollection_TResult_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SelectMany_TSource_TCollection_TResult_3(Type TSource, Type TCollection, Type TResult) => (s_SelectMany_TSource_TCollection_TResult_3 ??= new Func, Expression>>, Expression>, IQueryable>(Queryable.SelectMany).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TCollection, TResult); private static MethodInfo? s_SequenceEqual_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SequenceEqual_TSource_2(Type TSource) => (s_SequenceEqual_TSource_2 ??= new Func, IEnumerable, bool>(Queryable.SequenceEqual).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_SequenceEqual_TSource_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SequenceEqual_TSource_3(Type TSource) => (s_SequenceEqual_TSource_3 ??= new Func, IEnumerable, IEqualityComparer, bool>(Queryable.SequenceEqual).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Single_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Single_TSource_1(Type TSource) => (s_Single_TSource_1 ??= new Func, object>(Queryable.Single).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Single_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Single_TSource_2(Type TSource) => (s_Single_TSource_2 ??= new Func, Expression>, object>(Queryable.Single).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_SingleOrDefault_TSource_1; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SingleOrDefault_TSource_1(Type TSource) => (s_SingleOrDefault_TSource_1 ??= new Func, object?>(Queryable.SingleOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_SingleOrDefault_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SingleOrDefault_TSource_2(Type TSource) => (s_SingleOrDefault_TSource_2 ??= new Func, Expression>, object?>(Queryable.SingleOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_SingleOrDefault_TSource_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SingleOrDefault_TSource_3(Type TSource) => (s_SingleOrDefault_TSource_3 ??= new Func, object, object>(Queryable.SingleOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_SingleOrDefault_TSource_4; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SingleOrDefault_TSource_4(Type TSource) => (s_SingleOrDefault_TSource_4 ??= new Func, Expression>, object, object>(Queryable.SingleOrDefault).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Skip_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Skip_TSource_2(Type TSource) => (s_Skip_TSource_2 ??= new Func, int, IQueryable>(Queryable.Skip).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_SkipWhile_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SkipWhile_TSource_2(Type TSource) => (s_SkipWhile_TSource_2 ??= new Func, Expression>, IQueryable>(Queryable.SkipWhile).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_SkipWhile_Index_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SkipWhile_Index_TSource_2(Type TSource) => (s_SkipWhile_Index_TSource_2 ??= new Func, Expression>, IQueryable>(Queryable.SkipWhile).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); @@ -738,162 +842,189 @@ public static MethodInfo SkipWhile_Index_TSource_2(Type TSource) => private static MethodInfo? s_Sum_NullableDecimal_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Sum_NullableDecimal_TSource_2(Type TSource) => (s_Sum_NullableDecimal_TSource_2 ??= new Func, Expression>, decimal?>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Sum_Int32_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Sum_Int32_TSource_2(Type TSource) => (s_Sum_Int32_TSource_2 ??= new Func, Expression>, int>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Sum_NullableInt32_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Sum_NullableInt32_TSource_2(Type TSource) => (s_Sum_NullableInt32_TSource_2 ??= new Func, Expression>, int?>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Sum_Int64_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Sum_Int64_TSource_2(Type TSource) => (s_Sum_Int64_TSource_2 ??= new Func, Expression>, long>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Sum_NullableInt64_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Sum_NullableInt64_TSource_2(Type TSource) => (s_Sum_NullableInt64_TSource_2 ??= new Func, Expression>, long?>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Sum_Single_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Sum_Single_TSource_2(Type TSource) => (s_Sum_Single_TSource_2 ??= new Func, Expression>, float>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Sum_NullableSingle_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Sum_NullableSingle_TSource_2(Type TSource) => (s_Sum_NullableSingle_TSource_2 ??= new Func, Expression>, float?>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Sum_Double_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Sum_Double_TSource_2(Type TSource) => (s_Sum_Double_TSource_2 ??= new Func, Expression>, double>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Sum_NullableDouble_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Sum_NullableDouble_TSource_2(Type TSource) => (s_Sum_NullableDouble_TSource_2 ??= new Func, Expression>, double?>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Sum_Decimal_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Sum_Decimal_TSource_2(Type TSource) => (s_Sum_Decimal_TSource_2 ??= new Func, Expression>, decimal>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Take_Int32_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Take_Int32_TSource_2(Type TSource) => (s_Take_Int32_TSource_2 ??= new Func, int, IQueryable>(Queryable.Take).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Take_Range_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Take_Range_TSource_2(Type TSource) => (s_Take_Range_TSource_2 ??= new Func, Range, IQueryable>(Queryable.Take).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_TakeWhile_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo TakeWhile_TSource_2(Type TSource) => (s_TakeWhile_TSource_2 ??= new Func, Expression>, IQueryable>(Queryable.TakeWhile).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_TakeWhile_Index_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo TakeWhile_Index_TSource_2(Type TSource) => (s_TakeWhile_Index_TSource_2 ??= new Func, Expression>, IQueryable>(Queryable.TakeWhile).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_ThenBy_TSource_TKey_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo ThenBy_TSource_TKey_2(Type TSource, Type TKey) => (s_ThenBy_TSource_TKey_2 ??= new Func, Expression>, IOrderedQueryable>(Queryable.ThenBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_ThenBy_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo ThenBy_TSource_TKey_3(Type TSource, Type TKey) => (s_ThenBy_TSource_TKey_3 ??= new Func, Expression>, IComparer, IOrderedQueryable>(Queryable.ThenBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_ThenByDescending_TSource_TKey_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo ThenByDescending_TSource_TKey_2(Type TSource, Type TKey) => (s_ThenByDescending_TSource_TKey_2 ??= new Func, Expression>, IOrderedQueryable>(Queryable.ThenByDescending).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_ThenByDescending_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo ThenByDescending_TSource_TKey_3(Type TSource, Type TKey) => (s_ThenByDescending_TSource_TKey_3 ??= new Func, Expression>, IComparer, IOrderedQueryable>(Queryable.ThenByDescending).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_Union_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Union_TSource_2(Type TSource) => (s_Union_TSource_2 ??= new Func, IEnumerable, IQueryable>(Queryable.Union).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Union_TSource_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Union_TSource_3(Type TSource) => (s_Union_TSource_3 ??= new Func, IEnumerable, IEqualityComparer, IQueryable>(Queryable.Union).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_UnionBy_TSource_TKey_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo UnionBy_TSource_TKey_3(Type TSource, Type TKey) => (s_UnionBy_TSource_TKey_3 ??= new Func, IEnumerable, Expression>, IQueryable>(Queryable.UnionBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_UnionBy_TSource_TKey_4; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo UnionBy_TSource_TKey_4(Type TSource, Type TKey) => (s_UnionBy_TSource_TKey_4 ??= new Func, IEnumerable, Expression>, IEqualityComparer, IQueryable>(Queryable.UnionBy).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource, TKey); private static MethodInfo? s_Where_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Where_TSource_2(Type TSource) => (s_Where_TSource_2 ??= new Func, Expression>, IQueryable>(Queryable.Where).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Where_Index_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Where_Index_TSource_2(Type TSource) => (s_Where_Index_TSource_2 ??= new Func, Expression>, IQueryable>(Queryable.Where).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Zip_TFirst_TSecond_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Zip_TFirst_TSecond_2(Type TFirst, Type TSecond) => (s_Zip_TFirst_TSecond_2 ??= new Func, IEnumerable, IQueryable<(object, object)>>(Queryable.Zip).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TFirst, TSecond); private static MethodInfo? s_Zip_TFirst_TSecond_TResult_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Zip_TFirst_TSecond_TResult_3(Type TFirst, Type TSecond, Type TResult) => (s_Zip_TFirst_TSecond_TResult_3 ??= new Func, IEnumerable, Expression>, IQueryable>(Queryable.Zip).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TFirst, TSecond, TResult); private static MethodInfo? s_Zip_TFirst_TSecond_TThird_3; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Zip_TFirst_TSecond_TThird_3(Type TFirst, Type TSecond, Type TThird) => (s_Zip_TFirst_TSecond_TThird_3 ??= new Func, IEnumerable, IEnumerable, IQueryable<(object, object, object)>>(Queryable.Zip).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TFirst, TSecond, TThird); @@ -901,24 +1032,28 @@ public static MethodInfo Zip_TFirst_TSecond_TThird_3(Type TFirst, Type TSecond, private static MethodInfo? s_SkipLast_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo SkipLast_TSource_2(Type TSource) => (s_SkipLast_TSource_2 ??= new Func, int, IQueryable>(Queryable.SkipLast).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_TakeLast_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo TakeLast_TSource_2(Type TSource) => (s_TakeLast_TSource_2 ??= new Func, int, IQueryable>(Queryable.TakeLast).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Append_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Append_TSource_2(Type TSource) => (s_Append_TSource_2 ??= new Func, object, IQueryable>(Queryable.Append).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); private static MethodInfo? s_Prepend_TSource_2; + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] public static MethodInfo Prepend_TSource_2(Type TSource) => (s_Prepend_TSource_2 ??= new Func, object, IQueryable>(Queryable.Prepend).GetMethodInfo().GetGenericMethodDefinition()) .MakeGenericMethod(TSource); diff --git a/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableExecutor.cs b/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableExecutor.cs index 5ff04c6fdcc167..14a4935864c784 100644 --- a/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableExecutor.cs +++ b/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableExecutor.cs @@ -10,10 +10,12 @@ namespace System.Linq public abstract class EnumerableExecutor { [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] + [RequiresDynamicCode(Queryable.InMemoryQueryableExtensionMethodsRequiresDynamicCode)] internal abstract object? ExecuteBoxed(); internal EnumerableExecutor() { } + [RequiresDynamicCode(Queryable.InMemoryQueryableExtensionMethodsRequiresDynamicCode)] internal static EnumerableExecutor Create(Expression expression) { Type execType = typeof(EnumerableExecutor<>).MakeGenericType(expression.Type); @@ -31,9 +33,11 @@ public EnumerableExecutor(Expression expression) } [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] + [RequiresDynamicCode(Queryable.InMemoryQueryableExtensionMethodsRequiresDynamicCode)] internal override object? ExecuteBoxed() => Execute(); [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] + [RequiresDynamicCode(Queryable.InMemoryQueryableExtensionMethodsRequiresDynamicCode)] internal T Execute() { EnumerableRewriter rewriter = new EnumerableRewriter(); diff --git a/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableQuery.cs b/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableQuery.cs index 97c4b0daeb75c3..222f030bb8f4d6 100644 --- a/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableQuery.cs +++ b/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableQuery.cs @@ -16,6 +16,7 @@ public abstract class EnumerableQuery internal EnumerableQuery() { } [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] + [RequiresDynamicCode(Queryable.InMemoryQueryableExtensionMethodsRequiresDynamicCode)] internal static IQueryable Create(Type elementType, IEnumerable sequence) { Type seqType = typeof(EnumerableQuery<>).MakeGenericType(elementType); @@ -23,6 +24,7 @@ internal static IQueryable Create(Type elementType, IEnumerable sequence) } [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] + [RequiresDynamicCode(Queryable.InMemoryQueryableExtensionMethodsRequiresDynamicCode)] internal static IQueryable Create(Type elementType, Expression expression) { Type seqType = typeof(EnumerableQuery<>).MakeGenericType(elementType); @@ -30,6 +32,8 @@ internal static IQueryable Create(Type elementType, Expression expression) } } + [RequiresDynamicCode(Queryable.InMemoryQueryableExtensionMethodsRequiresDynamicCode)] + [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] public class EnumerableQuery : EnumerableQuery, IOrderedQueryable, IQueryProvider { private readonly Expression _expression; @@ -37,14 +41,12 @@ public class EnumerableQuery : EnumerableQuery, IOrderedQueryable, IQueryP IQueryProvider IQueryable.Provider => this; - [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] public EnumerableQuery(IEnumerable enumerable) { _enumerable = enumerable; _expression = Expression.Constant(this); } - [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] public EnumerableQuery(Expression expression) { _expression = expression; @@ -58,8 +60,6 @@ public EnumerableQuery(Expression expression) Type IQueryable.ElementType => typeof(T); - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", - Justification = "This class's ctor is annotated as RequiresUnreferencedCode.")] IQueryable IQueryProvider.CreateQuery(Expression expression) { ArgumentNullException.ThrowIfNull(expression); @@ -70,8 +70,6 @@ IQueryable IQueryProvider.CreateQuery(Expression expression) return Create(iqType.GetGenericArguments()[0], expression); } - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", - Justification = "This class's ctor is annotated as RequiresUnreferencedCode.")] IQueryable IQueryProvider.CreateQuery(Expression expression) { ArgumentNullException.ThrowIfNull(expression); @@ -83,8 +81,6 @@ IQueryable IQueryProvider.CreateQuery(Expression expression) return new EnumerableQuery(expression); } - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", - Justification = "This class's ctor is annotated as RequiresUnreferencedCode.")] object? IQueryProvider.Execute(Expression expression) { ArgumentNullException.ThrowIfNull(expression); @@ -92,8 +88,6 @@ IQueryable IQueryProvider.CreateQuery(Expression expression) return EnumerableExecutor.Create(expression).ExecuteBoxed(); } - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", - Justification = "This class's ctor is annotated as RequiresUnreferencedCode.")] TElement IQueryProvider.Execute(Expression expression) { ArgumentNullException.ThrowIfNull(expression); @@ -107,8 +101,6 @@ TElement IQueryProvider.Execute(Expression expression) IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", - Justification = "This class's ctor is annotated as RequiresUnreferencedCode.")] private IEnumerator GetEnumerator() { if (_enumerable == null) diff --git a/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableRewriter.cs b/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableRewriter.cs index 17cedfed6291f6..2490a787a90367 100644 --- a/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableRewriter.cs +++ b/src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableRewriter.cs @@ -11,6 +11,8 @@ namespace System.Linq { + [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] + [RequiresDynamicCode("Requires MakeGenericType")] internal sealed class EnumerableRewriter : ExpressionVisitor { // We must ensure that if a LabelTarget is rewritten that it is always rewritten to the same new target @@ -19,13 +21,10 @@ internal sealed class EnumerableRewriter : ExpressionVisitor // Finding equivalent types can be relatively expensive, and hitting with the same types repeatedly is quite likely. private Dictionary? _equivalentTypeCache; - [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] public EnumerableRewriter() { } - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", - Justification = "This class's ctor is annotated as RequiresUnreferencedCode.")] protected override Expression VisitMethodCall(MethodCallExpression m) { Expression? obj = Visit(m.Object); @@ -196,38 +195,26 @@ private Type GetEquivalentType(Type type) } if (equiv == null) { - equiv = GetEquivalentTypeToEnumerables(pubType); - - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2070:UnrecognizedReflectionPattern", - Justification = "The enumerable interface type (IOrderedQueryable<>, IOrderedEnumerable<>, IQueryable<> and IEnumerable<>) " + - "is kept since it's directly referenced here" + - "and so it will also be preserved in all places where it's implemented." + - "The GetInterfaces may return less after trimming but it will include" + - "the enumerable interface type if it was there before trimming, which is enough for this" + - "method to work.")] - static Type GetEquivalentTypeToEnumerables(Type sourceType) + var interfacesWithInfo = pubType.GetInterfaces(); + var singleTypeGenInterfacesWithGetType = interfacesWithInfo + .Where(i => i.IsGenericType && i.GenericTypeArguments.Length == 1) + .Select(i => new { Info = i, GenType = i.GetGenericTypeDefinition() }) + .ToArray(); + Type? typeArg = singleTypeGenInterfacesWithGetType + .Where(i => i.GenType == typeof(IOrderedQueryable<>) || i.GenType == typeof(IOrderedEnumerable<>)) + .Select(i => i.Info.GenericTypeArguments[0]) + .Distinct() + .SingleOrDefault(); + if (typeArg != null) + equiv = typeof(IOrderedEnumerable<>).MakeGenericType(typeArg); + else { - var interfacesWithInfo = sourceType.GetInterfaces(); - var singleTypeGenInterfacesWithGetType = interfacesWithInfo - .Where(i => i.IsGenericType && i.GenericTypeArguments.Length == 1) - .Select(i => new { Info = i, GenType = i.GetGenericTypeDefinition() }) - .ToArray(); - Type? typeArg = singleTypeGenInterfacesWithGetType - .Where(i => i.GenType == typeof(IOrderedQueryable<>) || i.GenType == typeof(IOrderedEnumerable<>)) + typeArg = singleTypeGenInterfacesWithGetType + .Where(i => i.GenType == typeof(IQueryable<>) || i.GenType == typeof(IEnumerable<>)) .Select(i => i.Info.GenericTypeArguments[0]) .Distinct() - .SingleOrDefault(); - if (typeArg != null) - return typeof(IOrderedEnumerable<>).MakeGenericType(typeArg); - else - { - typeArg = singleTypeGenInterfacesWithGetType - .Where(i => i.GenType == typeof(IQueryable<>) || i.GenType == typeof(IEnumerable<>)) - .Select(i => i.Info.GenericTypeArguments[0]) - .Distinct() - .Single(); - return typeof(IEnumerable<>).MakeGenericType(typeArg); - } + .Single(); + equiv = typeof(IEnumerable<>).MakeGenericType(typeArg); } } _equivalentTypeCache.Add(type, equiv); @@ -275,9 +262,7 @@ private static MethodInfo FindEnumerableMethodForQueryable(string name, ReadOnly "This is safe because all Queryable methods have a DynamicDependency to the corresponding Enumerable method.")] static MethodInfo[] GetEnumerableStaticMethods(Type type) => type.GetMethods(BindingFlags.Public | BindingFlags.Static); - - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2060:MakeGenericMethod", - Justification = "Enumerable methods don't have trim annotations.")] + [RequiresDynamicCodeAttribute("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] MethodInfo ApplyTypeArgs(MethodInfo methodInfo) => typeArgs == null ? methodInfo : methodInfo.MakeGenericMethod(typeArgs); // In certain cases, there might be ambiguities when resolving matching overloads, for example between @@ -335,6 +320,7 @@ static bool AreAssignableFromStrict(ParameterInfo[] left, ParameterInfo[] right) } [RequiresUnreferencedCode(Queryable.InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] + [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] private static MethodInfo FindMethod(Type type, string name, ReadOnlyCollection args, Type[]? typeArgs) { using (IEnumerator en = type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static).Where(m => m.Name == name).GetEnumerator()) @@ -372,9 +358,7 @@ private static bool ArgsMatch(MethodInfo m, ReadOnlyCollection args, return false; mParams = GetConstrutedGenericParameters(m, typeArgs); - - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2060:MakeGenericMethod", - Justification = "MakeGenericMethod is only called to get the parameter types, which are only used to make a 'match' decision. The generic method is not invoked.")] + [RequiresDynamicCodeAttribute("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")] static ParameterInfo[] GetConstrutedGenericParameters(MethodInfo method, Type[] genericTypes) => method.MakeGenericMethod(genericTypes).GetParameters(); } @@ -402,6 +386,7 @@ static ParameterInfo[] GetConstrutedGenericParameters(MethodInfo method, Type[] return true; } + [RequiresDynamicCode("Calls System.Type.MakeArrayType()")] private static Type StripExpression(Type type) { bool isArray = type.IsArray; diff --git a/src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs b/src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs index 48551411c89987..343899581156b8 100644 --- a/src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs +++ b/src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs @@ -11,8 +11,10 @@ namespace System.Linq public static class Queryable { internal const string InMemoryQueryableExtensionMethodsRequiresUnreferencedCode = "Enumerating in-memory collections as IQueryable can require unreferenced code because expressions referencing IQueryable extension methods can get rebound to IEnumerable extension methods. The IEnumerable extension methods could be trimmed causing the application to fail at runtime."; + internal const string InMemoryQueryableExtensionMethodsRequiresDynamicCode = "Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling."; [RequiresUnreferencedCode(InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable AsQueryable(this IEnumerable source) { ArgumentNullException.ThrowIfNull(source); @@ -21,6 +23,7 @@ public static IQueryable AsQueryable(this IEnumerable Where(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -54,6 +58,7 @@ public static IQueryable Where(this IQueryable source } [DynamicDependency("Where`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Where(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -68,6 +73,7 @@ public static IQueryable Where(this IQueryable source } [DynamicDependency("OfType`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable OfType(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -79,6 +85,7 @@ public static IQueryable OfType(this IQueryable source) } [DynamicDependency("Cast`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Cast(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -90,6 +97,7 @@ public static IQueryable Cast(this IQueryable source) } [DynamicDependency("Select`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Select(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -104,6 +112,7 @@ public static IQueryable Select(this IQueryable Select(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -118,6 +127,7 @@ public static IQueryable Select(this IQueryable SelectMany(this IQueryable source, Expression>> selector) { ArgumentNullException.ThrowIfNull(source); @@ -132,6 +142,7 @@ public static IQueryable SelectMany(this IQueryable SelectMany(this IQueryable source, Expression>> selector) { ArgumentNullException.ThrowIfNull(source); @@ -146,6 +157,7 @@ public static IQueryable SelectMany(this IQueryable SelectMany(this IQueryable source, Expression>> collectionSelector, Expression> resultSelector) { ArgumentNullException.ThrowIfNull(source); @@ -161,6 +173,7 @@ public static IQueryable SelectMany(this } [DynamicDependency("SelectMany`3", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable SelectMany(this IQueryable source, Expression>> collectionSelector, Expression> resultSelector) { ArgumentNullException.ThrowIfNull(source); @@ -182,6 +195,7 @@ private static Expression GetSourceExpression(IEnumerable sour } [DynamicDependency("Join`4", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Join(this IQueryable outer, IEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression> resultSelector) { ArgumentNullException.ThrowIfNull(outer); @@ -197,6 +211,7 @@ public static IQueryable Join(this IQuer } [DynamicDependency("Join`4", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Join(this IQueryable outer, IEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression> resultSelector, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(outer); @@ -212,6 +227,7 @@ public static IQueryable Join(this IQuer } [DynamicDependency("GroupJoin`4", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable GroupJoin(this IQueryable outer, IEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression, TResult>> resultSelector) { ArgumentNullException.ThrowIfNull(outer); @@ -227,6 +243,7 @@ public static IQueryable GroupJoin(this } [DynamicDependency("GroupJoin`4", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable GroupJoin(this IQueryable outer, IEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression, TResult>> resultSelector, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(outer); @@ -266,6 +283,7 @@ public static IQueryable GroupJoin(this /// The expected behavior is that it sorts the elements of by itself. /// [DynamicDependency("Order`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable Order(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -304,6 +322,7 @@ public static IOrderedQueryable Order(this IQueryable source) /// The expected behavior is that it sorts the elements of by itself. /// [DynamicDependency("Order`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable Order(this IQueryable source, IComparer comparer) { ArgumentNullException.ThrowIfNull(source); @@ -317,6 +336,7 @@ public static IOrderedQueryable Order(this IQueryable source, IComparer } [DynamicDependency("OrderBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable OrderBy(this IQueryable source, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source); @@ -331,6 +351,7 @@ public static IOrderedQueryable OrderBy(this IQueryable< } [DynamicDependency("OrderBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable OrderBy(this IQueryable source, Expression> keySelector, IComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -369,6 +390,7 @@ public static IOrderedQueryable OrderBy(this IQueryable< /// The expected behavior is that it sorts the elements of by itself. /// [DynamicDependency("OrderDescending`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable OrderDescending(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -407,6 +429,7 @@ public static IOrderedQueryable OrderDescending(this IQueryable source) /// The expected behavior is that it sorts the elements of by itself. /// [DynamicDependency("OrderDescending`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable OrderDescending(this IQueryable source, IComparer comparer) { ArgumentNullException.ThrowIfNull(source); @@ -420,6 +443,7 @@ public static IOrderedQueryable OrderDescending(this IQueryable source, } [DynamicDependency("OrderByDescending`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable OrderByDescending(this IQueryable source, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source); @@ -434,6 +458,7 @@ public static IOrderedQueryable OrderByDescending(this I } [DynamicDependency("OrderByDescending`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable OrderByDescending(this IQueryable source, Expression> keySelector, IComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -448,6 +473,7 @@ public static IOrderedQueryable OrderByDescending(this I } [DynamicDependency("ThenBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable ThenBy(this IOrderedQueryable source, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source); @@ -462,6 +488,7 @@ public static IOrderedQueryable ThenBy(this IOrderedQuer } [DynamicDependency("ThenBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable ThenBy(this IOrderedQueryable source, Expression> keySelector, IComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -476,6 +503,7 @@ public static IOrderedQueryable ThenBy(this IOrderedQuer } [DynamicDependency("ThenByDescending`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable ThenByDescending(this IOrderedQueryable source, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source); @@ -490,6 +518,7 @@ public static IOrderedQueryable ThenByDescending(this IO } [DynamicDependency("ThenByDescending`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IOrderedQueryable ThenByDescending(this IOrderedQueryable source, Expression> keySelector, IComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -504,6 +533,7 @@ public static IOrderedQueryable ThenByDescending(this IO } [DynamicDependency("Take`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Take(this IQueryable source, int count) { ArgumentNullException.ThrowIfNull(source); @@ -523,6 +553,7 @@ public static IQueryable Take(this IQueryable source, /// is . /// An that contains the specified of elements from the sequence. [DynamicDependency("Take`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Take(this IQueryable source, Range range) { ArgumentNullException.ThrowIfNull(source); @@ -536,6 +567,7 @@ public static IQueryable Take(this IQueryable source, } [DynamicDependency("TakeWhile`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable TakeWhile(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -550,6 +582,7 @@ public static IQueryable TakeWhile(this IQueryable so } [DynamicDependency("TakeWhile`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable TakeWhile(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -564,6 +597,7 @@ public static IQueryable TakeWhile(this IQueryable so } [DynamicDependency("Skip`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Skip(this IQueryable source, int count) { ArgumentNullException.ThrowIfNull(source); @@ -577,6 +611,7 @@ public static IQueryable Skip(this IQueryable source, } [DynamicDependency("SkipWhile`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable SkipWhile(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -591,6 +626,7 @@ public static IQueryable SkipWhile(this IQueryable so } [DynamicDependency("SkipWhile`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable SkipWhile(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -605,6 +641,7 @@ public static IQueryable SkipWhile(this IQueryable so } [DynamicDependency("GroupBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable> GroupBy(this IQueryable source, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source); @@ -619,6 +656,7 @@ public static IQueryable> GroupBy(this I } [DynamicDependency("GroupBy`3", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable> GroupBy(this IQueryable source, Expression> keySelector, Expression> elementSelector) { ArgumentNullException.ThrowIfNull(source); @@ -634,6 +672,7 @@ public static IQueryable> GroupBy> GroupBy(this IQueryable source, Expression> keySelector, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -648,6 +687,7 @@ public static IQueryable> GroupBy(this I } [DynamicDependency("GroupBy`3", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable> GroupBy(this IQueryable source, Expression> keySelector, Expression> elementSelector, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -661,6 +701,7 @@ public static IQueryable> GroupBy GroupBy(this IQueryable source, Expression> keySelector, Expression> elementSelector, Expression, TResult>> resultSelector) { ArgumentNullException.ThrowIfNull(source); @@ -675,6 +716,7 @@ public static IQueryable GroupBy(this } [DynamicDependency("GroupBy`3", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable GroupBy(this IQueryable source, Expression> keySelector, Expression, TResult>> resultSelector) { ArgumentNullException.ThrowIfNull(source); @@ -690,6 +732,7 @@ public static IQueryable GroupBy(this IQueryabl } [DynamicDependency("GroupBy`3", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable GroupBy(this IQueryable source, Expression> keySelector, Expression, TResult>> resultSelector, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -703,6 +746,7 @@ public static IQueryable GroupBy(this IQueryabl } [DynamicDependency("GroupBy`4", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable GroupBy(this IQueryable source, Expression> keySelector, Expression> elementSelector, Expression, TResult>> resultSelector, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -717,6 +761,7 @@ public static IQueryable GroupBy(this } [DynamicDependency("Distinct`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Distinct(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -728,6 +773,7 @@ public static IQueryable Distinct(this IQueryable sou } [DynamicDependency("Distinct`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Distinct(this IQueryable source, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -748,6 +794,7 @@ public static IQueryable Distinct(this IQueryable sou /// An that contains distinct elements from the source sequence. /// is . [DynamicDependency("DistinctBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable DistinctBy(this IQueryable source, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source); @@ -770,6 +817,7 @@ public static IQueryable DistinctBy(this IQueryableAn that contains distinct elements from the source sequence. /// is . [DynamicDependency("DistinctBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable DistinctBy(this IQueryable source, Expression> keySelector, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -795,6 +843,7 @@ public static IQueryable DistinctBy(this IQueryableThe last chunk will contain the remaining elements and may be of a smaller size. /// [DynamicDependency("Chunk`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Chunk(this IQueryable source, int size) { ArgumentNullException.ThrowIfNull(source); @@ -808,6 +857,7 @@ public static IQueryable Chunk(this IQueryable sour } [DynamicDependency("Concat`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Concat(this IQueryable source1, IEnumerable source2) { ArgumentNullException.ThrowIfNull(source1); @@ -822,6 +872,7 @@ public static IQueryable Concat(this IQueryable sourc } [DynamicDependency("Zip`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable<(TFirst First, TSecond Second)> Zip(this IQueryable source1, IEnumerable source2) { ArgumentNullException.ThrowIfNull(source1); @@ -835,6 +886,7 @@ public static IQueryable Concat(this IQueryable sourc } [DynamicDependency("Zip`3", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Zip(this IQueryable source1, IEnumerable source2, Expression> resultSelector) { ArgumentNullException.ThrowIfNull(source1); @@ -860,6 +912,7 @@ public static IQueryable Zip(this IQueryable< /// The third sequence to merge. /// A sequence of tuples with elements taken from the first, second and third sequences, in that order. [DynamicDependency("Zip`3", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable<(TFirst First, TSecond Second, TThird Third)> Zip(this IQueryable source1, IEnumerable source2, IEnumerable source3) { ArgumentNullException.ThrowIfNull(source1); @@ -875,6 +928,7 @@ public static IQueryable Zip(this IQueryable< } [DynamicDependency("Union`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Union(this IQueryable source1, IEnumerable source2) { ArgumentNullException.ThrowIfNull(source1); @@ -889,6 +943,7 @@ public static IQueryable Union(this IQueryable source } [DynamicDependency("Union`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Union(this IQueryable source1, IEnumerable source2, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source1); @@ -913,6 +968,7 @@ public static IQueryable Union(this IQueryable source /// An that contains the elements from both input sequences, excluding duplicates. /// or is . [DynamicDependency("UnionBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable UnionBy(this IQueryable source1, IEnumerable source2, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source1); @@ -937,6 +993,7 @@ public static IQueryable UnionBy(this IQueryableAn that contains the elements from both input sequences, excluding duplicates. /// or is . [DynamicDependency("UnionBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable UnionBy(this IQueryable source1, IEnumerable source2, Expression> keySelector, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source1); @@ -955,6 +1012,7 @@ public static IQueryable UnionBy(this IQueryable Intersect(this IQueryable source1, IEnumerable source2) { ArgumentNullException.ThrowIfNull(source1); @@ -969,6 +1027,7 @@ public static IQueryable Intersect(this IQueryable so } [DynamicDependency("Intersect`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Intersect(this IQueryable source1, IEnumerable source2, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source1); @@ -993,6 +1052,7 @@ public static IQueryable Intersect(this IQueryable so /// A sequence that contains the elements that form the set intersection of two sequences. /// or is . [DynamicDependency("IntersectBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable IntersectBy(this IQueryable source1, IEnumerable source2, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source1); @@ -1019,6 +1079,7 @@ public static IQueryable IntersectBy(this IQueryableA sequence that contains the elements that form the set intersection of two sequences. /// or is . [DynamicDependency("IntersectBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable IntersectBy(this IQueryable source1, IEnumerable source2, Expression> keySelector, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source1); @@ -1037,6 +1098,7 @@ public static IQueryable IntersectBy(this IQueryable Except(this IQueryable source1, IEnumerable source2) { ArgumentNullException.ThrowIfNull(source1); @@ -1051,6 +1113,7 @@ public static IQueryable Except(this IQueryable sourc } [DynamicDependency("Except`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Except(this IQueryable source1, IEnumerable source2, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source1); @@ -1076,6 +1139,7 @@ public static IQueryable Except(this IQueryable sourc /// A function to extract the key for each element. /// A that contains the set difference of the elements of two sequences. [DynamicDependency("ExceptBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable ExceptBy(this IQueryable source1, IEnumerable source2, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source1); @@ -1103,6 +1167,7 @@ public static IQueryable ExceptBy(this IQueryableAn to compare keys. /// A that contains the set difference of the elements of two sequences. [DynamicDependency("ExceptBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable ExceptBy(this IQueryable source1, IEnumerable source2, Expression> keySelector, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source1); @@ -1121,6 +1186,7 @@ public static IQueryable ExceptBy(this IQueryable(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1132,6 +1198,7 @@ public static TSource First(this IQueryable source) } [DynamicDependency("First`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource First(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -1146,6 +1213,7 @@ public static TSource First(this IQueryable source, Expression } [DynamicDependency("FirstOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? FirstOrDefault(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1163,6 +1231,7 @@ public static TSource First(this IQueryable source, Expression /// if is empty; otherwise, the first element in . /// is . [DynamicDependency("FirstOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource FirstOrDefault(this IQueryable source, TSource defaultValue) { ArgumentNullException.ThrowIfNull(source); @@ -1175,6 +1244,7 @@ public static TSource FirstOrDefault(this IQueryable source, T } [DynamicDependency("FirstOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? FirstOrDefault(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -1196,6 +1266,7 @@ public static TSource FirstOrDefault(this IQueryable source, T /// if is empty or if no element passes the test specified by ; otherwise, the first element in that passes the test specified by . /// or is . [DynamicDependency("FirstOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource FirstOrDefault(this IQueryable source, Expression> predicate, TSource defaultValue) { ArgumentNullException.ThrowIfNull(source); @@ -1210,6 +1281,7 @@ public static TSource FirstOrDefault(this IQueryable source, E } [DynamicDependency("Last`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource Last(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1221,6 +1293,7 @@ public static TSource Last(this IQueryable source) } [DynamicDependency("Last`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource Last(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -1235,6 +1308,7 @@ public static TSource Last(this IQueryable source, Expression< } [DynamicDependency("LastOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? LastOrDefault(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1252,6 +1326,7 @@ public static TSource Last(this IQueryable source, Expression< /// if the source sequence is empty; otherwise, the last element in the . /// is . [DynamicDependency("LastOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource LastOrDefault(this IQueryable source, TSource defaultValue) { ArgumentNullException.ThrowIfNull(source); @@ -1264,6 +1339,7 @@ public static TSource LastOrDefault(this IQueryable source, TS } [DynamicDependency("LastOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? LastOrDefault(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -1285,6 +1361,7 @@ public static TSource LastOrDefault(this IQueryable source, TS /// if the sequence is empty or if no elements pass the test in the predicate function; otherwise, the last element that passes the test in the predicate function. /// or is . [DynamicDependency("LastOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource LastOrDefault(this IQueryable source, Expression> predicate, TSource defaultValue) { ArgumentNullException.ThrowIfNull(source); @@ -1299,6 +1376,7 @@ public static TSource LastOrDefault(this IQueryable source, Ex } [DynamicDependency("Single`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource Single(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1310,6 +1388,7 @@ public static TSource Single(this IQueryable source) } [DynamicDependency("Single`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource Single(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -1324,6 +1403,7 @@ public static TSource Single(this IQueryable source, Expressio } [DynamicDependency("SingleOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? SingleOrDefault(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1342,6 +1422,7 @@ public static TSource Single(this IQueryable source, Expressio /// is . /// The input sequence contains more than one element. [DynamicDependency("SingleOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource SingleOrDefault(this IQueryable source, TSource defaultValue) { ArgumentNullException.ThrowIfNull(source); @@ -1354,6 +1435,7 @@ public static TSource SingleOrDefault(this IQueryable source, } [DynamicDependency("SingleOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? SingleOrDefault(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -1376,6 +1458,7 @@ public static TSource SingleOrDefault(this IQueryable source, /// or is . /// More than one element satisfies the condition in . [DynamicDependency("SingleOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource SingleOrDefault(this IQueryable source, Expression> predicate, TSource defaultValue) { ArgumentNullException.ThrowIfNull(source); @@ -1390,6 +1473,7 @@ public static TSource SingleOrDefault(this IQueryable source, } [DynamicDependency("ElementAt`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource ElementAt(this IQueryable source, int index) { ArgumentNullException.ThrowIfNull(source); @@ -1413,6 +1497,7 @@ public static TSource ElementAt(this IQueryable source, int in /// is outside the bounds of the sequence. /// The element at the specified position in the sequence. [DynamicDependency("ElementAt`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource ElementAt(this IQueryable source, Index index) { ArgumentNullException.ThrowIfNull(source); @@ -1429,6 +1514,7 @@ public static TSource ElementAt(this IQueryable source, Index } [DynamicDependency("ElementAtOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? ElementAtOrDefault(this IQueryable source, int index) { ArgumentNullException.ThrowIfNull(source); @@ -1448,6 +1534,7 @@ public static TSource ElementAt(this IQueryable source, Index /// is . /// if is outside the bounds of the sequence; otherwise, the element at the specified position in the sequence. [DynamicDependency("ElementAtOrDefault`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? ElementAtOrDefault(this IQueryable source, Index index) { ArgumentNullException.ThrowIfNull(source); @@ -1461,6 +1548,7 @@ public static TSource ElementAt(this IQueryable source, Index } [DynamicDependency("DefaultIfEmpty`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable DefaultIfEmpty(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1472,6 +1560,7 @@ public static TSource ElementAt(this IQueryable source, Index } [DynamicDependency("DefaultIfEmpty`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable DefaultIfEmpty(this IQueryable source, TSource defaultValue) { ArgumentNullException.ThrowIfNull(source); @@ -1485,6 +1574,7 @@ public static IQueryable DefaultIfEmpty(this IQueryable(this IQueryable source, TSource item) { ArgumentNullException.ThrowIfNull(source); @@ -1498,6 +1588,7 @@ public static bool Contains(this IQueryable source, TSource it } [DynamicDependency("Contains`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static bool Contains(this IQueryable source, TSource item, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -1511,6 +1602,7 @@ public static bool Contains(this IQueryable source, TSource it } [DynamicDependency("Reverse`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Reverse(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1522,6 +1614,7 @@ public static IQueryable Reverse(this IQueryable sour } [DynamicDependency("SequenceEqual`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static bool SequenceEqual(this IQueryable source1, IEnumerable source2) { ArgumentNullException.ThrowIfNull(source1); @@ -1536,6 +1629,7 @@ public static bool SequenceEqual(this IQueryable source1, IEnu } [DynamicDependency("SequenceEqual`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static bool SequenceEqual(this IQueryable source1, IEnumerable source2, IEqualityComparer? comparer) { ArgumentNullException.ThrowIfNull(source1); @@ -1552,6 +1646,7 @@ public static bool SequenceEqual(this IQueryable source1, IEnu } [DynamicDependency("Any`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static bool Any(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1563,6 +1658,7 @@ public static bool Any(this IQueryable source) } [DynamicDependency("Any`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static bool Any(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -1577,6 +1673,7 @@ public static bool Any(this IQueryable source, Expression(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -1591,6 +1688,7 @@ public static bool All(this IQueryable source, Expression(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1602,6 +1700,7 @@ public static int Count(this IQueryable source) } [DynamicDependency("Count`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static int Count(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -1616,6 +1715,7 @@ public static int Count(this IQueryable source, Expression(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1627,6 +1727,7 @@ public static long LongCount(this IQueryable source) } [DynamicDependency("LongCount`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static long LongCount(this IQueryable source, Expression> predicate) { ArgumentNullException.ThrowIfNull(source); @@ -1641,6 +1742,7 @@ public static long LongCount(this IQueryable source, Expressio } [DynamicDependency("Min`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? Min(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1659,6 +1761,7 @@ public static long LongCount(this IQueryable source, Expressio /// is . /// No object in implements the or interface. [DynamicDependency("Min`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? Min(this IQueryable source, IComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -1673,6 +1776,7 @@ public static long LongCount(this IQueryable source, Expressio } [DynamicDependency("Min`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TResult? Min(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -1695,6 +1799,7 @@ public static long LongCount(this IQueryable source, Expressio /// is . /// No key extracted from implements the or interface. [DynamicDependency("MinBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? MinBy(this IQueryable source, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source); @@ -1719,6 +1824,7 @@ public static long LongCount(this IQueryable source, Expressio /// is . /// No key extracted from implements the or interface. [DynamicDependency("MinBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? MinBy(this IQueryable source, Expression> keySelector, IComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -1735,6 +1841,7 @@ public static long LongCount(this IQueryable source, Expressio } [DynamicDependency("Max`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? Max(this IQueryable source) { ArgumentNullException.ThrowIfNull(source); @@ -1752,6 +1859,7 @@ public static long LongCount(this IQueryable source, Expressio /// The maximum value in the sequence. /// is . [DynamicDependency("Max`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? Max(this IQueryable source, IComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -1766,6 +1874,7 @@ public static long LongCount(this IQueryable source, Expressio } [DynamicDependency("Max`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TResult? Max(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -1788,6 +1897,7 @@ public static long LongCount(this IQueryable source, Expressio /// is . /// No key extracted from implements the or interface. [DynamicDependency("MaxBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? MaxBy(this IQueryable source, Expression> keySelector) { ArgumentNullException.ThrowIfNull(source); @@ -1812,6 +1922,7 @@ public static long LongCount(this IQueryable source, Expressio /// is . /// No key extracted from implements the or interface. [DynamicDependency("MaxBy`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource? MaxBy(this IQueryable source, Expression> keySelector, IComparer? comparer) { ArgumentNullException.ThrowIfNull(source); @@ -1938,6 +2049,7 @@ public static decimal Sum(this IQueryable source) } [DynamicDependency("Sum`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static int Sum(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -1952,6 +2064,7 @@ public static int Sum(this IQueryable source, Expression(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -1966,6 +2079,7 @@ public static int Sum(this IQueryable source, Expression(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -1980,6 +2094,7 @@ public static long Sum(this IQueryable source, Expression(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -1994,6 +2109,7 @@ public static long Sum(this IQueryable source, Expression(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2008,6 +2124,7 @@ public static float Sum(this IQueryable source, Expression(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2022,6 +2139,7 @@ public static float Sum(this IQueryable source, Expression(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2036,6 +2154,7 @@ public static double Sum(this IQueryable source, Expression(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2050,6 +2169,7 @@ public static double Sum(this IQueryable source, Expression(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2064,6 +2184,7 @@ public static decimal Sum(this IQueryable source, Expression(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2188,6 +2309,7 @@ public static decimal Average(this IQueryable source) } [DynamicDependency("Average`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static double Average(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2202,6 +2324,7 @@ public static double Average(this IQueryable source, Expressio } [DynamicDependency("Average`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static double? Average(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2216,6 +2339,7 @@ public static double Average(this IQueryable source, Expressio } [DynamicDependency("Average`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static float Average(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2230,6 +2354,7 @@ public static float Average(this IQueryable source, Expression } [DynamicDependency("Average`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static float? Average(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2244,6 +2369,7 @@ public static float Average(this IQueryable source, Expression } [DynamicDependency("Average`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static double Average(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2258,6 +2384,7 @@ public static double Average(this IQueryable source, Expressio } [DynamicDependency("Average`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static double? Average(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2272,6 +2399,7 @@ public static double Average(this IQueryable source, Expressio } [DynamicDependency("Average`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static double Average(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2286,6 +2414,7 @@ public static double Average(this IQueryable source, Expressio } [DynamicDependency("Average`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static double? Average(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2300,6 +2429,7 @@ public static double Average(this IQueryable source, Expressio } [DynamicDependency("Average`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static decimal Average(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2314,6 +2444,7 @@ public static decimal Average(this IQueryable source, Expressi } [DynamicDependency("Average`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static decimal? Average(this IQueryable source, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2328,6 +2459,7 @@ public static decimal Average(this IQueryable source, Expressi } [DynamicDependency("Aggregate`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TSource Aggregate(this IQueryable source, Expression> func) { ArgumentNullException.ThrowIfNull(source); @@ -2342,6 +2474,7 @@ public static TSource Aggregate(this IQueryable source, Expres } [DynamicDependency("Aggregate`2", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static TAccumulate Aggregate(this IQueryable source, TAccumulate seed, Expression> func) { ArgumentNullException.ThrowIfNull(source); @@ -2356,6 +2489,7 @@ public static TAccumulate Aggregate(this IQueryable(this IQueryable source, TAccumulate seed, Expression> func, Expression> selector) { ArgumentNullException.ThrowIfNull(source); @@ -2369,6 +2503,7 @@ public static TResult Aggregate(this IQueryable SkipLast(this IQueryable source, int count) { ArgumentNullException.ThrowIfNull(source); @@ -2382,6 +2517,7 @@ public static IQueryable SkipLast(this IQueryable sou } [DynamicDependency("TakeLast`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable TakeLast(this IQueryable source, int count) { ArgumentNullException.ThrowIfNull(source); @@ -2395,6 +2531,7 @@ public static IQueryable TakeLast(this IQueryable sou } [DynamicDependency("Append`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Append(this IQueryable source, TSource element) { ArgumentNullException.ThrowIfNull(source); @@ -2408,6 +2545,7 @@ public static IQueryable Append(this IQueryable sourc } [DynamicDependency("Prepend`1", typeof(Enumerable))] + [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)] public static IQueryable Prepend(this IQueryable source, TSource element) { ArgumentNullException.ThrowIfNull(source); diff --git a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.txt b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.txt index 2d77a903d9f54e..93dd3423e9b827 100644 --- a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.txt +++ b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.txt @@ -43,6 +43,8 @@ CannotChangeAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatform CannotChangeAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' on 'System.Diagnostics.Process.MinWorkingSet.set(System.IntPtr)' changed from '[SupportedOSPlatformAttribute("freebsd")]' in the contract to '[SupportedOSPlatformAttribute("freebsd")]' in the implementation. CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.IO.FileStream.Lock(System.Int64, System.Int64)' changed from '[UnsupportedOSPlatformAttribute("ios")]' in the contract to '[UnsupportedOSPlatformAttribute("freebsd")]' in the implementation. CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.IO.FileStream.Unlock(System.Int64, System.Int64)' changed from '[UnsupportedOSPlatformAttribute("ios")]' in the contract to '[UnsupportedOSPlatformAttribute("freebsd")]' in the implementation. +CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'System.Linq.EnumerableQuery..ctor(System.Collections.Generic.IEnumerable)' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'System.Linq.EnumerableQuery..ctor(System.Linq.Expressions.Expression)' in the contract but not the implementation. CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Net.Http.HttpClientHandler.Proxy' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Numerics.Vector.CopyTo(System.Span)' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Numerics.Vector.CopyTo(System.Span)' in the contract but not the implementation. @@ -107,6 +109,8 @@ CannotChangeAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatform CannotChangeAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' on 'System.Diagnostics.Process.MinWorkingSet.set(System.IntPtr)' changed from '[SupportedOSPlatformAttribute("freebsd")]' in the contract to '[SupportedOSPlatformAttribute("freebsd")]' in the implementation. CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.X509Certificates.PublicKey.GetDSAPublicKey()' changed from '[UnsupportedOSPlatformAttribute("ios")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. Compat issues with assembly System.Core: +CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'System.Linq.EnumerableQuery..ctor(System.Collections.Generic.IEnumerable)' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'System.Linq.EnumerableQuery..ctor(System.Linq.Expressions.Expression)' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Security.Cryptography.Aes' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Security.Cryptography.AesManaged' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Security.Cryptography.ECCurve' in the contract but not the implementation. @@ -121,6 +125,9 @@ CannotChangeAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatform Compat issues with assembly System.IO.FileSystem: CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.IO.FileStream.Lock(System.Int64, System.Int64)' changed from '[UnsupportedOSPlatformAttribute("ios")]' in the contract to '[UnsupportedOSPlatformAttribute("freebsd")]' in the implementation. CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.IO.FileStream.Unlock(System.Int64, System.Int64)' changed from '[UnsupportedOSPlatformAttribute("ios")]' in the contract to '[UnsupportedOSPlatformAttribute("freebsd")]' in the implementation. +Compat issues with assembly System.Linq.Queryable: +CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'System.Linq.EnumerableQuery..ctor(System.Collections.Generic.IEnumerable)' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'System.Linq.EnumerableQuery..ctor(System.Linq.Expressions.Expression)' in the contract but not the implementation. Compat issues with assembly System.Net.Http: CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Net.Http.HttpClientHandler.Proxy' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. Compat issues with assembly System.Net.Security: @@ -196,4 +203,4 @@ Compat issues with assembly System.Security.Cryptography.X509Certificates: CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.X509Certificates.PublicKey.GetDSAPublicKey()' changed from '[UnsupportedOSPlatformAttribute("ios")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. Compat issues with assembly System.Text.Json: CannotMakeTypeAbstract : Type 'System.Text.Json.Serialization.Metadata.JsonTypeInfo' is abstract in the implementation but is not abstract in the contract. -Total Issues: 184 +Total Issues: 190