542 references to Arguments
System.Activities (30)
Microsoft\VisualBasic\Activities\VisualBasicDesignerHelper.cs (2)
510
ReadOnlyCollection<Expression> arguments = arrayIndex.
Arguments
;
554
ReadOnlyCollection<Expression> callArguments = methodCall.
Arguments
;
Microsoft\VisualBasic\Activities\VisualBasicHelper.cs (4)
934
tmpArguments = arrayIndex.
Arguments
;
970
tmpArguments = methodCall.
Arguments
;
1275
return FindParameter(arrayIndex.Object) ?? FindParameter(arrayIndex.
Arguments
);
1282
return FindParameter(methodCall.Object) ?? FindParameter(methodCall.
Arguments
);
System\Activities\Expressions\ExpressionServices.cs (8)
102
MemberExpression memberExpression = methodCallExpressionBody.
Arguments
[0] as MemberExpression;
282
string argumentError = TryConvertArguments(methodCallExpressionBody.
Arguments
, indexerReference.Indices, methodCallExpressionBody.GetType(), 1, null, throwOnError);
302
string argumentError = TryConvertArguments(methodCallExpressionBody.
Arguments
, indexerReference.Indices, methodCallExpressionBody.GetType(), 1, null, throwOnError);
339
string argumentError = TryConvertArguments(methodCallExpression.
Arguments
, reference.Indices, methodCallExpression.GetType(), 1, null, throwOnError);
1266
if (methodCallExpression.
Arguments
.Count != parameterInfoArray.Length)//no optional argument call for LINQ expression
1278
string error = TryConvertArguments(methodCallExpression.
Arguments
, invokeMethod.Parameters, methodCallExpression.GetType(), 1, parameterInfoArray, throwOnError);
1488
Expression expression = methodCallExpression.
Arguments
[0];
1546
Expression expression = methodCallExpression.
Arguments
[0];
System\Activities\ExpressionUtilities.cs (16)
201
return new LocationReferenceFactory<T>(callExpression.
Arguments
[0], expression.Parameters);
523
this.setItemArgumentFunctions = new Func<ActivityContext, object>[callExpression.
Arguments
.Count];
524
for (int i = 0; i < callExpression.
Arguments
.Count; i++)
527
Expression argument = callExpression.
Arguments
[i];
668
this.indexFunctions = new Func<ActivityContext, int>[callExpression.
Arguments
.Count];
672
callExpression.
Arguments
[i], expression.Parameters);
1042
hasChanged |= TryRewriteLambdaExpressionCollection(methodCall.
Arguments
, out expressionList, publicAccessor);
1447
ReadOnlyCollection<Expression> argumentExpressions = originalExpression.
Arguments
;
1473
ReadOnlyCollection<Expression> argumentExpressions = originalExpression.
Arguments
;
1507
ReadOnlyCollection<Expression> argumentExpressions = originalExpression.
Arguments
;
1533
ReadOnlyCollection<Expression> argumentExpressions = originalExpression.
Arguments
;
1546
newExpression = Expression.Call(Expression.Constant(inlinedReference, typeof(LocationReference)), locationReferenceGetLocationMethod, originalExpression.
Arguments
[0]);
1671
ReadOnlyCollection<Expression> argumentExpressions = originalExpression.
Arguments
;
1709
ReadOnlyCollection<Expression> argumentExpressions = originalExpression.
Arguments
;
1718
if (TryGetInlinedLocationReference(originalExpression, originalExpression.
Arguments
[0], out inlinedReference, publicAccessor, true))
1966
hasChanged |= TryRewriteLambdaExpressionCollection(methodCall.
Arguments
, out expressionList, publicAccessor);
System.Core (12)
Microsoft\Scripting\Ast\DebugViewWriter.cs (1)
783
VisitExpressions('(', node.
Arguments
);
Microsoft\Scripting\Ast\Expression.DebuggerProxy.cs (1)
307
public ReadOnlyCollection<Expression> Arguments { get { return _node.
Arguments
; } }
Microsoft\Scripting\Ast\ExpressionStringBuilder.cs (3)
523
ob = node.
Arguments
[0];
532
for (int i = start, n = node.
Arguments
.Count; i < n; i++) {
535
Visit(node.
Arguments
[i]);
Microsoft\Scripting\Ast\MethodCallExpression.cs (2)
95
/// <param name="arguments">The <see cref="
Arguments
" /> property of the result.</param>
98
if (@object == Object && arguments ==
Arguments
) {
Microsoft\Scripting\Compiler\StackSpiller.cs (1)
412
ChildRewriter cr = new ChildRewriter(this, stack, node.
Arguments
.Count + 1);
System\Linq\Expressions\ExpressionVisitor.cs (2)
165
IEnumerable<Expression> args = this.VisitExpressionList(m.
Arguments
);
166
if (obj != m.Object || args != m.
Arguments
) {
System\Linq\SequenceQuery.cs (2)
193
ReadOnlyCollection<Expression> args = this.VisitExpressionList(m.
Arguments
);
196
if (obj != m.Object || args != m.
Arguments
) {
System.Data.Entity (140)
System\Data\Common\Internal\Materialization\CoordinatorScratchpad.cs (2)
493
m.
Arguments
.Count == 1,
503
return this.Visit(m.
Arguments
[0]);
System\Data\Objects\ELinq\EntityExpressionVisitor.cs (2)
193
IEnumerable<Expression> args = this.VisitExpressionList(m.
Arguments
);
194
if (obj != m.Object || args != m.
Arguments
)
System\Data\Objects\ELinq\ExpressionConverter.cs (2)
880
Expression argument = callExpression.
Arguments
[argumentOrdinal];
1360
Expression patternExpression = call.
Arguments
[0];
System\Data\Objects\ELinq\LinqExpressionNormalizer.cs (51)
146
if (m.
Arguments
.Count == 2)
154
return Expression.Equal(m.
Arguments
[0], m.
Arguments
[1], LiftToNull, m.Method);
157
return Expression.NotEqual(m.
Arguments
[0], m.
Arguments
[1], LiftToNull, m.Method);
160
return Expression.GreaterThan(m.
Arguments
[0], m.
Arguments
[1], LiftToNull, m.Method);
163
return Expression.GreaterThanOrEqual(m.
Arguments
[0], m.
Arguments
[1], LiftToNull, m.Method);
166
return Expression.LessThan(m.
Arguments
[0], m.
Arguments
[1], LiftToNull, m.Method);
169
return Expression.LessThanOrEqual(m.
Arguments
[0], m.
Arguments
[1], LiftToNull, m.Method);
172
return Expression.Multiply(m.
Arguments
[0], m.
Arguments
[1], m.Method);
175
return Expression.Subtract(m.
Arguments
[0], m.
Arguments
[1], m.Method);
178
return Expression.Add(m.
Arguments
[0], m.
Arguments
[1], m.Method);
181
return Expression.Divide(m.
Arguments
[0], m.
Arguments
[1], m.Method);
184
return Expression.Modulo(m.
Arguments
[0], m.
Arguments
[1], m.Method);
187
return Expression.And(m.
Arguments
[0], m.
Arguments
[1], m.Method);
190
return Expression.Or(m.
Arguments
[0], m.
Arguments
[1], m.Method);
193
return Expression.ExclusiveOr(m.
Arguments
[0], m.
Arguments
[1], m.Method);
201
if (m.
Arguments
.Count == 1)
209
return Expression.Negate(m.
Arguments
[0], m.Method);
212
return Expression.UnaryPlus(m.
Arguments
[0], m.Method);
216
return Expression.Convert(m.
Arguments
[0], m.Type, m.Method);
220
return Expression.Not(m.
Arguments
[0], m.Method);
229
if (m.Method.Name == "Equals" && m.
Arguments
.Count > 1)
234
return Expression.Equal(m.
Arguments
[0], m.
Arguments
[1], false, m.Method);
243
return CreateCompareExpression(m.
Arguments
[0], m.
Arguments
[1]);
247
if (m.Method.Name == "Compare" && m.
Arguments
.Count > 1 && m.Method.ReturnType == typeof(int))
252
return CreateCompareExpression(m.
Arguments
[0], m.
Arguments
[1]);
258
if (m.Method.Name == "Equals" && m.
Arguments
.Count > 0)
267
return CreateRelationalOperator(ExpressionType.Equal, m.Object, m.
Arguments
[0]);
272
if (m.Method.Name == "CompareTo" && m.
Arguments
.Count == 1 && m.Method.ReturnType == typeof(int))
277
return CreateCompareExpression(m.Object, m.
Arguments
[0]);
281
if (m.Method.Name == "Contains" && m.
Arguments
.Count == 1) {
293
return Expression.Call(enumerableContainsMethod, m.Object, m.
Arguments
[0]);
317
TryMatchCoalescePattern(callExpression.
Arguments
[argumentOrdinal], out normalizedArgument))
319
List<Expression> normalizedArguments = new List<Expression>(callExpression.
Arguments
);
351
if (2 <= callExpression.
Arguments
.Count &&
System\Data\Objects\ELinq\MethodCallTranslator.cs (81)
78
return ContainsTranslator.TranslateContains(parent, linq.Object, linq.
Arguments
[0]);
434
Debug.Assert(call.Object != null && call.
Arguments
.Count == 1 && call.
Arguments
[0] != null && call.
Arguments
[0].Type.Equals(typeof(string)), "Invalid Include arguments?");
441
CqtExpression arg = parent.TranslateExpression(call.
Arguments
[0]);
470
Debug.Assert(call.Object != null && call.
Arguments
.Count == 1 && call.
Arguments
[0] != null && call.
Arguments
[0].Type.Equals(typeof(MergeOption)), "Invalid MergeAs arguments?");
474
if (call.
Arguments
[0].NodeType != ExpressionType.Constant)
483
MergeOption mergeAsOption = (MergeOption)((ConstantExpression)call.
Arguments
[0]).Value;
506
Debug.Assert(call.Object != null && call.
Arguments
.Count == 1 && call.
Arguments
[0] != null && call.
Arguments
[0].Type.Equals(typeof(Span)), "Invalid IncludeSpan arguments?");
507
Debug.Assert(call.
Arguments
[0].NodeType == ExpressionType.Constant, "Whenever an IncludeSpan MethodCall is inlined, the argument must be a constant");
508
Span span = (Span)((ConstantExpression)call.
Arguments
[0]).Value;
606
var arguments = call.
Arguments
.Select(a => UnwrapNoOpConverts(a)).Select(b => NormalizeAllSetSources(parent, parent.TranslateExpression(b))).ToList();
864
List<LinqExpression> arguments = new List<LinqExpression>(call.
Arguments
.Count + 1);
866
arguments.AddRange(call.
Arguments
);
871
linqArguments = call.
Arguments
.ToArray();
891
DbExpression argument = parent.TranslateExpression(call.
Arguments
[0]);
947
DbExpression arg1 = parent.TranslateExpression(call.
Arguments
[0]);
948
DbExpression arg2 = parent.TranslateExpression(call.
Arguments
[1]);
1017
Debug.Assert(call.
Arguments
.Count == 1, "Expecting 1 argument for String.IndexOf");
1019
DbFunctionExpression indexOfExpression = parent.TranslateIntoCanonicalFunction(ExpressionConverter.IndexOf, call, call.
Arguments
[0], call.Object);
1106
Debug.Assert(call.
Arguments
.Count == 1 || call.
Arguments
.Count == 2, "Expecting 1 or 2 arguments for String.Substring");
1108
DbExpression arg1 = parent.TranslateExpression(call.
Arguments
[0]);
1114
if (call.
Arguments
.Count == 1)
1121
length = parent.TranslateExpression(call.
Arguments
[1]);
1145
Debug.Assert(call.
Arguments
.Count == 1 || call.
Arguments
.Count == 2, "Expecting 1 or 2 arguments for String.Remove");
1148
DbExpression arg1 = parent.TranslateExpression(call.
Arguments
[0]);
1158
if (call.
Arguments
.Count == 2)
1161
CqtExpression arg2 = parent.TranslateExpression(call.
Arguments
[1]);
1224
Debug.Assert(call.
Arguments
.Count == 2, "Expecting 2 arguments for String.Insert");
1228
DbExpression arg1 = parent.TranslateExpression(call.
Arguments
[0]);
1244
DbExpression arg2 = parent.TranslateExpression(call.
Arguments
[1]);
1267
Debug.Assert(call.
Arguments
.Count == 1, "Expecting 1 argument for String.IsNullOrEmpty");
1270
DbExpression value = parent.TranslateExpression(call.
Arguments
[0]);
1300
Debug.Assert(call.
Arguments
.Count >= 2 && call.
Arguments
.Count <= 4, "Expecting between 2 and 4 arguments for String.Concat");
1302
CqtExpression result = parent.TranslateExpression(call.
Arguments
[0]);
1303
for (int argIndex = 1; argIndex < call.
Arguments
.Count; argIndex++)
1308
parent.TranslateExpression(call.
Arguments
[argIndex]));
1327
if (!IsEmptyArray(call.
Arguments
[0]))
1424
return parent.TranslateIntoCanonicalFunction(call.Method.Name, call, call.
Arguments
.ToArray());
1458
return parent.TranslateIntoCanonicalFunction(s_methodNameMap[call.Method], call, call.
Arguments
.ToArray());
1499
Debug.Assert(call.
Arguments
.Count == 4, "Expecting 4 arguments for Microsoft.VisualBasic.DateAndTime.DatePart");
1501
ConstantExpression intervalLinqExpression = call.
Arguments
[0] as ConstantExpression;
1513
CqtExpression result = parent.TranslateIntoCanonicalFunction(intervalValue, call, call.
Arguments
[1]);
1542
Debug.Assert(call.
Arguments
.Count == 2, "Skip and Take must have 2 arguments");
1543
LinqExpression linqCount = call.
Arguments
[1];
1574
Debug.Assert(5 == call.
Arguments
.Count);
1576
CqtExpression outer = parent.TranslateSet(call.
Arguments
[0]);
1577
CqtExpression inner = parent.TranslateSet(call.
Arguments
[1]);
1672
Debug.Assert(1 == call.
Arguments
.Count);
1674
CqtExpression right = this.TranslateRight(parent, call.
Arguments
[0]);
1680
Debug.Assert(2 == call.
Arguments
.Count);
1681
CqtExpression left = this.TranslateLeft(parent, call.
Arguments
[0]);
1682
CqtExpression right = this.TranslateRight(parent, call.
Arguments
[1]);
1747
bool isUnary = 1 == call.
Arguments
.Count;
1748
Debug.Assert(isUnary || 2 == call.
Arguments
.Count);
1750
CqtExpression operand = parent.TranslateSet(call.
Arguments
[0]);
2026
Debug.Assert(0 <= call.
Arguments
.Count);
2033
Debug.Assert(1 <= call.
Arguments
.Count);
2034
CqtExpression operand = parent.TranslateSet(call.
Arguments
[0]);
2115
Debug.Assert(2 <= call.
Arguments
.Count);
2118
source = parent.TranslateExpression(call.
Arguments
[0]);
2177
DbExpression operand = parent.TranslateSet(call.
Arguments
[0]);
2180
DbExpression defaultValue = call.
Arguments
.Count == 2 ?
2181
parent.TranslateExpression(call.
Arguments
[1]) :
2229
return TranslateContains(parent, call.
Arguments
[0], call.
Arguments
[1]);
2493
LambdaExpression resultSelector = (call.
Arguments
.Count == 3) ? parent.GetLambdaExpression(call, 2) : null;
2718
CqtExpression source = parent.TranslateSet(call.
Arguments
[0]);
2722
Type fromClrType = TypeSystem.GetElementType(call.
Arguments
[0].Type);
2744
CqtExpression source = parent.TranslateSet(call.
Arguments
[0]);
2860
CqtExpression outer = parent.TranslateSet(call.
Arguments
[0]);
2861
CqtExpression inner = parent.TranslateSet(call.
Arguments
[1]);
3014
Debug.Assert(2 == call.
Arguments
.Count);
3015
CqtExpression source = parent.TranslateSet(call.
Arguments
[0]);
System\Data\Objects\ELinq\SpatialMethodCallTranslator.cs (2)
240
arguments = call.
Arguments
.ToArray();
245
arguments = new[] { call.Object }.Concat(call.
Arguments
).ToArray();
System.Data.Linq (248)
DataServices.cs (9)
473
if (mc == null || mc.
Arguments
.Count < 1 || mc.
Arguments
.Count > 2)
488
if (mc.
Arguments
.Count == 1) {
494
return GetCachedObject(mc.
Arguments
[0]);
496
UnaryExpression quote = mc.
Arguments
[1] as UnaryExpression;
502
ConstantExpression cex = mc.
Arguments
[0] as ConstantExpression;
537
if (mex != null && mex.Method.Name == "op_Equality" && mex.
Arguments
.Count == 2) {
538
bex = Expression.Equal(mex.
Arguments
[0], mex.
Arguments
[1]);
DataShape.cs (1)
198
foreach (Expression arg in m.
Arguments
) {
SqlClient\Query\Funcletizer.cs (2)
292
IEnumerable<Expression> args = this.VisitExpressionList(m.
Arguments
);
293
if (obj != m.Object || args != m.
Arguments
) {
SqlClient\Query\QueryConverter.cs (236)
939
if (mce != null && IsSequenceOperatorCall(mce) && mce.Method.Name == "Skip" && mce.
Arguments
.Count == 2) {
940
SqlExpression skipExp = this.VisitExpression(mce.
Arguments
[1]);
950
SqlSelect select = this.VisitSequence(mce.
Arguments
[0]);
1217
List<SqlExpression> sqlParams = new List<SqlExpression>(mce.
Arguments
.Count);
1220
for (int i = 0, n = mce.
Arguments
.Count; i < n; i++) {
1221
SqlExpression newParamExpression = this.VisitExpression(mce.
Arguments
[i]);
1647
LambdaExpression selectionLambda = GetLambda(mce.
Arguments
[1]);
1888
if (mc.
Arguments
.Count == 2) {
1889
object value = GetValue(mc.
Arguments
[1], "ChangeType");
1891
sn = this.VisitChangeType(mc.
Arguments
[0], (Type)value);
1919
return this.VisitUserQuery((string)GetValue(mc.
Arguments
[0], mc.Method.Name), GetArray(mc.
Arguments
[1]), mc.Type);
1932
&& mc.
Arguments
.Count == 1
1933
&& TypeSystem.GetElementType(mc.Method.DeclaringType).IsAssignableFrom(mc.
Arguments
[0].Type)
1935
return this.VisitContains(mc.Object, mc.
Arguments
[0]);
1940
SqlExpression[] args = new SqlExpression[mc.
Arguments
.Count];
1942
args[i] = VisitExpression(mc.
Arguments
[i]);
2038
if (mc.
Arguments
.Count == 2 &&
2039
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2040
return this.VisitSelect(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]));
2045
if (mc.
Arguments
.Count == 2 &&
2046
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2047
return this.VisitSelectMany(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), null);
2049
else if (mc.
Arguments
.Count == 3 &&
2050
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1 &&
2051
this.IsLambda(mc.
Arguments
[2]) && this.GetLambda(mc.
Arguments
[2]).Parameters.Count == 2) {
2052
return this.VisitSelectMany(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), this.GetLambda(mc.
Arguments
[2]));
2057
if (mc.
Arguments
.Count == 5 &&
2058
this.IsLambda(mc.
Arguments
[2]) && this.GetLambda(mc.
Arguments
[2]).Parameters.Count == 1 &&
2059
this.IsLambda(mc.
Arguments
[3]) && this.GetLambda(mc.
Arguments
[3]).Parameters.Count == 1 &&
2060
this.IsLambda(mc.
Arguments
[4]) && this.GetLambda(mc.
Arguments
[4]).Parameters.Count == 2) {
2061
return this.VisitJoin(mc.
Arguments
[0], mc.
Arguments
[1], this.GetLambda(mc.
Arguments
[2]), this.GetLambda(mc.
Arguments
[3]), this.GetLambda(mc.
Arguments
[4]));
2066
if (mc.
Arguments
.Count == 5 &&
2067
this.IsLambda(mc.
Arguments
[2]) && this.GetLambda(mc.
Arguments
[2]).Parameters.Count == 1 &&
2068
this.IsLambda(mc.
Arguments
[3]) && this.GetLambda(mc.
Arguments
[3]).Parameters.Count == 1 &&
2069
this.IsLambda(mc.
Arguments
[4]) && this.GetLambda(mc.
Arguments
[4]).Parameters.Count == 2) {
2070
return this.VisitGroupJoin(mc.
Arguments
[0], mc.
Arguments
[1], this.GetLambda(mc.
Arguments
[2]), this.GetLambda(mc.
Arguments
[3]), this.GetLambda(mc.
Arguments
[4]));
2075
if (mc.
Arguments
.Count == 1) {
2076
return this.VisitDefaultIfEmpty(mc.
Arguments
[0]);
2081
if (mc.
Arguments
.Count == 1) {
2083
return this.VisitOfType(mc.
Arguments
[0], ofType);
2088
if (mc.
Arguments
.Count == 1) {
2090
return this.VisitSequenceCast(mc.
Arguments
[0], type);
2095
if (mc.
Arguments
.Count == 2 &&
2096
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2097
return this.VisitWhere(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]));
2103
if (mc.
Arguments
.Count == 1) {
2104
return this.VisitFirst(mc.
Arguments
[0], null, true);
2106
else if (mc.
Arguments
.Count == 2 &&
2107
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2108
return this.VisitFirst(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), true);
2114
if (mc.
Arguments
.Count == 1) {
2115
return this.VisitFirst(mc.
Arguments
[0], null, false);
2117
else if (mc.
Arguments
.Count == 2 &&
2118
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2119
return this.VisitFirst(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), false);
2124
if (mc.
Arguments
.Count == 1) {
2125
return this.VisitDistinct(mc.
Arguments
[0]);
2130
if (mc.
Arguments
.Count == 2) {
2131
return this.VisitConcat(mc.
Arguments
[0], mc.
Arguments
[1]);
2136
if (mc.
Arguments
.Count == 2) {
2137
return this.VisitUnion(mc.
Arguments
[0], mc.
Arguments
[1]);
2142
if (mc.
Arguments
.Count == 2) {
2143
return this.VisitIntersect(mc.
Arguments
[0], mc.
Arguments
[1]);
2148
if (mc.
Arguments
.Count == 2) {
2149
return this.VisitExcept(mc.
Arguments
[0], mc.
Arguments
[1]);
2154
if (mc.
Arguments
.Count == 1) {
2155
return this.VisitQuantifier(mc.
Arguments
[0], null, true);
2157
else if (mc.
Arguments
.Count == 2 &&
2158
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2159
return this.VisitQuantifier(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), true);
2164
if (mc.
Arguments
.Count == 2 &&
2165
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2166
return this.VisitQuantifier(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), false);
2171
if (mc.
Arguments
.Count == 1) {
2172
return this.VisitAggregate(mc.
Arguments
[0], null, SqlNodeType.Count, mc.Type);
2174
else if (mc.
Arguments
.Count == 2 &&
2175
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2176
return this.VisitAggregate(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), SqlNodeType.Count, mc.Type);
2181
if (mc.
Arguments
.Count == 1) {
2182
return this.VisitAggregate(mc.
Arguments
[0], null, SqlNodeType.LongCount, mc.Type);
2184
else if (mc.
Arguments
.Count == 2 &&
2185
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2186
return this.VisitAggregate(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), SqlNodeType.LongCount, mc.Type);
2191
if (mc.
Arguments
.Count == 1) {
2192
return this.VisitAggregate(mc.
Arguments
[0], null, SqlNodeType.Sum, mc.Type);
2194
else if (mc.
Arguments
.Count == 2 &&
2195
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2196
return this.VisitAggregate(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), SqlNodeType.Sum, mc.Type);
2201
if (mc.
Arguments
.Count == 1) {
2202
return this.VisitAggregate(mc.
Arguments
[0], null, SqlNodeType.Min, mc.Type);
2204
else if (mc.
Arguments
.Count == 2 &&
2205
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2206
return this.VisitAggregate(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), SqlNodeType.Min, mc.Type);
2211
if (mc.
Arguments
.Count == 1) {
2212
return this.VisitAggregate(mc.
Arguments
[0], null, SqlNodeType.Max, mc.Type);
2214
else if (mc.
Arguments
.Count == 2 &&
2215
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2216
return this.VisitAggregate(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), SqlNodeType.Max, mc.Type);
2221
if (mc.
Arguments
.Count == 1) {
2222
return this.VisitAggregate(mc.
Arguments
[0], null, SqlNodeType.Avg, mc.Type);
2224
else if (mc.
Arguments
.Count == 2 &&
2225
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2226
return this.VisitAggregate(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), SqlNodeType.Avg, mc.Type);
2231
if (mc.
Arguments
.Count == 2 &&
2232
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2233
return this.VisitGroupBy(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), null, null);
2235
else if (mc.
Arguments
.Count == 3 &&
2236
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1 &&
2237
this.IsLambda(mc.
Arguments
[2]) && this.GetLambda(mc.
Arguments
[2]).Parameters.Count == 1) {
2238
return this.VisitGroupBy(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), this.GetLambda(mc.
Arguments
[2]), null);
2240
else if (mc.
Arguments
.Count == 3 &&
2241
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1 &&
2242
this.IsLambda(mc.
Arguments
[2]) && this.GetLambda(mc.
Arguments
[2]).Parameters.Count == 2) {
2243
return this.VisitGroupBy(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), null, this.GetLambda(mc.
Arguments
[2]));
2245
else if (mc.
Arguments
.Count == 4 &&
2246
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1 &&
2247
this.IsLambda(mc.
Arguments
[2]) && this.GetLambda(mc.
Arguments
[2]).Parameters.Count == 1 &&
2248
this.IsLambda(mc.
Arguments
[3]) && this.GetLambda(mc.
Arguments
[3]).Parameters.Count == 2) {
2249
return this.VisitGroupBy(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), this.GetLambda(mc.
Arguments
[2]), this.GetLambda(mc.
Arguments
[3]));
2254
if (mc.
Arguments
.Count == 2 &&
2255
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2256
return this.VisitOrderBy(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), SqlOrderType.Ascending);
2261
if (mc.
Arguments
.Count == 2 &&
2262
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2263
return this.VisitOrderBy(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), SqlOrderType.Descending);
2268
if (mc.
Arguments
.Count == 2 &&
2269
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2270
return this.VisitThenBy(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), SqlOrderType.Ascending);
2275
if (mc.
Arguments
.Count == 2 &&
2276
this.IsLambda(mc.
Arguments
[1]) && this.GetLambda(mc.
Arguments
[1]).Parameters.Count == 1) {
2277
return this.VisitThenBy(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), SqlOrderType.Descending);
2282
if (mc.
Arguments
.Count == 2) {
2283
return this.VisitTake(mc.
Arguments
[0], mc.
Arguments
[1]);
2288
if (mc.
Arguments
.Count == 2) {
2289
return this.VisitSkip(mc.
Arguments
[0], mc.
Arguments
[1]);
2294
if (mc.
Arguments
.Count == 2) {
2295
return this.VisitContains(mc.
Arguments
[0], mc.
Arguments
[1]);
2302
if (mc.
Arguments
.Count == 1) {
2303
return this.Visit(mc.
Arguments
[0]);
2329
if (mc.
Arguments
.Count == 2) {
2330
return this.VisitInsert(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]));
2332
else if (mc.
Arguments
.Count == 1) {
2333
return this.VisitInsert(mc.
Arguments
[0], null);
2338
if (mc.
Arguments
.Count == 3) {
2339
return this.VisitUpdate(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), this.GetLambda(mc.
Arguments
[2]));
2341
else if (mc.
Arguments
.Count == 2) {
2343
return this.VisitUpdate(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]), null);
2346
return this.VisitUpdate(mc.
Arguments
[0], null, this.GetLambda(mc.
Arguments
[1]));
2349
else if (mc.
Arguments
.Count == 1) {
2350
return this.VisitUpdate(mc.
Arguments
[0], null, null);
2355
if (mc.
Arguments
.Count == 2) {
2356
return this.VisitDelete(mc.
Arguments
[0], this.GetLambda(mc.
Arguments
[1]));
2358
else if (mc.
Arguments
.Count == 1) {
2359
return this.VisitDelete(mc.
Arguments
[0], null);
System.Data.Services (10)
parent\Client\System\Data\Services\Client\ALinq\ALinqExpressionVisitor.cs (2)
330
IEnumerable<Expression> args = this.VisitExpressionList(m.
Arguments
);
331
if (obj != m.Object || args != m.
Arguments
)
System\Data\Services\Internal\PropertyAccessVisitor.cs (5)
46
ConstantExpression propertyExpression = m.
Arguments
[1] as ConstantExpression;
56
ConstantExpression propertyExpression = m.
Arguments
[1] as ConstantExpression;
65
Expression operand = m.
Arguments
[0];
72
m.
Arguments
.Count == 2,
74
return Expression.Call(m.Object, m.Method, operand, m.
Arguments
[1]);
System\Data\Services\Providers\BasicExpandProvider.cs (3)
1156
LambdaExpression selector = call.
Arguments
[1].NodeType == ExpressionType.Quote ?
1157
(LambdaExpression)((UnaryExpression)call.
Arguments
[1]).Operand :
1158
(LambdaExpression)call.
Arguments
[1];
System.Data.Services.Client (102)
System\Data\Services\Client\ALinq\ALinqExpressionVisitor.cs (2)
330
IEnumerable<Expression> args = this.VisitExpressionList(m.
Arguments
);
331
if (obj != m.Object || args != m.
Arguments
)
System\Data\Services\Client\ALinq\ExpressionNormalizer.cs (49)
252
if (visited.
Arguments
.Count == 2)
260
return Expression.Equal(visited.
Arguments
[0], visited.
Arguments
[1], LiftToNull, visited.Method);
263
return Expression.NotEqual(visited.
Arguments
[0], visited.
Arguments
[1], LiftToNull, visited.Method);
266
return Expression.GreaterThan(visited.
Arguments
[0], visited.
Arguments
[1], LiftToNull, visited.Method);
269
return Expression.GreaterThanOrEqual(visited.
Arguments
[0], visited.
Arguments
[1], LiftToNull, visited.Method);
272
return Expression.LessThan(visited.
Arguments
[0], visited.
Arguments
[1], LiftToNull, visited.Method);
275
return Expression.LessThanOrEqual(visited.
Arguments
[0], visited.
Arguments
[1], LiftToNull, visited.Method);
278
return Expression.Multiply(visited.
Arguments
[0], visited.
Arguments
[1], visited.Method);
281
return Expression.Subtract(visited.
Arguments
[0], visited.
Arguments
[1], visited.Method);
284
return Expression.Add(visited.
Arguments
[0], visited.
Arguments
[1], visited.Method);
287
return Expression.Divide(visited.
Arguments
[0], visited.
Arguments
[1], visited.Method);
290
return Expression.Modulo(visited.
Arguments
[0], visited.
Arguments
[1], visited.Method);
293
return Expression.And(visited.
Arguments
[0], visited.
Arguments
[1], visited.Method);
296
return Expression.Or(visited.
Arguments
[0], visited.
Arguments
[1], visited.Method);
299
return Expression.ExclusiveOr(visited.
Arguments
[0], visited.
Arguments
[1], visited.Method);
307
if (visited.
Arguments
.Count == 1)
315
return Expression.Negate(visited.
Arguments
[0], visited.Method);
318
return Expression.UnaryPlus(visited.
Arguments
[0], visited.Method);
322
return Expression.Convert(visited.
Arguments
[0], visited.Type, visited.Method);
326
return Expression.Not(visited.
Arguments
[0], visited.Method);
335
if (visited.Method.IsStatic && visited.Method.Name == "Equals" && visited.
Arguments
.Count > 1)
340
return Expression.Equal(visited.
Arguments
[0], visited.
Arguments
[1], false, visited.Method);
344
if (!visited.Method.IsStatic && visited.Method.Name == "Equals" && visited.
Arguments
.Count > 0)
349
return CreateRelationalOperator(ExpressionType.Equal, visited.Object, visited.
Arguments
[0]);
358
return CreateCompareExpression(visited.
Arguments
[0], visited.
Arguments
[1]);
362
if (!visited.Method.IsStatic && visited.Method.Name == "CompareTo" && visited.
Arguments
.Count == 1 && visited.Method.ReturnType == typeof(int))
367
return CreateCompareExpression(visited.Object, visited.
Arguments
[0]);
371
if (visited.Method.IsStatic && visited.Method.Name == "Compare" && visited.
Arguments
.Count > 1 && visited.Method.ReturnType == typeof(int))
376
return CreateCompareExpression(visited.
Arguments
[0], visited.
Arguments
[1]);
397
TryMatchCoalescePattern(callExpression.
Arguments
[argumentOrdinal], out normalizedArgument))
399
List<Expression> normalizedArguments = new List<Expression>(callExpression.
Arguments
);
431
if (2 <= callExpression.
Arguments
.Count &&
System\Data\Services\Client\ALinq\ExpressionWriter.cs (6)
212
Debug.Assert(m.
Arguments
.Count == 1, "m.Arguments.Count == 1");
213
this.Visit(m.
Arguments
[0]);
224
if (m.
Arguments
.Count > 0)
231
for (int ii = 0; ii < m.
Arguments
.Count; ii++)
233
this.Visit(m.
Arguments
[ii]);
234
if (ii < m.
Arguments
.Count - 1)
System\Data\Services\Client\ALinq\ProjectionAnalyzer.cs (4)
138
MethodCallExpression insideCall = ResourceBinder.StripTo<MethodCallExpression>(call.
Arguments
[0]);
420
|| m.
Arguments
.Any(a => IsDisallowedExpressionForMethodCall(a)))
654
|| m.
Arguments
.Any(a => IsDisallowedExpressionForMethodCall(a)))
668
|| m.
Arguments
.Any(a => ClientType.CheckElementTypeIsEntity(a.Type)))
System\Data\Services\Client\ALinq\ResourceBinder.cs (31)
138
ValidationRules.RequireNonSingleton(mce.
Arguments
[0]);
479
ResourceExpression source = this.Visit(mce.
Arguments
[0]) as ResourceExpression;
494
Expression collectionSelector = mce.
Arguments
[1];
500
Expression resultSelector = mce.
Arguments
[2];
567
if (!PatternRules.MatchSingleArgumentLambda(mce.
Arguments
[1], out lambda))
601
Expression input = mce.
Arguments
[0];
607
if (!PatternRules.MatchSingleArgumentLambda(mce.
Arguments
[1], out le))
652
if (mce.
Arguments
.Count != 2 && mce.
Arguments
.Count != 3)
658
if (!IsValidNavigationSource(mce.
Arguments
[0], out input))
664
if (!PatternRules.MatchSingleArgumentLambda(mce.
Arguments
[1], out collectorSelector))
687
if (mce.
Arguments
.Count == 3)
712
LambdaExpression selector = StripTo<LambdaExpression>(selectManyCall.
Arguments
[2]);
784
if (mce.
Arguments
.Count != 1)
790
ResourceSetExpression rse = mce.
Arguments
[0] as ResourceSetExpression;
801
return mce.
Arguments
[0];
803
else if (mce.
Arguments
[0] is NavigationPropertySingletonExpression)
806
return mce.
Arguments
[0];
816
ResourceExpression re = mce.
Arguments
[0] as ResourceExpression;
859
ConstantExpression ce = StripTo<ConstantExpression>(mce.
Arguments
[0]);
880
ConstantExpression name = StripTo<ConstantExpression>(mce.
Arguments
[0]);
881
ConstantExpression value = StripTo<ConstantExpression>(mce.
Arguments
[1]);
892
ValidationRules.RequireLegalCustomQueryOption(mce.
Arguments
[0], re);
1052
input = mce.
Arguments
[0] as ResourceSetExpression;
1054
PatternRules.MatchSingleArgumentLambda(mce.
Arguments
[1], out lambda))
1096
ResourceExpression input = (ResourceExpression)mce.
Arguments
[0];
1097
ConstantExpression constantArg = StripTo<ConstantExpression>(mce.
Arguments
[1]);
1111
ResourceExpression re = (ResourceExpression)mce.
Arguments
[0];
1315
expression = call.
Arguments
[0];
2099
result.TestLeft = call.
Arguments
[0];
2100
result.TestRight = call.
Arguments
[1];
System\Data\Services\Client\MemberAssignmentAnalysis.cs (1)
248
this.Visit(call.
Arguments
[0]);
System\Data\Services\Client\ProjectionPlanCompiler.cs (9)
954
Debug.Assert(call.
Arguments
.Count == 2, "call.Arguments.Count == 2 -- otherwise this isn't the expected Select() call on IQueryable");
958
Expression parameterSource = this.Visit(call.
Arguments
[0]);
975
Expression selectorExpression = this.Visit(call.
Arguments
[1]);
1017
Debug.Assert(call.
Arguments
.Count == 1, "call.Arguments.Count == 1 -- otherwise this isn't the expected ToList() call on IEnumerable");
1019
Expression result = this.Visit(call.
Arguments
[0]);
1048
Debug.Assert(call.
Arguments
.Count == 2, "call.Arguments.Count == 2 -- otherwise this isn't the argument we expected");
1051
Expression parameterSource = this.Visit(call.
Arguments
[0]);
1064
Expression selectorExpression = this.Visit(call.
Arguments
[1]);
1087
Expression source = this.Visit(call.
Arguments
[0]);