File tree Expand file tree Collapse file tree 1 file changed +5
-33
lines changed
src/Common/src/Common.OData.ApiExplorer/Conventions Expand file tree Collapse file tree 1 file changed +5
-33
lines changed Original file line number Diff line number Diff line change @@ -83,42 +83,14 @@ private void VisitEnableQuery( IReadOnlyList<EnableQueryAttribute> attributes )
8383 {
8484 var attribute = attributes [ i ] ;
8585
86- if ( attribute . AllowedArithmeticOperators == AllowedArithmeticOperators . None )
87- {
88- context . AllowedArithmeticOperators = AllowedArithmeticOperators . None ;
89- }
90- else
91- {
92- context . AllowedArithmeticOperators |= attribute . AllowedArithmeticOperators ;
93- }
86+ context . AllowedArithmeticOperators = attribute . AllowedArithmeticOperators ;
87+ context . AllowedFunctions = attribute . AllowedFunctions ;
88+ context . AllowedLogicalOperators = attribute . AllowedLogicalOperators ;
9489
95- if ( attribute . AllowedFunctions == AllowedFunctions . None )
96- {
97- context . AllowedFunctions = AllowedFunctions . None ;
98- }
99- else
100- {
101- context . AllowedFunctions |= attribute . AllowedFunctions ;
102- }
90+ AllowedQueryOptions = attribute . AllowedQueryOptions ;
10391
104- if ( attribute . AllowedLogicalOperators == AllowedLogicalOperators . None )
92+ if ( attribute . MaxAnyAllExpressionDepth != @default . MaxAnyAllExpressionDepth )
10593 {
106- context . AllowedLogicalOperators = AllowedLogicalOperators . None ;
107- }
108- else
109- {
110- context . AllowedLogicalOperators |= attribute . AllowedLogicalOperators ;
111- }
112-
113- if ( attribute . AllowedQueryOptions == AllowedQueryOptions . None )
114- {
115- AllowedQueryOptions = AllowedQueryOptions . None ;
116- }
117- else
118- {
119- AllowedQueryOptions |= attribute . AllowedQueryOptions ;
120- }
121-
12294 if ( context . MaxAnyAllExpressionDepth == @default . MaxAnyAllExpressionDepth )
12395 {
12496 context . MaxAnyAllExpressionDepth = attribute . MaxAnyAllExpressionDepth ;
You can’t perform that action at this time.
0 commit comments