Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit63815d3

Browse files
authored
Merge pull request#36788 from dotnet/release/8.0-staging
[release/8.0] Merge release/8.0-staging to release/8.0
2 parents8378c07 +d574040 commit63815d3

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

‎src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs‎

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ private sealed partial class ShaperProcessingExpressionVisitor : ExpressionVisit
1919
publicstaticreadonlyboolUseOldBehavior32310=
2020
AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue32310",outvarenabled32310)&&enabled32310;
2121

22+
privatestaticreadonlyboolUseOldBehavior36464=
23+
AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue36464",outvarenabled36464)&&enabled36464;
24+
2225
/// <summary>
2326
/// Reading database values
2427
/// </summary>
@@ -80,6 +83,9 @@ private static readonly MethodInfo Utf8JsonReaderGetStringMethod
8083
privatestaticreadonlyMethodInfoEnumParseMethodInfo
8184
=typeof(Enum).GetMethod(nameof(Enum.Parse),new[]{typeof(Type),typeof(string)})!;
8285

86+
privatestaticreadonlyPropertyInfoQueryContextQueryLoggerProperty=
87+
typeof(QueryContext).GetProperty(nameof(QueryContext.QueryLogger))!;
88+
8389
privatereadonlyRelationalShapedQueryCompilingExpressionVisitor_parentVisitor;
8490
privatereadonlyISet<string>?_tags;
8591
privatereadonlybool_isTracking;
@@ -1644,7 +1650,9 @@ protected override Expression VisitSwitch(SwitchExpression switchExpression)
16441650
New(
16451651
JsonReaderManagerConstructor,
16461652
_jsonReaderDataParameter,
1647-
Constant(_queryLogger))),
1653+
UseOldBehavior36464
1654+
?Constant(_queryLogger)
1655+
:MakeMemberAccess(QueryCompilationContext.QueryContextParameter,QueryContextQueryLoggerProperty))),
16481656
// tokenType = jsonReaderManager.CurrentReader.TokenType
16491657
Assign(
16501658
tokenTypeVariable,
@@ -1807,7 +1815,13 @@ void ProcessFixup(IDictionary<string, LambdaExpression> fixupMap)
18071815
varcaptureState=Call(managerVariable,Utf8JsonReaderManagerCaptureStateMethod);
18081816
varassignment=Assign(propertyVariable,innerShaperMapElement.Value);
18091817
varmanagerRecreation=Assign(
1810-
managerVariable,New(JsonReaderManagerConstructor,_jsonReaderDataParameter,Constant(_queryLogger)));
1818+
managerVariable,
1819+
New(
1820+
JsonReaderManagerConstructor,
1821+
_jsonReaderDataParameter,
1822+
UseOldBehavior36464
1823+
?Constant(_queryLogger)
1824+
:MakeMemberAccess(QueryCompilationContext.QueryContextParameter,QueryContextQueryLoggerProperty)));
18111825

18121826
readExpressions.Add(
18131827
Block(
@@ -2170,7 +2184,13 @@ private static IList<T> PopulateList<T>(IList<T> buffer, IList<T> target)
21702184
Default(typeof(JsonReaderData))),
21712185
Block(
21722186
Assign(
2173-
jsonReaderManagerVariable,New(JsonReaderManagerConstructor,jsonReaderDataVariable,Constant(_queryLogger))),
2187+
jsonReaderManagerVariable,
2188+
New(
2189+
JsonReaderManagerConstructor,
2190+
jsonReaderDataVariable,
2191+
UseOldBehavior36464
2192+
?Constant(_queryLogger)
2193+
:MakeMemberAccess(QueryCompilationContext.QueryContextParameter,QueryContextQueryLoggerProperty))),
21742194
Call(jsonReaderManagerVariable,Utf8JsonReaderManagerMoveNextMethod),
21752195
Call(jsonReaderManagerVariable,Utf8JsonReaderManagerCaptureStateMethod)));
21762196

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp