Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit c7d9188

Browse files
author
o.nadymov
committed
Removed C#6 features.
1 parent 29ced0d commit c7d9188

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/ServiceStack.OrmLite/Expressions/SqlExpression.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,18 +1359,20 @@ protected virtual object VisitBinary(BinaryExpression b)
13591359
/// otherwise, false.</returns>
13601360
protected virtual bool IsParameterAccess(Expression e)
13611361
{
1362-
while (e != null)
1362+
Expression m = e as MemberExpression;
1363+
1364+
while (m != null)
13631365
{
1364-
if (e.NodeType == ExpressionType.Parameter)
1366+
if (m.NodeType == ExpressionType.Parameter)
13651367
{
1366-
var isSubExprAccess = e is UnaryExpression &&
1367-
((UnaryExpression) e).Operand is IndexExpression;
1368+
var isSubExprAccess = m is UnaryExpression &&
1369+
((UnaryExpression) m).Operand is IndexExpression;
13681370

13691371
if (!isSubExprAccess)
13701372
return true;
13711373
}
13721374

1373-
e = (e as MemberExpression)?.Expression;
1375+
m = m is MemberExpression ? ((MemberExpression) m).Expression : null;
13741376
}
13751377

13761378
return false;

0 commit comments

Comments
 (0)