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