|
1 | | -// Copyright (C) 2019-2020 Xtensive LLC. |
| 1 | +// Copyright (C) 2019-2020 Xtensive LLC. |
2 | 2 | // This code is distributed under MIT license terms. |
3 | 3 | // See the License.txt file in the project root for more information. |
4 | 4 |
|
@@ -55,7 +55,7 @@ private void PreprocessStructures() |
55 | 55 | Expression ex = setDescriptor.Expression; |
56 | 56 | var call = ex as MethodCallExpression; |
57 | 57 | if (call != null && call.Method.DeclaringType == typeof(Queryable) && |
58 | | - call.Method.Name.In("First", "FirstOrDefault", "Single", "SingleOrDefault")) |
| 58 | + call.Method.Name is "First" or "FirstOrDefault" or "Single" or "SingleOrDefault") |
59 | 59 | throw new NotSupportedException("Subqueries with structures are not supported"); |
60 | 60 | /*ex = call.Arguments[0]; |
61 | 61 | ParameterExpression parameter = Expression.Parameter(setDescriptor.Expression.Type, "parameter"); |
@@ -163,7 +163,7 @@ private void AddEntityValue(AddValueContext addContext) |
163 | 163 | int i; |
164 | 164 | if (methodCall!=null) { |
165 | 165 | if (methodCall.Method.DeclaringType==typeof (QueryEndpoint) && |
166 | | - methodCall.Method.Name.In("Single", "SingleOrDefault")) { |
| 166 | + methodCall.Method.Name is "Single" or "SingleOrDefault") { |
167 | 167 | object[] keys; |
168 | 168 | if (methodCall.Arguments[0].Type==typeof (Key) || methodCall.Arguments[0].Type.IsSubclassOf(typeof (Key))) { |
169 | 169 | var key = (Key) methodCall.Arguments[0].Invoke(); |
@@ -191,7 +191,7 @@ private void AddEntityValue(AddValueContext addContext) |
191 | 191 | return; |
192 | 192 | } |
193 | 193 | if (methodCall.Method.DeclaringType==typeof (Queryable) && |
194 | | - methodCall.Method.Name.In("Single", "SingleOrDefault", "First", "FirstOrDefault")) { |
| 194 | + methodCall.Method.Name is "Single" or "SingleOrDefault" or "First" or "FirstOrDefault") { |
195 | 195 | Expression exp = methodCall.Arguments[0]; |
196 | 196 | TypeInfo info = parent.GetTypeInfo(addContext.Field.ValueType); |
197 | 197 | if (methodCall.Arguments.Count==2) |
|
0 commit comments