System\Data\Common\CommandTrees\DbLambda.cs (273)
92/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the argument to the Lambda function</param>
98public static DbLambda Create(TypeUsage argument1Type, Func<DbExpression, DbExpression> lambdaFunction)
112/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
113/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
120public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, Func<DbExpression, DbExpression, DbExpression> lambdaFunction)
135/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
136/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
137/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
144public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, Func<DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
160/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
161/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
162/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
163/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
170public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
187/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
188/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
189/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
190/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
191/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
198public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
216/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
217/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
218/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
219/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
220/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
221/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
229public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
248/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
249/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
250/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
251/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
252/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
253/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
254/// <param name="argument7Type">A <see cref="TypeUsage"/> that defines the EDM type of the seventh argument to the Lambda function</param>
262public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, TypeUsage argument7Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
282/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
283/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
284/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
285/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
286/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
287/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
288/// <param name="argument7Type">A <see cref="TypeUsage"/> that defines the EDM type of the seventh argument to the Lambda function</param>
289/// <param name="argument8Type">A <see cref="TypeUsage"/> that defines the EDM type of the eighth argument to the Lambda function</param>
297public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, TypeUsage argument7Type, TypeUsage argument8Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
318/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
319/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
320/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
321/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
322/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
323/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
324/// <param name="argument7Type">A <see cref="TypeUsage"/> that defines the EDM type of the seventh argument to the Lambda function</param>
325/// <param name="argument8Type">A <see cref="TypeUsage"/> that defines the EDM type of the eighth argument to the Lambda function</param>
326/// <param name="argument9Type">A <see cref="TypeUsage"/> that defines the EDM type of the ninth argument to the Lambda function</param>
335public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, TypeUsage argument7Type, TypeUsage argument8Type, TypeUsage argument9Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
357/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
358/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
359/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
360/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
361/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
362/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
363/// <param name="argument7Type">A <see cref="TypeUsage"/> that defines the EDM type of the seventh argument to the Lambda function</param>
364/// <param name="argument8Type">A <see cref="TypeUsage"/> that defines the EDM type of the eighth argument to the Lambda function</param>
365/// <param name="argument9Type">A <see cref="TypeUsage"/> that defines the EDM type of the ninth argument to the Lambda function</param>
366/// <param name="argument10Type">A <see cref="TypeUsage"/> that defines the EDM type of the tenth argument to the Lambda function</param>
375public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, TypeUsage argument7Type, TypeUsage argument8Type, TypeUsage argument9Type, TypeUsage argument10Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
398/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
399/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
400/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
401/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
402/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
403/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
404/// <param name="argument7Type">A <see cref="TypeUsage"/> that defines the EDM type of the seventh argument to the Lambda function</param>
405/// <param name="argument8Type">A <see cref="TypeUsage"/> that defines the EDM type of the eighth argument to the Lambda function</param>
406/// <param name="argument9Type">A <see cref="TypeUsage"/> that defines the EDM type of the ninth argument to the Lambda function</param>
407/// <param name="argument10Type">A <see cref="TypeUsage"/> that defines the EDM type of the tenth argument to the Lambda function</param>
408/// <param name="argument11Type">A <see cref="TypeUsage"/> that defines the EDM type of the eleventh argument to the Lambda function</param>
417public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, TypeUsage argument7Type, TypeUsage argument8Type, TypeUsage argument9Type, TypeUsage argument10Type, TypeUsage argument11Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
441/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
442/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
443/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
444/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
445/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
446/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
447/// <param name="argument7Type">A <see cref="TypeUsage"/> that defines the EDM type of the seventh argument to the Lambda function</param>
448/// <param name="argument8Type">A <see cref="TypeUsage"/> that defines the EDM type of the eighth argument to the Lambda function</param>
449/// <param name="argument9Type">A <see cref="TypeUsage"/> that defines the EDM type of the ninth argument to the Lambda function</param>
450/// <param name="argument10Type">A <see cref="TypeUsage"/> that defines the EDM type of the tenth argument to the Lambda function</param>
451/// <param name="argument11Type">A <see cref="TypeUsage"/> that defines the EDM type of the eleventh argument to the Lambda function</param>
452/// <param name="argument12Type">A <see cref="TypeUsage"/> that defines the EDM type of the twelfth argument to the Lambda function</param>
462public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, TypeUsage argument7Type, TypeUsage argument8Type, TypeUsage argument9Type, TypeUsage argument10Type, TypeUsage argument11Type, TypeUsage argument12Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
487/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
488/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
489/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
490/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
491/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
492/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
493/// <param name="argument7Type">A <see cref="TypeUsage"/> that defines the EDM type of the seventh argument to the Lambda function</param>
494/// <param name="argument8Type">A <see cref="TypeUsage"/> that defines the EDM type of the eighth argument to the Lambda function</param>
495/// <param name="argument9Type">A <see cref="TypeUsage"/> that defines the EDM type of the ninth argument to the Lambda function</param>
496/// <param name="argument10Type">A <see cref="TypeUsage"/> that defines the EDM type of the tenth argument to the Lambda function</param>
497/// <param name="argument11Type">A <see cref="TypeUsage"/> that defines the EDM type of the eleventh argument to the Lambda function</param>
498/// <param name="argument12Type">A <see cref="TypeUsage"/> that defines the EDM type of the twelfth argument to the Lambda function</param>
499/// <param name="argument13Type">A <see cref="TypeUsage"/> that defines the EDM type of the thirteenth argument to the Lambda function</param>
509public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, TypeUsage argument7Type, TypeUsage argument8Type, TypeUsage argument9Type, TypeUsage argument10Type, TypeUsage argument11Type, TypeUsage argument12Type, TypeUsage argument13Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
535/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
536/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
537/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
538/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
539/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
540/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
541/// <param name="argument7Type">A <see cref="TypeUsage"/> that defines the EDM type of the seventh argument to the Lambda function</param>
542/// <param name="argument8Type">A <see cref="TypeUsage"/> that defines the EDM type of the eighth argument to the Lambda function</param>
543/// <param name="argument9Type">A <see cref="TypeUsage"/> that defines the EDM type of the ninth argument to the Lambda function</param>
544/// <param name="argument10Type">A <see cref="TypeUsage"/> that defines the EDM type of the tenth argument to the Lambda function</param>
545/// <param name="argument11Type">A <see cref="TypeUsage"/> that defines the EDM type of the eleventh argument to the Lambda function</param>
546/// <param name="argument12Type">A <see cref="TypeUsage"/> that defines the EDM type of the twelfth argument to the Lambda function</param>
547/// <param name="argument13Type">A <see cref="TypeUsage"/> that defines the EDM type of the thirteenth argument to the Lambda function</param>
548/// <param name="argument14Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourteenth argument to the Lambda function</param>
558public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, TypeUsage argument7Type, TypeUsage argument8Type, TypeUsage argument9Type, TypeUsage argument10Type, TypeUsage argument11Type, TypeUsage argument12Type, TypeUsage argument13Type, TypeUsage argument14Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
585/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
586/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
587/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
588/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
589/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
590/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
591/// <param name="argument7Type">A <see cref="TypeUsage"/> that defines the EDM type of the seventh argument to the Lambda function</param>
592/// <param name="argument8Type">A <see cref="TypeUsage"/> that defines the EDM type of the eighth argument to the Lambda function</param>
593/// <param name="argument9Type">A <see cref="TypeUsage"/> that defines the EDM type of the ninth argument to the Lambda function</param>
594/// <param name="argument10Type">A <see cref="TypeUsage"/> that defines the EDM type of the tenth argument to the Lambda function</param>
595/// <param name="argument11Type">A <see cref="TypeUsage"/> that defines the EDM type of the eleventh argument to the Lambda function</param>
596/// <param name="argument12Type">A <see cref="TypeUsage"/> that defines the EDM type of the twelfth argument to the Lambda function</param>
597/// <param name="argument13Type">A <see cref="TypeUsage"/> that defines the EDM type of the thirteenth argument to the Lambda function</param>
598/// <param name="argument14Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourteenth argument to the Lambda function</param>
599/// <param name="argument15Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifteenth argument to the Lambda function</param>
610public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, TypeUsage argument7Type, TypeUsage argument8Type, TypeUsage argument9Type, TypeUsage argument10Type, TypeUsage argument11Type, TypeUsage argument12Type, TypeUsage argument13Type, TypeUsage argument14Type, TypeUsage argument15Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
638/// <param name="argument1Type">A <see cref="TypeUsage"/> that defines the EDM type of the first argument to the Lambda function</param>
639/// <param name="argument2Type">A <see cref="TypeUsage"/> that defines the EDM type of the second argument to the Lambda function</param>
640/// <param name="argument3Type">A <see cref="TypeUsage"/> that defines the EDM type of the third argument to the Lambda function</param>
641/// <param name="argument4Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourth argument to the Lambda function</param>
642/// <param name="argument5Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifth argument to the Lambda function</param>
643/// <param name="argument6Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixth argument to the Lambda function</param>
644/// <param name="argument7Type">A <see cref="TypeUsage"/> that defines the EDM type of the seventh argument to the Lambda function</param>
645/// <param name="argument8Type">A <see cref="TypeUsage"/> that defines the EDM type of the eighth argument to the Lambda function</param>
646/// <param name="argument9Type">A <see cref="TypeUsage"/> that defines the EDM type of the ninth argument to the Lambda function</param>
647/// <param name="argument10Type">A <see cref="TypeUsage"/> that defines the EDM type of the tenth argument to the Lambda function</param>
648/// <param name="argument11Type">A <see cref="TypeUsage"/> that defines the EDM type of the eleventh argument to the Lambda function</param>
649/// <param name="argument12Type">A <see cref="TypeUsage"/> that defines the EDM type of the twelfth argument to the Lambda function</param>
650/// <param name="argument13Type">A <see cref="TypeUsage"/> that defines the EDM type of the thirteenth argument to the Lambda function</param>
651/// <param name="argument14Type">A <see cref="TypeUsage"/> that defines the EDM type of the fourteenth argument to the Lambda function</param>
652/// <param name="argument15Type">A <see cref="TypeUsage"/> that defines the EDM type of the fifteenth argument to the Lambda function</param>
653/// <param name="argument16Type">A <see cref="TypeUsage"/> that defines the EDM type of the sixteenth argument to the Lambda function</param>
664public static DbLambda Create(TypeUsage argument1Type, TypeUsage argument2Type, TypeUsage argument3Type, TypeUsage argument4Type, TypeUsage argument5Type, TypeUsage argument6Type, TypeUsage argument7Type, TypeUsage argument8Type, TypeUsage argument9Type, TypeUsage argument10Type, TypeUsage argument11Type, TypeUsage argument12Type, TypeUsage argument13Type, TypeUsage argument14Type, TypeUsage argument15Type, TypeUsage argument16Type, Func<DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression, DbExpression> lambdaFunction)
690private static DbVariableReferenceExpression[] CreateVariables(MethodInfo lambdaMethod, params TypeUsage[] argumentTypes)
System\Data\Common\CommandTrees\ExpressionBuilder\DbExpressionBuilder.cs (74)
97TypeUsage elementType = ArgumentValidation.ValidateBindAs(input, varName);
126TypeUsage elementType = ArgumentValidation.ValidateGroupBindAs(input, varName, groupVarName);
174TypeUsage resultType = function.ReturnParameter.TypeUsage;
187TypeUsage resultType = TypeHelpers.CreateCollectionTypeUsage(argument.ResultType);
309TypeUsage booleanResultType = ArgumentValidation.ValidateQuantifier(input, predicate);
325TypeUsage booleanResultType = ArgumentValidation.ValidateQuantifier(input, predicate);
339TypeUsage resultType = ArgumentValidation.ValidateApply(input, apply);
353TypeUsage resultType = ArgumentValidation.ValidateApply(input, apply);
368TypeUsage resultType;
392TypeUsage resultType = ArgumentValidation.ValidateJoin(left, right, joinCondition);
415TypeUsage resultType = ArgumentValidation.ValidateJoin(left, right, joinCondition);
438TypeUsage resultType = ArgumentValidation.ValidateJoin(left, right, joinCondition);
454TypeUsage resultType = ArgumentValidation.ValidateFilter(input, predicate);
481TypeUsage resultType = ArgumentValidation.ValidateGroupBy(input, keys, aggregates, out validKeys, out validAggregates);
494TypeUsage resultType = ArgumentValidation.ValidateProject(input, projection);
582public static DbNullExpression Null(this TypeUsage nullType)
609TypeUsage constantType = ArgumentValidation.ValidateConstant(value);
625public static DbConstantExpression Constant(this TypeUsage constantType, object value)
640public static DbParameterReferenceExpression Parameter(this TypeUsage type, string name)
655public static DbVariableReferenceExpression Variable(this TypeUsage type, string name)
669TypeUsage resultType = ArgumentValidation.ValidateScan(targetSet);
689TypeUsage resultType = ArgumentValidation.ValidateAnd(left, right);
705TypeUsage resultType = ArgumentValidation.ValidateOr(left, right);
720TypeUsage resultType = ArgumentValidation.ValidateNot(argument);
730TypeUsage numericResultType;
821TypeUsage resultType;
846TypeUsage resultType = ArgumentValidation.ValidateComparison(kind, left, right);
949TypeUsage resultType = ArgumentValidation.ValidateIsNull(argument);
963TypeUsage resultType = ArgumentValidation.ValidateLike(argument, pattern);
979TypeUsage resultType = ArgumentValidation.ValidateLike(argument, pattern, escape);
995public static DbCastExpression CastTo(this DbExpression argument, TypeUsage toType)
1014public static DbTreatExpression TreatAs(this DbExpression argument, TypeUsage treatType)
1036public static DbOfTypeExpression OfType(this DbExpression argument, TypeUsage type)
1038TypeUsage collectionOfTypeResultType = ArgumentValidation.ValidateOfType(argument, type);
1058public static DbOfTypeExpression OfTypeOnly(this DbExpression argument, TypeUsage type)
1060TypeUsage collectionOfTypeResultType = ArgumentValidation.ValidateOfType(argument, type);
1078public static DbIsOfExpression IsOf(this DbExpression argument, TypeUsage type)
1080TypeUsage booleanResultType = ArgumentValidation.ValidateIsOf(argument, type);
1098public static DbIsOfExpression IsOfOnly(this DbExpression argument, TypeUsage type)
1100TypeUsage booleanResultType = ArgumentValidation.ValidateIsOf(argument, type);
1118TypeUsage entityResultType = ArgumentValidation.ValidateDeref(argument);
1131TypeUsage refResultType = ArgumentValidation.ValidateGetEntityRef(argument);
1206TypeUsage refResultType = ArgumentValidation.ValidateCreateRef(entitySet, keyValues, out keyConstructor);
1213TypeUsage refResultType = ArgumentValidation.ValidateCreateRef(entitySet, entityType, keyValues, out keyConstructor);
1233TypeUsage refResultType = ArgumentValidation.ValidateRefFromKey(entitySet, keyRow);
1255TypeUsage refResultType = ArgumentValidation.ValidateRefFromKey(entitySet, keyRow, entityType);
1268TypeUsage rowResultType = ArgumentValidation.ValidateGetRefKey(argument);
1290TypeUsage resultType = ArgumentValidation.ValidateNavigate(navigateFrom, fromEnd, toEnd, out relType, allowAllRelationshipsInSameTypeHierarchy: false);
1318TypeUsage resultType = ArgumentValidation.ValidateNavigate(navigateFrom, type, fromEndName, toEndName, out fromEnd, out toEnd);
1335TypeUsage resultType = ArgumentValidation.ValidateDistinct(argument);
1348TypeUsage resultType = ArgumentValidation.ValidateElement(argument);
1361TypeUsage booleanResultType = ArgumentValidation.ValidateIsEmpty(argument);
1375TypeUsage resultType = ArgumentValidation.ValidateExcept(left, right);
1389TypeUsage resultType = ArgumentValidation.ValidateIntersect(left, right);
1403TypeUsage resultType = ArgumentValidation.ValidateUnionAll(left, right);
1421TypeUsage resultType = ArgumentValidation.ValidateLimit(argument, count);
1448TypeUsage resultType = ArgumentValidation.ValidateCase(whenExpressions, thenExpressions, elseExpression, out validWhens, out validThens);
1493TypeUsage resultType = ArgumentValidation.ValidateFunction(function, arguments, out validArguments);
1538TypeUsage resultType = ArgumentValidation.ValidateInvoke(lambda, arguments, out validArguments);
1565public static DbNewInstanceExpression New(this TypeUsage instanceType, IEnumerable<DbExpression> arguments)
1593public static DbNewInstanceExpression New(this TypeUsage instanceType, params DbExpression[] arguments)
1598private static DbNewInstanceExpression NewInstance(TypeUsage instanceType, IEnumerable<DbExpression> arguments)
1601TypeUsage resultType = ArgumentValidation.ValidateNew(instanceType, arguments, out validArguments);
1636TypeUsage collectionResultType = ArgumentValidation.ValidateNewCollection(elements, out validElements);
1647public static DbNewInstanceExpression NewEmptyCollection(this TypeUsage collectionType)
1650TypeUsage validResultType = ArgumentValidation.ValidateNewEmptyCollection(collectionType, out validElements);
1667TypeUsage resultType = ArgumentValidation.ValidateNewRow(columnValues, out validElements);
1725TypeUsage resultType = ArgumentValidation.ValidateProperty(instance, property, propertyArgumentName);
1732TypeUsage resultType = ArgumentValidation.ValidateProperty(instance, propertyName, ignoreCase, out property);
1855TypeUsage resultType = TypeHelpers.GetLiteralTypeUsage(primitiveTypeKind);
2758TypeUsage resultType = ArgumentValidation.ValidateIsNull(argument, true);
2780TypeUsage resultType = ArgumentValidation.ValidateElement(argument);
2828TypeUsage resultType = ArgumentValidation.ValidateNewEntityWithRelationships(entityType, attributeValues, relationships, out validAttributes, out validRelatedRefs);
2844TypeUsage resultType = ArgumentValidation.ValidateNavigate(navigateFrom, fromEnd, toEnd, out relType, allowAllRelationshipsInSameTypeHierarchy: true);
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\ArgumentValidation.cs (132)
24private static TypeUsage _booleanType = EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Boolean);
32private static void RequirePolymorphicType(TypeUsage type, string typeArgumentName)
42private static void RequireCompatibleType(DbExpression expression, TypeUsage requiredResultType, string argumentName)
47private static void RequireCompatibleType(DbExpression expression, TypeUsage requiredResultType, string argumentName, int argumentIndex)
105TypeUsage endType = end.TypeUsage;
140private static TypeUsage RequireCollectionArguments<TExpressionType>(DbExpression left, DbExpression right)
149TypeUsage commonType = TypeHelpers.GetCommonTypeUsage(left.ResultType, right.ResultType);
158private static TypeUsage RequireComparableCollectionArguments<TExpressionType>(DbExpression left, DbExpression right)
160TypeUsage resultType = RequireCollectionArguments<TExpressionType>(left, right);
227private static TypeUsage ValidateBinary(DbExpression left, DbExpression right)
240private static void ValidateTypeUnary(DbExpression argument, TypeUsage type, string typeArgumentName)
248internal static TypeUsage ValidateBindAs(DbExpression input, string varName)
267TypeUsage elementType = null;
278internal static TypeUsage ValidateGroupBindAs(DbExpression input, string varName, string groupVarName)
303TypeUsage elementType = null;
341TypeUsage paramType = expectedParams[idx].TypeUsage;
342TypeUsage elementType = null;
433internal static TypeUsage ValidateQuantifier(DbExpressionBinding input, DbExpression predicate)
441internal static TypeUsage ValidateApply(DbExpressionBinding input, DbExpressionBinding apply)
457List<KeyValuePair<string, TypeUsage>> recordCols = new List<KeyValuePair<string, TypeUsage>>();
458recordCols.Add(new KeyValuePair<string, TypeUsage>(input.VariableName, input.VariableType));
459recordCols.Add(new KeyValuePair<string, TypeUsage>(apply.VariableName, apply.VariableType));
464internal static System.Collections.ObjectModel.ReadOnlyCollection<DbExpressionBinding> ValidateCrossJoin(IEnumerable<DbExpressionBinding> inputs, out TypeUsage resultType)
476List<KeyValuePair<string, TypeUsage>> columns = new List<KeyValuePair<string, TypeUsage>>();
501columns.Add(new KeyValuePair<string, TypeUsage>(input.VariableName, input.VariableType));
522internal static TypeUsage ValidateJoin(DbExpressionBinding left, DbExpressionBinding right, DbExpression joinCondition)
547List<KeyValuePair<string, TypeUsage>> columns = new List<KeyValuePair<string, TypeUsage>>(2);
548columns.Add(new KeyValuePair<string, TypeUsage>(left.VariableName, left.VariableType));
549columns.Add(new KeyValuePair<string, TypeUsage>(right.VariableName, right.VariableType));
554internal static TypeUsage ValidateFilter(DbExpressionBinding input, DbExpression predicate)
561internal static TypeUsage ValidateGroupBy(DbGroupExpressionBinding input, IEnumerable<KeyValuePair<string, DbExpression>> keys, IEnumerable<KeyValuePair<string, DbAggregate>> aggregates, out DbExpressionList validKeys, out System.Collections.ObjectModel.ReadOnlyCollection<DbAggregate> validAggregates)
571List<KeyValuePair<string, TypeUsage>> columns = new List<KeyValuePair<string, TypeUsage>>();
591columns.Add(new KeyValuePair<string, TypeUsage>(keyInfo.Key, keyInfo.Value.ResultType));
630columns.Add(new KeyValuePair<string, TypeUsage>(aggInfo.Key, aggInfo.Value.ResultType));
653internal static TypeUsage ValidateProject(DbExpressionBinding input, DbExpression projection)
725internal static void ValidateNull(TypeUsage nullType)
730internal static TypeUsage ValidateConstant(object value)
746internal static void ValidateConstant(TypeUsage constantType, object value)
798internal static void ValidateParameter(TypeUsage type, string name)
809internal static TypeUsage ValidateScan(EntitySetBase entitySet)
815internal static void ValidateVariable(TypeUsage type, string name)
830internal static TypeUsage ValidateAnd(DbExpression left, DbExpression right)
832TypeUsage resultType = ValidateBinary(left, right);
841internal static TypeUsage ValidateOr(DbExpression left, DbExpression right)
843TypeUsage resultType = ValidateBinary(left, right);
852internal static TypeUsage ValidateNot(DbExpression argument)
871internal static DbExpressionList ValidateArithmetic(DbExpression argument, out TypeUsage resultType)
883TypeUsage closestPromotableType = null;
896internal static DbExpressionList ValidateArithmetic(DbExpression left, DbExpression right, out TypeUsage resultType)
911internal static TypeUsage ValidateComparison(DbExpressionKind kind, DbExpression left, DbExpression right)
945internal static TypeUsage ValidateIsNull(DbExpression argument)
950internal static TypeUsage ValidateIsNull(DbExpression argument, bool allowRowType)
977internal static TypeUsage ValidateLike(DbExpression argument, DbExpression pattern)
988internal static TypeUsage ValidateLike(DbExpression argument, DbExpression pattern, DbExpression escape)
990TypeUsage resultType = ValidateLike(argument, pattern);
1002internal static void ValidateCastTo(DbExpression argument, TypeUsage toType)
1015internal static void ValidateTreatAs(DbExpression argument, TypeUsage asType)
1033internal static TypeUsage ValidateOfType(DbExpression argument, TypeUsage type)
1051TypeUsage elementType = null;
1064internal static TypeUsage ValidateIsOf(DbExpression argument, TypeUsage type)
1089internal static TypeUsage ValidateDeref(DbExpression argument)
1108internal static TypeUsage ValidateGetEntityRef(DbExpression argument)
1121internal static TypeUsage ValidateCreateRef(EntitySet entitySet, IEnumerable<DbExpression> keyValues, out DbExpression keyConstructor)
1127internal static TypeUsage ValidateCreateRef(EntitySet entitySet, EntityType entityType, IEnumerable<DbExpression> keyValues, out DbExpression keyConstructor)
1160internal static TypeUsage ValidateRefFromKey(EntitySet entitySet, DbExpression keyValues)
1166internal static TypeUsage ValidateRefFromKey(EntitySet entitySet, DbExpression keyValues, EntityType entityType)
1192TypeUsage keyType = CreateResultType(TypeHelpers.CreateKeyRowType(entitySet.ElementType));
1198internal static TypeUsage ValidateGetRefKey(DbExpression argument)
1215internal static TypeUsage ValidateNavigate(DbExpression navigateFrom, RelationshipType type, string fromEndName, string toEndName, out RelationshipEndMember fromEnd, out RelationshipEndMember toEnd)
1251internal static TypeUsage ValidateNavigate(DbExpression navigateFrom, RelationshipEndMember fromEnd, RelationshipEndMember toEnd, out RelationshipType relType, bool allowAllRelationshipsInSameTypeHierarchy)
1285internal static TypeUsage ValidateDistinct(DbExpression argument)
1306internal static TypeUsage ValidateElement(DbExpression argument)
1321internal static TypeUsage ValidateIsEmpty(DbExpression argument)
1333internal static TypeUsage ValidateExcept(DbExpression left, DbExpression right)
1345internal static TypeUsage ValidateIntersect(DbExpression left, DbExpression right)
1355internal static TypeUsage ValidateUnionAll(DbExpression left, DbExpression right)
1365internal static TypeUsage ValidateLimit(DbExpression argument, DbExpression limit)
1407internal static TypeUsage ValidateCase(IEnumerable<DbExpression> whenExpressions, IEnumerable<DbExpression> thenExpressions, DbExpression elseExpression, out DbExpressionList validWhens, out DbExpressionList validThens)
1425TypeUsage commonResultType = null;
1464internal static TypeUsage ValidateFunction(EdmFunction function, IEnumerable<DbExpression> arguments, out DbExpressionList validArgs)
1504internal static TypeUsage ValidateInvoke(DbLambda lambda, IEnumerable<DbExpression> arguments, out DbExpressionList validArguments)
1525internal static TypeUsage ValidateNewCollection(IEnumerable<DbExpression> elements, out DbExpressionList validElements)
1527TypeUsage commonElementType = null;
1551internal static TypeUsage ValidateNewEmptyCollection(TypeUsage collectionType, out DbExpressionList validElements)
1569internal static TypeUsage ValidateNewRow(IEnumerable<KeyValuePair<string, DbExpression>> columnValues, out DbExpressionList validElements)
1571List<KeyValuePair<string, TypeUsage>> columnTypes = new List<KeyValuePair<string, TypeUsage>>();
1575columnTypes.Add(new KeyValuePair<string, TypeUsage>(columnValue.Key, columnValue.Value.ResultType));
1585internal static TypeUsage ValidateNew(TypeUsage instanceType, IEnumerable<DbExpression> arguments, out DbExpressionList validArguments)
1597TypeUsage elementType = collectionType.TypeUsage;
1605List<TypeUsage> expectedTypes = GetStructuralMemberTypes(instanceType);
1616private static List<TypeUsage> GetStructuralMemberTypes(TypeUsage instanceType)
1635List<TypeUsage> memberTypes = new List<TypeUsage>(members.Count);
1643internal static TypeUsage ValidateNewEntityWithRelationships(EntityType entityType, IEnumerable<DbExpression> attributeValues, IList<DbRelatedEntityRef> relationships, out DbExpressionList validArguments, out System.Collections.ObjectModel.ReadOnlyCollection<DbRelatedEntityRef> validRelatedRefs)
1649TypeUsage resultType = CreateResultType(entityType);
1681internal static TypeUsage ValidateProperty(DbExpression instance, EdmMember property, string propertyArgumentName)
1696TypeUsage expectedInstanceType = TypeUsage.Create(property.DeclaringType);
1704internal static TypeUsage ValidateProperty(DbExpression instance, string propertyName, bool ignoreCase, out EdmMember foundMember)
1770private static void CheckReadOnly(TypeUsage item, string varName)
1806private static void CheckType(TypeUsage type)
1811private static void CheckType(TypeUsage type, string varName)
1941private static bool CheckDataSpace(TypeUsage type)
1984private static TypeUsage CreateCollectionOfRowResultType(List<KeyValuePair<string, TypeUsage>> columns)
1986TypeUsage retUsage = TypeUsage.Create(
1988TypeUsage.Create(
1997private static TypeUsage CreateCollectionResultType(EdmType type)
1999TypeUsage retUsage = TypeUsage.Create(
2001TypeUsage.Create(type)
2008private static TypeUsage CreateCollectionResultType(TypeUsage type)
2010TypeUsage retUsage = TypeUsage.Create(TypeHelpers.CreateCollectionType(type));
2014private static TypeUsage CreateResultType(EdmType resultType)
2016return TypeUsage.Create(resultType);
2019private static TypeUsage CreateResultType(RelationshipEndMember end)
2021TypeUsage retType = end.TypeUsage;
2044private static TypeUsage CreateReferenceResultType(EntityTypeBase referencedEntityType)
2046return TypeUsage.Create(TypeHelpers.CreateReferenceType(referencedEntityType));
System\Data\Common\CommandTrees\Internal\ExpressionPrinter.cs (8)
202foreach (KeyValuePair<string, TypeUsage> paramInfo in tree.Parameters)
262AppendParameters(funcInfo, func.Parameters.Select(fp => new KeyValuePair<string, TypeUsage>(fp.Name, fp.TypeUsage)));
276private static void AppendParameters(TreeNode node, IEnumerable<KeyValuePair<string, TypeUsage>> paramInfos)
280foreach(KeyValuePair<string, TypeUsage> paramInfo in paramInfos)
294internal static void AppendTypeSpecifier(TreeNode node, TypeUsage type)
300internal static void AppendType(TreeNode node, TypeUsage type)
305private static void BuildTypeName(StringBuilder text, TypeUsage type)
540AppendParameters(lambdaInfo, expression.Lambda.Variables.Select(v => new KeyValuePair<string, TypeUsage>(v.VariableName, v.ResultType)));
System\Data\Common\CommandTrees\OperatorExpressions.cs (21)
29internal DbAndExpression(TypeUsage booleanResultType, DbExpression left, DbExpression right)
59internal DbOrExpression(TypeUsage booleanResultType, DbExpression left, DbExpression right)
89internal DbNotExpression(TypeUsage booleanResultType, DbExpression argument)
122internal DbArithmeticExpression(DbExpressionKind kind, TypeUsage numericResultType, DbExpressionList args)
185internal DbCaseExpression(TypeUsage commonResultType, DbExpressionList whens, DbExpressionList thens, DbExpression elseExpr)
236internal DbCastExpression(TypeUsage type, DbExpression argument)
271internal DbComparisonExpression(DbExpressionKind kind, TypeUsage booleanResultType, DbExpression left, DbExpression right)
311internal DbIsEmptyExpression(TypeUsage booleanResultType, DbExpression argument)
340internal DbIsNullExpression(TypeUsage booleanResultType, DbExpression arg, bool isRowTypeArgumentAllowed)
369private TypeUsage _ofType;
371internal DbIsOfExpression(DbExpressionKind isOfKind, TypeUsage booleanResultType, DbExpression argument, TypeUsage isOfType)
383public TypeUsage OfType
411private readonly TypeUsage _ofType;
413internal DbOfTypeExpression(DbExpressionKind ofTypeKind, TypeUsage collectionResultType, DbExpression argument, TypeUsage type)
429public TypeUsage OfType
457internal DbTreatExpression(TypeUsage asType, DbExpression argument)
490internal DbLikeExpression(TypeUsage booleanResultType, DbExpression input, DbExpression pattern, DbExpression escape)
544internal DbEntityRefExpression(TypeUsage refResultType, DbExpression entity)
573internal DbRefKeyExpression(TypeUsage rowResultType, DbExpression reference)
System\Data\Common\CommandTrees\RelationalExpressions.cs (16)
30internal DbApplyExpression(DbExpressionKind applyKind, TypeUsage resultRowCollectionTypeUsage, DbExpressionBinding input, DbExpressionBinding apply)
78internal DbDistinctExpression(TypeUsage resultType, DbExpression argument)
113internal DbElementExpression(TypeUsage resultType, DbExpression argument)
119internal DbElementExpression(TypeUsage resultType, DbExpression argument, bool unwrapSingleProperty)
157internal DbExceptExpression(TypeUsage resultType, DbExpression left, DbExpression right)
189internal DbFilterExpression(TypeUsage resultType, DbExpressionBinding input, DbExpression predicate)
237internal DbGroupByExpression(TypeUsage collectionOfRowResultType,
294internal DbIntersectExpression(TypeUsage resultType, DbExpression left, DbExpression right)
324internal DbCrossJoinExpression(TypeUsage collectionOfRowResultType, System.Collections.ObjectModel.ReadOnlyCollection<DbExpressionBinding> inputs)
365internal DbJoinExpression(DbExpressionKind joinKind, TypeUsage collectionOfRowResultType, DbExpressionBinding left, DbExpressionBinding right, DbExpression condition)
423internal DbLimitExpression(TypeUsage resultType, DbExpression argument, DbExpression limit, bool withTies)
476internal DbProjectExpression(TypeUsage resultType, DbExpressionBinding input, DbExpression projection)
522internal DbQuantifierExpression(DbExpressionKind kind, TypeUsage booleanResultType, DbExpressionBinding input, DbExpression predicate)
606internal DbSkipExpression(TypeUsage resultType, DbExpressionBinding input, System.Collections.ObjectModel.ReadOnlyCollection<DbSortClause> sortOrder, DbExpression count)
663internal DbSortExpression(TypeUsage resultType, DbExpressionBinding input, System.Collections.ObjectModel.ReadOnlyCollection<DbSortClause> sortOrder)
710internal DbUnionAllExpression(TypeUsage resultType, DbExpression left, DbExpression right)
System\Data\Common\CommandTrees\ValueExpressions.cs (13)
28internal DbConstantExpression(TypeUsage resultType, object value)
106internal DbNullExpression(TypeUsage type)
136internal DbVariableReferenceExpression(TypeUsage type, string name)
174internal DbParameterReferenceExpression(TypeUsage type, string name)
213internal DbPropertyExpression(TypeUsage resultType, EdmMember property, DbExpression instance)
278internal DbFunctionExpression(TypeUsage resultType, EdmFunction function, DbExpressionList arguments)
325internal DbLambdaExpression(TypeUsage resultType, DbLambda lambda, DbExpressionList args)
491TypeUsage resultType,
638internal DbNewInstanceExpression(TypeUsage type, DbExpressionList args)
647internal DbNewInstanceExpression(TypeUsage resultType, DbExpressionList attributeValues, System.Collections.ObjectModel.ReadOnlyCollection<DbRelatedEntityRef> relationships)
695internal DbRefExpression(TypeUsage refResultType, EntitySet entitySet, DbExpression refKeys)
731internal DbDerefExpression(TypeUsage entityResultType, DbExpression refExpr)
762internal DbScanExpression(TypeUsage collectionOfEntityType, EntitySetBase entitySet)
System\Data\Common\DbCommandDefinition.cs (6)
67internal static void PopulateParameterFromTypeUsage(DbParameter parameter, TypeUsage type, bool isOutParam)
175private static void PopulateBinaryParameter(DbParameter parameter, TypeUsage type, DbType dbType, bool isOutParam)
184private static void PopulateDecimalParameter (DbParameter parameter, TypeUsage type, DbType dbType)
204private static void PopulateDateTimeParameter(DbParameter parameter, TypeUsage type, DbType dbType)
219private static void PopulateStringParameter(DbParameter parameter, TypeUsage type, bool isOutParam)
250private static void SetParameterSize(DbParameter parameter, TypeUsage type, bool isOutParam)
System\Data\Common\EntitySql\FunctionOverloadResolver.cs (45)
29IList<TypeUsage> argTypes,
52IList<TypeUsage> argTypes,
53Func<TypeUsage, IEnumerable<TypeUsage>> flattenArgumentType,
54Func<TypeUsage, TypeUsage, IEnumerable<TypeUsage>> flattenParameterType,
55Func<TypeUsage, TypeUsage, bool> isPromotableTo,
56Func<TypeUsage, TypeUsage, bool> isStructurallyEqual,
83IList<TypeUsage> argTypes,
85Func<TFunctionParameterMetadata, TypeUsage> getParameterTypeUsage,
87Func<TypeUsage, IEnumerable<TypeUsage>> flattenArgumentType,
88Func<TypeUsage, TypeUsage, IEnumerable<TypeUsage>> flattenParameterType,
89Func<TypeUsage, TypeUsage, bool> isPromotableTo,
90Func<TypeUsage, TypeUsage, bool> isStructurallyEqual,
97List<TypeUsage> argTypesFlat = new List<TypeUsage>(argTypes.Count);
98foreach (TypeUsage argType in argTypes)
191private static bool TryRankFunctionParameters<TFunctionParameterMetadata>(IList<TypeUsage> argumentList,
192IList<TypeUsage> flatArgumentList,
194Func<TFunctionParameterMetadata, TypeUsage> getParameterTypeUsage,
196Func<TypeUsage, TypeUsage, IEnumerable<TypeUsage>> flattenParameterType,
197Func<TypeUsage, TypeUsage, bool> isPromotableTo,
198Func<TypeUsage, TypeUsage, bool> isStructurallyEqual,
214List<TypeUsage> flatOverloadParamList = new List<TypeUsage>(flatArgumentList.Count);
217TypeUsage argumentType = argumentList[i];
218TypeUsage parameterType = getParameterTypeUsage(overloadParamList[i]);
280private static int GetPromotionRank(TypeUsage fromType,
281TypeUsage toType,
282Func<TypeUsage, TypeUsage, bool> isPromotableTo,
283Func<TypeUsage, TypeUsage, bool> isStructurallyEqual)
System\Data\Common\EntitySql\SemanticAnalyzer.cs (53)
320private static void ValidateQueryResultType(TypeUsage resultType, ErrorContext errCtx)
415TypeUsage typeUsage = ConvertTypeDefinition(paramDef.Type, sr);
619private static TypeUsage GetLiteralTypeUsage(AST.Literal literal)
627TypeUsage literalTypeUsage = TypeHelpers.GetLiteralTypeUsage(primitiveType.PrimitiveTypeKind, literal.IsUnicodeString);
926List<TypeUsage> argTypes;
1033List<TypeUsage> argTypes;
1114List<TypeUsage> argTypes;
1183out List<TypeUsage> argTypes,
1230List<TypeUsage> argTypes,
1270List<TypeUsage> aggArgTypes;
1325TypeUsage type,
1343TypeUsage memberModelTypeUsage = Helper.GetModelTypeUsage(member);
1453List<TypeUsage> argTypes;
1500private static List<DbExpression> ConvertFunctionArguments(AST.NodeList<AST.Node> astExprList, SemanticResolver sr, out List<TypeUsage> argTypes)
1519Func<TParameterMetadata, TypeUsage> getParameterTypeUsage)
1889if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(keyRowExpression.ResultType, TypeUsage.Create(entityKeyRowType)))
1899TypeUsage targetTypeUsage = ConvertTypeName(createRefExpr.TypeIdentifier, sr);
2191TypeUsage commonType;
2192TypeUsage leftElemType = TypeHelpers.GetElementTypeUsage(leftExpr.ResultType);
2193TypeUsage rightElemType = TypeHelpers.GetElementTypeUsage(rightExpr.ResultType);
2285TypeUsage elementType = TypeHelpers.GetElementTypeUsage(rightExpr.ResultType);
2298TypeUsage commonElemType = TypeHelpers.GetCommonTypeUsage(leftExpr.ResultType, TypeHelpers.GetElementTypeUsage(rightExpr.ResultType));
2307private static void ValidateTypeForNullExpression(TypeUsage type, ErrorContext errCtx)
2322private static TypeUsage ConvertTypeName(AST.Node typeName, SemanticResolver sr)
2373TypeUsage typeUsage = ((MetadataType)metadataMember).TypeUsage;
2392private static TypeUsage ConvertTypeSpecArgs(TypeUsage parameterizedType, AST.NodeList<AST.Node> typeSpecArgs, ErrorContext errCtx, SemanticResolver sr)
2447return TypeUsage.CreateDecimalTypeUsage(primitiveType, precision, scale);
2476private static TypeUsage ConvertTypeDefinition(AST.Node typeDefinitionExpr, SemanticResolver sr)
2480TypeUsage converted = null;
2488TypeUsage elementType = ConvertTypeDefinition(collTypeDefExpr.ElementTypeDef, sr);
2493TypeUsage targetTypeUsage = ConvertTypeName(refTypeDefExpr.RefTypeIdentifier, sr);
2514rowTypeDefExpr.Properties.Select(p => new KeyValuePair<string, TypeUsage>(p.Name.Name, ConvertTypeDefinition(p.Type, sr))),
2534Dictionary<string, TypeUsage> rowColumns = new Dictionary<string, TypeUsage>(sr.NameComparer);
2593TypeUsage commonType = TypeHelpers.GetCommonTypeUsage(multisetTypes);
2672TypeUsage resultType = TypeHelpers.GetCommonTypeUsage(resultTypes);
2949private static void ValidateDistinctProjection(TypeUsage projectExpressionResultType, AST.SelectClause selectClause)
2958private static void ValidateDistinctProjection(TypeUsage projectExpressionResultType, ErrorContext defaultErrCtx, List<ErrorContext> projectionItemErrCtxs)
2960TypeUsage projectionType = TypeHelpers.GetElementTypeUsage(projectExpressionResultType);
4324private static bool IsStringType(TypeUsage type)
4329private static bool IsBooleanType(TypeUsage type)
4334private static bool IsSubOrSuperType(TypeUsage type1, TypeUsage type2)
4402List<TypeUsage> argTypes = new List<TypeUsage>(2);
4481TypeUsage closestPromotableType = null;
4887var typeToFilterTo = ConvertTypeName(bltInExpr.Arg2, sr);
4965var typeToTreatTo = ConvertTypeName(bltInExpr.Arg2, sr);
5030var typeToCastTo = ConvertTypeName(bltInExpr.Arg2, sr);
5069var typeToFilterTo = ConvertTypeName(bltInExpr.Arg2, sr);
5080TypeUsage elementType = TypeHelpers.GetElementTypeUsage(exprToFilter.ResultType);
5216TypeUsage rangeCommonType = TypeHelpers.GetCommonTypeUsage(limitsExpr.Left.ResultType, limitsExpr.Right.ResultType);
System\Data\Common\Internal\DbTypeMap.cs (27)
25internal static readonly TypeUsage AnsiString = CreateType(PrimitiveTypeKind.String, new FacetValues { Unicode = false, FixedLength = false, MaxLength = (int?)null });
26internal static readonly TypeUsage AnsiStringFixedLength = CreateType(PrimitiveTypeKind.String, new FacetValues { Unicode = false, FixedLength = true, MaxLength = (int?)null });
27internal static readonly TypeUsage String = CreateType(PrimitiveTypeKind.String, new FacetValues { Unicode = true, FixedLength = false, MaxLength = (int?)null });
28internal static readonly TypeUsage StringFixedLength = CreateType(PrimitiveTypeKind.String, new FacetValues { Unicode = true, FixedLength = true, MaxLength = (int?)null });
31internal static readonly TypeUsage Xml = CreateType(PrimitiveTypeKind.String, new FacetValues { Unicode = true, FixedLength = false, MaxLength = (int?)null });
32internal static readonly TypeUsage Binary = CreateType(PrimitiveTypeKind.Binary , new FacetValues { MaxLength = (int?)null });
33internal static readonly TypeUsage Boolean = CreateType(PrimitiveTypeKind.Boolean);
34internal static readonly TypeUsage Byte = CreateType(PrimitiveTypeKind.Byte);
35internal static readonly TypeUsage DateTime = CreateType(PrimitiveTypeKind.DateTime);
36internal static readonly TypeUsage Date = CreateType(PrimitiveTypeKind.DateTime);
37internal static readonly TypeUsage DateTime2 = CreateType(PrimitiveTypeKind.DateTime, new FacetValues { Precision = (byte?)null });
38internal static readonly TypeUsage Time = CreateType(PrimitiveTypeKind.Time, new FacetValues { Precision = (byte?)null });
39internal static readonly TypeUsage DateTimeOffset = CreateType(PrimitiveTypeKind.DateTimeOffset, new FacetValues { Precision = (byte?)null });
42internal static readonly TypeUsage Decimal = CreateType(PrimitiveTypeKind.Decimal, new FacetValues { Precision = (byte?)null, Scale = (byte?)null });
44internal static readonly TypeUsage Currency = CreateType(PrimitiveTypeKind.Decimal, new FacetValues { Precision = (byte?)null, Scale = (byte?)null });
45internal static readonly TypeUsage Double = CreateType(PrimitiveTypeKind.Double);
46internal static readonly TypeUsage Guid = CreateType(PrimitiveTypeKind.Guid);
47internal static readonly TypeUsage Int16 = CreateType(PrimitiveTypeKind.Int16);
48internal static readonly TypeUsage Int32 = CreateType(PrimitiveTypeKind.Int32);
49internal static readonly TypeUsage Int64 = CreateType(PrimitiveTypeKind.Int64);
50internal static readonly TypeUsage Single = CreateType(PrimitiveTypeKind.Single);
51internal static readonly TypeUsage SByte = CreateType(PrimitiveTypeKind.SByte);
53internal static bool TryGetModelTypeUsage(DbType dbType, out TypeUsage modelType)
157private static TypeUsage CreateType(PrimitiveTypeKind type)
162private static TypeUsage CreateType(PrimitiveTypeKind type, FacetValues facets)
165TypeUsage typeUsage = TypeUsage.Create(primitiveType, facets);
System\Data\Common\Internal\Materialization\Translator.cs (11)
327private Type DetermineClrType(TypeUsage typeUsage)
560null, new Type[] { typeof(MetadataWorkspace), typeof(TypeUsage), typeof(object[]) },
1046private static Expression Emit_Shaper_GetPropertyValueWithErrorHandling(Type propertyType, int ordinal, string propertyName, string typeName, TypeUsage columnType)
1066private static Expression Emit_Shaper_GetColumnValueWithErrorHandling(Type resultType, int ordinal, TypeUsage columnType)
1605TypeUsage edmType = Helper.GetModelTypeUsage(columnMap.Type);
1611TypeUsage[] typeUsages = new TypeUsage[recordStateScratchpad.ColumnCount];
1709TypeUsage type = columnMap.Type;
1714Expression typeUsage = Expression.Constant(type, typeof(TypeUsage));
1940TypeUsage edmElementType = ((CollectionType)columnMap.Type.EdmType).TypeUsage; // the TypeUsage of the Element of the collection.
2064TypeUsage columnType = columnMap.Type;
System\Data\EntityClient\EntityCommandDefinition.cs (12)
99TypeUsage storeResultType = DetermineStoreResultType(entityCommandTree.MetadataWorkspace, mapping, 0, out _columnMapGenerators[0]);
106List<KeyValuePair<string, TypeUsage>> providerParameters = new List<KeyValuePair<string, TypeUsage>>();
107foreach (KeyValuePair<string, TypeUsage> parameter in entityCommandTree.Parameters)
131foreach (KeyValuePair<string, TypeUsage> queryParameter in commandTree.Parameters) {
157private TypeUsage DetermineStoreResultType(MetadataWorkspace workspace, FunctionImportMappingNonComposable mapping, int resultSetIndex, out IColumnMapGenerator columnMapGenerator) {
163TypeUsage storeResultType;
193TypeUsage elementType = ((CollectionType)storeResultType.EdmType).TypeUsage;
327private static EntityParameter CreateEntityParameterFromQueryParameter(KeyValuePair<string, TypeUsage> queryParameter) {
339internal static void PopulateParameterFromTypeUsage(EntityParameter parameter, TypeUsage type, bool isOutParam)
348type = TypeUsage.Create(Helper.GetUnderlyingEdmTypeForEnumType(type.EdmType));
508TypeUsage parameterTypeUsage = TypeHelpers.GetPrimitiveTypeUsageForScalar(entityParameter.GetTypeUsage());
System\Data\Mapping\StorageMappingItemLoader.cs (22)
96internal StorageMappingItemLoader(XmlReader reader, StorageMappingItemCollection storageMappingItemCollection, string fileName, Dictionary<EdmMember, KeyValuePair<TypeUsage, TypeUsage>> scalarMemberMappings)
141private Dictionary<EdmMember, KeyValuePair<TypeUsage, TypeUsage>> m_scalarMemberMappings; // dictionary of all the scalar member mappings - this is to validate that no property is mapped to different store types across mappings.
2278if (!ValidateFunctionImportMappingResultTypeCompatibility(TypeUsage.Create(scalarResultType), cTypeTvfElementType.Properties[0].TypeUsage))
2301private bool ValidateFunctionImportMappingResultTypeCompatibility(TypeUsage cSpaceMemberType, TypeUsage sSpaceMemberType)
2304var fromType = sSpaceMemberType;
2305var toType = ResolveTypeUsageForEnums(cSpaceMemberType);
3243TypeUsage cspaceTypeUsage;
3602KeyValuePair<TypeUsage, TypeUsage> memberMappingInfo;
3611TypeUsage storeEquivalentTypeUsage = Helper.ValidateAndConvertTypeUsage(member,
3629m_scalarMemberMappings.Add(member, new KeyValuePair<TypeUsage, TypeUsage>(storeEquivalentTypeUsage, columnMember.TypeUsage));
3635TypeUsage storeMappedTypeUsage = memberMappingInfo.Value;
3636TypeUsage modelColumnMember = columnMember.TypeUsage.GetModelTypeUsage();
3674private string GetFacetsForDisplay(TypeUsage typeUsage)
4276TypeUsage mappedStoreType = Helper.ValidateAndConvertTypeUsage(property,
4444private static TypeUsage ResolveTypeUsageForEnums(TypeUsage typeUsage)
4449TypeUsage.Create(Helper.GetUnderlyingEdmTypeForEnumType(typeUsage.EdmType), typeUsage.Facets) :
System\Data\Metadata\Converter.cs (29)
715TypeUsage typeUsage = null;
742typeUsage = TypeUsage.Create(new CollectionType(propertyType));
747typeUsage = TypeUsage.Create(propertyType);
813TypeUsage typeUsage;
816typeUsage = TypeUsage.Create(edmType,
821typeUsage = TypeUsage.Create(edmType);
878TypeUsage returnType = GetFunctionTypeUsage(somFunction is Som.ModelFunction,
908TypeUsage returnType = GetFunctionTypeUsage(somFunction is Som.ModelFunction,
967TypeUsage parameterType = GetFunctionTypeUsage(somFunction is Som.ModelFunction,
1098private static TypeUsage GetFunctionTypeUsage(bool isModelFunction,
1211TypeUsage usage;
1220usage = TypeUsage.Create(new RefType(edmType as EntityType));
1264private static void ApplyTypePropertyFacets(TypeUsage sourceType, ref TypeUsage targetType)
1288targetType = TypeUsage.Create(targetType.EdmType, newFacets.Values);
1300ref TypeUsage propertyTypeUsage)
1327propertyTypeUsage = TypeUsage.Create(propertyTypeUsage.EdmType, facets.Values);
1370private static void UpdateSentinelValuesInFacets(ref TypeUsage typeUsage)
1401private readonly Dictionary<EdmType, TypeUsage> _nullFacetsTypeUsage;
1402private readonly Dictionary<EdmType, TypeUsage> _nullFacetsCollectionTypeUsage;
1409this._nullFacetsTypeUsage = new Dictionary<EdmType, TypeUsage>();
1410this._nullFacetsCollectionTypeUsage = new Dictionary<EdmType, TypeUsage>();
1419internal TypeUsage GetTypeUsageWithNullFacets(EdmType edmType)
1422TypeUsage result;
1429result = TypeUsage.Create(edmType, FacetValues.NullFacetValues);
1441internal TypeUsage GetCollectionTypeUsageWithNullFacets(EdmType edmType)
1444TypeUsage result;
1451TypeUsage elementTypeUsage = GetTypeUsageWithNullFacets(edmType);
1452result = TypeUsage.Create(new CollectionType(elementTypeUsage), FacetValues.NullFacetValues);
System\Data\Metadata\Edm\MetadataItem_Static.cs (32)
315TypeUsage stringTypeUsage = TypeUsage.Create(EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.String));
316TypeUsage booleanTypeUsage = TypeUsage.Create(EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Boolean));
317TypeUsage edmTypeUsage = TypeUsage.Create(MetadataItem.GetBuiltInType(BuiltInTypeKind.EdmType));
318TypeUsage typeUsageTypeUsage = TypeUsage.Create(MetadataItem.GetBuiltInType(BuiltInTypeKind.TypeUsage));
319TypeUsage complexTypeUsage = TypeUsage.Create(MetadataItem.GetBuiltInType(BuiltInTypeKind.ComplexType));
328new EdmProperty[] { new EdmProperty(EdmConstants.ItemAttributes, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.MetadataProperty).GetCollectionType())),
329new EdmProperty(EdmConstants.Documentation, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.Documentation))) });
332new EdmProperty[] { new EdmProperty(EdmConstants.EdmType, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EdmType))),
333new EdmProperty(EdmConstants.Facets, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.Facet)))});
350new EdmProperty[] { new EdmProperty(EdmConstants.EntityType, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EntityType))) });
354new EdmProperty(EdmConstants.TypeUsage, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.TypeUsage))) });
366new EdmProperty(EdmConstants.RelationshipMultiplicity, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EnumType))) });
372new EdmProperty[] { new EdmProperty(EdmConstants.ToRole, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.RelationshipEndMember))),
373new EdmProperty(EdmConstants.FromRole, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.RelationshipEndMember))),
374new EdmProperty(EdmConstants.ToProperties, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EdmProperty).GetCollectionType())),
375new EdmProperty(EdmConstants.FromProperties, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EdmProperty).GetCollectionType())) } );
379new EdmProperty[] { new EdmProperty(EdmConstants.Members, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EdmMember))) });
382new EdmProperty[] { new EdmProperty(EdmConstants.KeyMembers, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EdmMember))) });
387new EdmProperty(EdmConstants.Value, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EdmType))) });
391new EdmProperty(EdmConstants.EntitySets, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EntitySet))) });
395new EdmProperty(EdmConstants.EntityType, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EntityType))),
401new EdmProperty[] { new EdmProperty(EdmConstants.AssociationSetEnds, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.AssociationSetEnd).GetCollectionType()))});
405new EdmProperty(EdmConstants.EntitySetType, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EntitySet))) } );
409new EdmProperty(EdmConstants.Mode, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.EnumType))),
410new EdmProperty(EdmConstants.TypeUsage, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.TypeUsage))) });
415new EdmProperty(EdmConstants.ReturnParameter, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.FunctionParameter))),
416new EdmProperty(EdmConstants.Parameters, TypeUsage.Create(GetBuiltInType(BuiltInTypeKind.FunctionParameter).GetCollectionType())) });
System\Data\Metadata\Edm\TypeUsage.cs (50)
64internal static TypeUsage Create(EdmType edmType)
74internal static TypeUsage Create(EdmType edmType, FacetValues values)
86internal static TypeUsage Create(EdmType edmType, IEnumerable<Facet> facets)
91internal TypeUsage ShallowCopy(FacetValues facetValues)
93return TypeUsage.Create(_edmType, OverrideFacetValues(Facets, facetValues));
103public static TypeUsage CreateDefaultTypeUsage(EdmType edmType)
107TypeUsage type = TypeUsage.Create(edmType);
119public static TypeUsage CreateStringTypeUsage(PrimitiveType primitiveType,
133TypeUsage typeUsage = TypeUsage.Create(primitiveType,
148public static TypeUsage CreateStringTypeUsage(PrimitiveType primitiveType,
158TypeUsage typeUsage = TypeUsage.Create(primitiveType,
159new FacetValues{ MaxLength = TypeUsage.DefaultMaxLengthFacetValue,
173public static TypeUsage CreateBinaryTypeUsage(PrimitiveType primitiveType,
186TypeUsage typeUsage = TypeUsage.Create(primitiveType,
199public static TypeUsage CreateBinaryTypeUsage(PrimitiveType primitiveType, bool isFixedLength)
207TypeUsage typeUsage = TypeUsage.Create(primitiveType,
208new FacetValues{MaxLength = TypeUsage.DefaultMaxLengthFacetValue,
220public static TypeUsage CreateDateTimeTypeUsage(PrimitiveType primitiveType,
229TypeUsage typeUsage = TypeUsage.Create(primitiveType,
241public static TypeUsage CreateDateTimeOffsetTypeUsage(PrimitiveType primitiveType,
251TypeUsage typeUsage = TypeUsage.Create(primitiveType,
263public static TypeUsage CreateTimeTypeUsage(PrimitiveType primitiveType,
272TypeUsage typeUsage = TypeUsage.Create(primitiveType,
287public static TypeUsage CreateDecimalTypeUsage(PrimitiveType primitiveType,
298TypeUsage typeUsage = TypeUsage.Create(primitiveType,
309public static TypeUsage CreateDecimalTypeUsage(PrimitiveType primitiveType)
317TypeUsage typeUsage = TypeUsage.Create(primitiveType,
318new FacetValues{ Precision = TypeUsage.DefaultPrecisionFacetValue, Scale = TypeUsage.DefaultScaleFacetValue });
325private TypeUsage _modelTypeUsage;
398internal TypeUsage GetModelTypeUsage()
410TypeUsage result;
418TypeUsage newTypeUsage = sspaceProperty.TypeUsage.GetModelTypeUsage();
422result = TypeUsage.Create(edmRowType, this.Facets);
427TypeUsage newTypeUsage = sspaceCollectionType.TypeUsage.GetModelTypeUsage();
428result = TypeUsage.Create(new CollectionType(newTypeUsage), this.Facets);
446result = TypeUsage.Create(result.EdmType,
470public bool IsSubtypeOf(TypeUsage typeUsage)
609TypeUsage other = (TypeUsage)item;
System\Data\Metadata\TypeHelpers.cs (74)
34internal static void AssertEdmType(TypeUsage typeUsage)
84internal static bool IsValidSortOpKeyType(TypeUsage typeUsage)
109internal static bool IsValidGroupKeyType(TypeUsage typeUsage)
119internal static bool IsValidDistinctOpType(TypeUsage typeUsage)
129internal static bool IsSetComparableOpType(TypeUsage typeUsage)
158internal static bool IsValidIsNullOpType(TypeUsage typeUsage)
166internal static bool IsValidInOpType(TypeUsage typeUsage)
173internal static TypeUsage GetCommonTypeUsage(TypeUsage typeUsage1, TypeUsage typeUsage2)
178internal static TypeUsage GetCommonTypeUsage(IEnumerable<TypeUsage> types)
180TypeUsage commonType = null;
181foreach (TypeUsage testType in types)
211internal static bool TryGetClosestPromotableType(TypeUsage fromType, out TypeUsage promotableType)
221promotableType = TypeUsage.Create(promotableTypes[index + 1]);
235internal static bool TryGetBooleanFacetValue(TypeUsage type, string facetName, out bool boolValue)
248internal static bool TryGetByteFacetValue(TypeUsage type, string facetName, out byte byteValue)
261internal static bool TryGetIntFacetValue(TypeUsage type, string facetName, out int intValue)
274internal static bool TryGetIsFixedLength(TypeUsage type, out bool isFixedLength)
287internal static bool TryGetIsUnicode(TypeUsage type, out bool isUnicode)
298internal static bool IsFacetValueConstant(TypeUsage type, string facetName)
304internal static bool TryGetMaxLength(TypeUsage type, out int maxLength)
317internal static bool TryGetPrecision(TypeUsage type, out byte precision)
328internal static bool TryGetScale(TypeUsage type, out byte scale)
339internal static bool TryGetPrimitiveTypeKind(TypeUsage type, out PrimitiveTypeKind typeKind)
357internal static CollectionType CreateCollectionType(TypeUsage elementType)
362internal static TypeUsage CreateCollectionTypeUsage(TypeUsage elementType)
367internal static TypeUsage CreateCollectionTypeUsage(TypeUsage elementType, bool readOnly)
369return TypeUsage.Create(new CollectionType(elementType));
372internal static RowType CreateRowType(IEnumerable<KeyValuePair<string, TypeUsage>> columns)
377internal static RowType CreateRowType(IEnumerable<KeyValuePair<string, TypeUsage>> columns, InitializerMetadata initializerMetadata)
380foreach (KeyValuePair<string, TypeUsage> kvp in columns)
387internal static TypeUsage CreateRowTypeUsage(IEnumerable<KeyValuePair<string, TypeUsage>> columns, bool readOnly)
389return TypeUsage.Create(CreateRowType(columns));
397internal static TypeUsage CreateReferenceTypeUsage(EntityType entityType)
399return TypeUsage.Create(CreateReferenceType(entityType));
415List<KeyValuePair<string, TypeUsage>> resultCols = new List<KeyValuePair<string, TypeUsage>>();
420resultCols.Add(new KeyValuePair<string, TypeUsage>(keyProperty.Name, Helper.GetModelTypeUsage(keyProperty)));
442internal static TypeUsage GetPrimitiveTypeUsageForScalar(TypeUsage scalarType)
457internal static TypeUsage CreateEnumUnderlyingTypeUsage(TypeUsage enumTypeUsage)
462return TypeUsage.Create(Helper.GetUnderlyingEdmTypeForEnumType(enumTypeUsage.EdmType), enumTypeUsage.Facets);
470internal static TypeUsage CreateSpatialUnionTypeUsage(TypeUsage spatialTypeUsage)
474return TypeUsage.Create(Helper.GetSpatialNormalizedPrimitiveType(spatialTypeUsage.EdmType), spatialTypeUsage.Facets);
489internal static IBaseList<EdmMember> GetAllStructuralMembers(TypeUsage type)
517internal static IEnumerable GetDeclaredStructuralMembers(TypeUsage type)
547internal static ReadOnlyMetadataCollection<EdmProperty> GetProperties(TypeUsage typeUsage)
567internal static TypeUsage GetElementTypeUsage(TypeUsage type)
575return TypeUsage.Create(((RefType)type.EdmType).ElementType);
588var expectedElementTypeUsage = ((CollectionType)tvf.ReturnParameter.TypeUsage.EdmType).TypeUsage;
600internal static bool TryGetCollectionElementType(TypeUsage type, out TypeUsage elementType)
620internal static bool TryGetRefEntityType(TypeUsage type, out EntityType referencedEntityType)
634internal static TEdmType GetEdmType<TEdmType>(TypeUsage typeUsage)
640internal static bool TryGetEdmType<TEdmType>(TypeUsage typeUsage, out TEdmType type)
652internal static TypeUsage GetReadOnlyType(TypeUsage type)
665internal static string GetFullName(TypeUsage type)
768internal static bool IsIntegerConstant(TypeUsage valueType, object value, long expectedValue)
811static internal TypeUsage GetLiteralTypeUsage(PrimitiveTypeKind primitiveTypeKind)
817static internal TypeUsage GetLiteralTypeUsage(PrimitiveTypeKind primitiveTypeKind, bool isUnicode)
819TypeUsage typeusage;
824typeusage = TypeUsage.Create(primitiveType,
825new FacetValues{ Unicode = isUnicode, MaxLength = TypeUsage.DefaultMaxLengthFacetValue, FixedLength = false, Nullable = false});
829typeusage = TypeUsage.Create(primitiveType,
System\Data\Metadata\TypeSemantics.cs (77)
52internal static bool IsEqual(TypeUsage type1, TypeUsage type2)
67internal static bool IsStructurallyEqual(TypeUsage fromType, TypeUsage toType)
78internal static bool IsStructurallyEqualOrPromotableTo(TypeUsage fromType, TypeUsage toType)
92return IsStructurallyEqualOrPromotableTo(TypeUsage.Create(fromType), TypeUsage.Create(toType));
101internal static bool IsSubTypeOf(TypeUsage subType, TypeUsage superType)
136internal static bool IsPromotableTo(TypeUsage fromType, TypeUsage toType)
177internal static IEnumerable<TypeUsage> FlattenType(TypeUsage type)
179Func<TypeUsage, bool> isLeaf = t => !Helper.IsTransientType(t.EdmType);
181Func<TypeUsage, IEnumerable<TypeUsage>> getImmediateSubNodes =
195return new TypeUsage[] { };
199return Common.Utils.Helpers.GetLeafNodes<TypeUsage>(type, isLeaf, getImmediateSubNodes);
215internal static bool IsCastAllowed(TypeUsage fromType, TypeUsage toType)
237internal static bool TryGetCommonType(TypeUsage type1, TypeUsage type2, out TypeUsage commonType)
258commonType = ForgetConstraints(TypeUsage.Create(commonEdmType));
272internal static TypeUsage GetCommonType(TypeUsage type1, TypeUsage type2)
274TypeUsage commonType = null;
299internal static bool IsValidPolymorphicCast(TypeUsage fromType, TypeUsage toType)
317return IsValidPolymorphicCast(TypeUsage.Create(fromEdmType), TypeUsage.Create(toEdmType));
325static internal bool IsNominalType(TypeUsage type)
337internal static bool IsCollectionType(TypeUsage type)
347internal static bool IsComplexType(TypeUsage type)
357internal static bool IsEntityType(TypeUsage type)
367internal static bool IsRelationshipType(TypeUsage type)
377internal static bool IsEnumerationType(TypeUsage type)
389internal static bool IsScalarType(TypeUsage type)
412internal static bool IsNumericType(TypeUsage type)
422internal static bool IsIntegerNumericType(TypeUsage type)
448internal static bool IsFixedPointNumericType(TypeUsage type)
464internal static bool IsFloatPointNumericType(TypeUsage type)
479internal static bool IsUnsignedNumericType(TypeUsage type)
501internal static bool IsPolymorphicType(TypeUsage type)
511internal static bool IsBooleanType(TypeUsage type)
521internal static bool IsPrimitiveType(TypeUsage type)
532internal static bool IsPrimitiveType(TypeUsage type, PrimitiveTypeKind primitiveTypeKind)
547internal static bool IsRowType(TypeUsage type)
557internal static bool IsReferenceType(TypeUsage type)
567internal static bool IsSpatialType(TypeUsage type)
577internal static bool IsStrongSpatialType(TypeUsage type)
587internal static bool IsStructuralType(TypeUsage type)
622internal static bool IsNullable(TypeUsage type)
647internal static bool IsEqualComparable(TypeUsage type)
660internal static bool IsEqualComparableTo(TypeUsage type1, TypeUsage type2)
674internal static bool IsOrderComparable(TypeUsage type)
687internal static bool IsOrderComparableTo(TypeUsage type1, TypeUsage type2)
701internal static TypeUsage ForgetConstraints(TypeUsage type)
724private static bool IsPrimitiveTypeSubTypeOf(TypeUsage fromType, TypeUsage toType)
779private static bool IsPrimitiveTypePromotableTo(TypeUsage fromType, TypeUsage toType)
848private static bool TryGetCommonPrimitiveType(TypeUsage type1, TypeUsage type2, out TypeUsage commonType)
876commonType = TypeUsage.CreateDefaultTypeUsage(superTypes[0]);
908TypeUsage commonTypeUsage = null;
945TypeUsage columnCommonTypeUsage;
984private static bool HasCommonType(TypeUsage type1, TypeUsage type2)
1033private static bool CompareTypes(TypeUsage fromType, TypeUsage toType, bool equivalenceOnly)
System\Data\Objects\ELinq\ExpressionConverter.cs (32)
480private DbExpression OfType(DbExpression argument, TypeUsage ofType)
524private TypeUsage GetCastTargetType(TypeUsage fromType, Type toClrType, Type fromClrType, bool preserveCastForDateTime)
538TypeUsage toType;
554private static TypeUsage ValidateAndAdjustCastTypes(TypeUsage toType, TypeUsage fromType, Type toClrType, Type fromClrType)
576toType = TypeUsage.CreateDecimalTypeUsage((PrimitiveType)toType.EdmType, 19, 0);
591private static bool CanOmitCast(TypeUsage fromType, TypeUsage toType, bool preserveCastForDateTime)
627private TypeUsage GetIsOrAsTargetType(TypeUsage fromType, ExpressionType operationType, Type toClrType, Type fromClrType)
632TypeUsage toType;
766TypeUsage toType = GetCastTargetType(source.ResultType, toClrType, fromClrType, true);
931TypeUsage toType = GetCastTargetType(cqt.ResultType, toClrType, fromClrType, false);
946TypeUsage typeUsage;
974private static bool TypeUsageEquals(TypeUsage left, TypeUsage right)
1003private TypeUsage GetValueLayerType(Type linqType)
1005TypeUsage type;
1014private bool TryGetValueLayerType(Type linqType, out TypeUsage type)
1038TypeUsage elementTypeUsage;
1070private static void VerifyTypeSupportedForComparison(Type clrType, TypeUsage edmType, Stack<EdmMember> memberPath)
1184TypeUsage leftType = left.ResultType;
1185TypeUsage rightType = right.ResultType;
1188TypeUsage commonType;
1472List<TypeUsage> translatedArgumentTypes = new List<TypeUsage>(translatedArguments.Length);
1489private EdmFunction FindCanonicalFunction(string functionName, IList<TypeUsage> argumentTypes, bool isGroupAggregateFunction, Expression Expression)
1503private EdmFunction FindFunction(string namespaceName, string functionName, IList<TypeUsage> argumentTypes, bool isGroupAggregateFunction, Expression Expression)
1583TypeUsage typeUsage = TypeUsage.Create(rowType);
System\Data\Objects\ELinq\MethodCallTranslator.cs (37)
728private DbExpression ValidateReturnType(DbExpression result, TypeUsage actualReturnType, ExpressionConverter parent, MethodCallExpression call, Type clrReturnType, bool isElementOfCollection)
771TypeUsage toType = parent.GetCastTargetType(actualReturnType, clrReturnType, null, false);
780TypeUsage expectedReturnType = parent.GetValueLayerType(clrReturnType);
893TypeUsage updatedType = argument.ResultType.ShallowCopy(new FacetValues { Unicode = _isUnicode });
1618var resultType = TypeUsage.Create(TypeHelpers.CreateRowType(
1619new List<KeyValuePair<string, TypeUsage>>()
1621new KeyValuePair<string, TypeUsage>(outerBinding.VariableName, outerBinding.VariableType),
1622new KeyValuePair<string, TypeUsage>(innerBinding.VariableName, innerBinding.VariableType)
1626return new DbJoinExpression(DbExpressionKind.InnerJoin, TypeUsage.Create(TypeHelpers.CreateCollectionType(resultType)), outerBinding, innerBinding, joinCondition);
1770TypeUsage returnType = GetReturnType(parent, call);
1786protected virtual TypeUsage GetReturnType(ExpressionConverter parent, MethodCallExpression call)
1796TypeUsage returnType)
1810TypeUsage returnType)
1821TypeUsage argumentType)
1823List<TypeUsage> argTypes = new List<TypeUsage>(1);
1861protected override TypeUsage GetReturnType(ExpressionConverter parent, MethodCallExpression call)
1866var returnType = base.GetReturnType(parent, call);
1871TypeUsage.Create(Helper.GetUnderlyingEdmTypeForEnumType(returnType.EdmType), returnType.Facets) :
1904protected override TypeUsage GetReturnType(ExpressionConverter parent, MethodCallExpression call)
1909var returnType = base.GetReturnType(parent, call);
1914TypeUsage.Create(Helper.GetUnderlyingEdmTypeForEnumType(returnType.EdmType), returnType.Facets) :
1978protected override CqtExpression WrapCollectionOperand(ExpressionConverter parent, CqtExpression operand, TypeUsage returnType)
1985protected override CqtExpression WrapNonCollectionOperand(ExpressionConverter parent, CqtExpression operand, TypeUsage returnType)
1996TypeUsage argumentType)
2000TypeUsage intTypeUsage = TypeUsage.CreateDefaultTypeUsage(EdmProviderManifest.Instance.GetPrimitiveType(PrimitiveTypeKind.Int32));
2065TypeUsage modelType;
2540var resultType = TypeUsage.Create(TypeHelpers.CreateRowType(
2541new List<KeyValuePair<string, TypeUsage>>()
2543new KeyValuePair<string, TypeUsage>(newInput.VariableName, newInput.VariableType),
2544new KeyValuePair<string, TypeUsage>(newApply.VariableName, newApply.VariableType)
2548return new DbApplyExpression(DbExpressionKind.OuterApply, TypeUsage.Create(TypeHelpers.CreateCollectionType(resultType)), newInput, newApply);
2794TypeUsage rowTypeUsage = TypeUsage.Create(rowType);
System\Data\Objects\ObjectResult_TResultType.cs (4)
37private readonly TypeUsage _resultItemType;
43internal ObjectResult(Shaper<T> shaper, EntitySet singleEntitySet, TypeUsage resultItemType)
48internal ObjectResult(Shaper<T> shaper, EntitySet singleEntitySet, TypeUsage resultItemType, bool readerOwned)
53internal ObjectResult(Shaper<T> shaper, EntitySet singleEntitySet, TypeUsage resultItemType, bool readerOwned, NextResultGenerator nextResultGenerator, Action<object, EventArgs> onReaderDispose)
System\Data\Query\InternalTrees\ColumnMap.cs (17)
74private md.TypeUsage m_type; // column datatype
89internal ColumnMap(md.TypeUsage type, string name)
99internal md.TypeUsage Type { get { return m_type; } }
156internal SimpleColumnMap(md.TypeUsage type, string name)
178internal ScalarColumnMap(md.TypeUsage type, string name, int commandId, int columnPos)
245internal StructuredColumnMap(md.TypeUsage type, string name, ColumnMap[] properties)
295internal RecordColumnMap(md.TypeUsage type, string name, ColumnMap[] properties, SimpleColumnMap nullSentinel)
344internal TypedColumnMap(md.TypeUsage type, string name, ColumnMap[] properties)
365internal SimplePolymorphicColumnMap(md.TypeUsage type,
448internal MultipleDiscriminatorPolymorphicColumnMap(md.TypeUsage type,
536internal ComplexTypeColumnMap(md.TypeUsage type, string name, ColumnMap[] properties, SimpleColumnMap nullSentinel)
598internal EntityColumnMap(md.TypeUsage type, string name, ColumnMap[] properties, EntityIdentity entityIdentity)
659internal RefColumnMap(md.TypeUsage type, string name,
721internal CollectionColumnMap(md.TypeUsage type, string name, ColumnMap elementMap, SimpleColumnMap[] keys, SimpleColumnMap[] foreignKeys)
769internal SimpleCollectionColumnMap(md.TypeUsage type, string name,
822internal DiscriminatedCollectionColumnMap(md.TypeUsage type, string name,
1049internal VarRefColumnMap(md.TypeUsage type, string name, InternalTrees.Var v)
System\Data\Query\InternalTrees\ColumnMapFactory.cs (9)
73MultipleDiscriminatorPolymorphicColumnMap polymorphicMap = new MultipleDiscriminatorPolymorphicColumnMap(TypeUsage.Create(baseStructuralType), baseStructuralType.Name, baseTypeColumnMaps, discriminatorColumns, typeChoices, (object[] discriminatorValues) => mapping.Discriminate(discriminatorValues, resultSetIndex));
97elementColumnMap = new RecordColumnMap(TypeUsage.Create(edmType), edmType.Name, propertyColumnMaps, null);
101elementColumnMap = new ComplexTypeColumnMap(TypeUsage.Create(edmType), edmType.Name, propertyColumnMaps, null);
109elementColumnMap = new ScalarColumnMap(TypeUsage.Create(edmType), edmType.Name, 0, 0);
161new EdmProperty(prop.Name, TypeUsage.Create(modelType))));
198RecordColumnMap rowMap = new RecordColumnMap(TypeUsage.Create(rowType),
256EntityColumnMap result = new EntityColumnMap(TypeUsage.Create(edmType), edmType.Name, propertyColumnMaps, entityIdentity);
297TypeUsage discriminatorTypeUsage =
298TypeUsage.Create(discriminatorType);
System\Data\Query\InternalTrees\Command.cs (47)
35private TypeUsage m_boolType;
36private TypeUsage m_intType;
37private TypeUsage m_stringType;
116internal TypeUsage BooleanType
124internal TypeUsage IntegerType
132internal TypeUsage StringType
143private bool TryGetPrimitiveType(PrimitiveTypeKind modelType, out TypeUsage type)
149type = TypeUsage.CreateStringTypeUsage(m_metadataWorkspace.GetModelPrimitiveType(modelType),
307internal static TableMD CreateTableDefinition(TypeUsage elementType)
320return new TableMD(TypeUsage.Create(extent.ElementType), extent);
410TypeUsage parameterType)
432private ParameterVar ReplaceParameterVar(ParameterVar oldVar, Func<TypeUsage, TypeUsage> generateReplacementType)
495internal ComputedVar CreateComputedVar(TypeUsage type)
507internal SetOpVar CreateSetOpVar(TypeUsage type)
607internal ConstantBaseOp CreateConstantOp(TypeUsage type, object value)
634internal InternalConstantOp CreateInternalConstantOp(TypeUsage type, object value)
654internal NullOp CreateNullOp(TypeUsage type)
701internal TreatOp CreateTreatOp(TypeUsage type)
711internal TreatOp CreateFakeTreatOp(TypeUsage type)
721internal IsOfOp CreateIsOfOp(TypeUsage isOfType)
730internal IsOfOp CreateIsOfOnlyOp(TypeUsage isOfType)
740internal CastOp CreateCastOp(TypeUsage type)
752internal SoftCastOp CreateSoftCastOp(TypeUsage type)
791internal CaseOp CreateCaseOp(TypeUsage type)
812internal NewInstanceOp CreateNewInstanceOp(TypeUsage type)
820internal NewEntityOp CreateScopedNewEntityOp(TypeUsage type, List<RelProperty> relProperties, EntitySet entitySet)
828internal NewEntityOp CreateNewEntityOp(TypeUsage type, List<RelProperty> relProperties)
841internal DiscriminatedNewEntityOp CreateDiscriminatedNewEntityOp(TypeUsage type, ExplicitDiscriminatorMap discriminatorMap,
852internal NewMultisetOp CreateNewMultisetOp(TypeUsage type)
862internal NewRecordOp CreateNewRecordOp(TypeUsage type)
874return new NewRecordOp(TypeUsage.Create(type));
886internal NewRecordOp CreateNewRecordOp(TypeUsage type,
907internal ArithmeticOp CreateArithmeticOp(OpType opType, TypeUsage type)
952internal RefOp CreateRefOp(EntitySet entitySet, TypeUsage type)
970internal ElementOp CreateElementOp(TypeUsage type)
980internal GetEntityRefOp CreateGetEntityRefOp(TypeUsage type)
989internal GetRefKeyOp CreateGetRefKeyOp(TypeUsage type)
999internal CollectOp CreateCollectOp(TypeUsage type)
1009internal DerefOp CreateDerefOp(TypeUsage type)
1020internal NavigateOp CreateNavigateOp(TypeUsage type, RelProperty relProperty)
1566internal static bool EqualTypes(TypeUsage x, TypeUsage y)
1738internal void BuildOfTypeTree(Node inputNode, Var inputVar, TypeUsage desiredType, bool includeSubtypes,
1756internal Node BuildFakeTreatProject(Node inputNode, Var inputVar, TypeUsage desiredType, out Var resultVar)
1776TypeUsage commonType = TypeHelpers.GetCommonTypeUsage(arg0.Op.Type, arg1.Op.Type);
1800TypeUsage collectOpType = TypeHelpers.CreateCollectionTypeUsage(relOpVar.Type);
System\Data\Query\InternalTrees\ScalarOps.cs (35)
31protected ConstantBaseOp(OpType opType, TypeUsage type, object value)
82internal ConstantOp(TypeUsage type, object value)
122internal NullOp(TypeUsage type)
162internal InternalConstantOp(TypeUsage type, object value)
204internal NullSentinelOp(TypeUsage type, object value)
243internal ConstantPredicateOp(TypeUsage type, bool value)
427internal PropertyOp(TypeUsage type, EdmMember property)
481internal TreatOp(TypeUsage type, bool isFake)
530private TypeUsage m_isOfType;
535internal IsOfOp(TypeUsage isOfType, bool isOfOnly, TypeUsage type)
558internal TypeUsage IsOfType { get { return m_isOfType; } }
587internal CastOp(TypeUsage type) : base(OpType.Cast, type) { }
633internal SoftCastOp(TypeUsage type) : base(OpType.SoftCast, type) { }
673internal ComparisonOp(OpType opType, TypeUsage type)
716internal LikeOp(TypeUsage boolType)
759internal ConditionalOp(OpType optype, TypeUsage type) : base(optype, type)
799internal CaseOp(TypeUsage type) : base(OpType.Case, type) { }
894internal CollectOp(TypeUsage type) : base(OpType.Collect, type) { }
941internal RelPropertyOp(TypeUsage type, RelProperty property)
996internal NewEntityBaseOp(OpType opType, TypeUsage type, bool scoped, EntitySet entitySet, List<RelProperty> relProperties)
1036internal NewEntityOp(TypeUsage type, List<RelProperty> relProperties, bool scoped, EntitySet entitySet)
1073internal NewInstanceOp(TypeUsage type) : base(OpType.NewInstance, type)
1116internal DiscriminatedNewEntityOp(TypeUsage type, ExplicitDiscriminatorMap discriminatorMap,
1159internal NewRecordOp(TypeUsage type) : base(OpType.NewRecord, type)
1171internal NewRecordOp(TypeUsage type, List<EdmProperty> fields)
1244internal NewMultisetOp(TypeUsage type) : base(OpType.NewMultiset, type) { }
1279internal ArithmeticOp(OpType opType, TypeUsage type)
1314internal RefOp(EntitySet entitySet, TypeUsage type)
1363internal ExistsOp(TypeUsage type)
1406internal ElementOp(TypeUsage type) : base(OpType.Element, type) { }
1446internal GetRefKeyOp(TypeUsage type) : base(OpType.GetRefKey, type) { }
1486internal GetEntityRefOp(TypeUsage type) : base(OpType.GetEntityRef, type) { }
1526internal DerefOp(TypeUsage type) : base(OpType.Deref, type) { }
1570internal NavigateOp(TypeUsage type, RelProperty relProperty)
System\Data\Query\InternalTrees\Vars.cs (6)
58TypeUsage m_type;
60internal Var(int id, VarType varType, TypeUsage type)
80internal TypeUsage Type { get { return m_type; } }
110internal ParameterVar(int id, TypeUsage type, string paramName)
181internal ComputedVar(int id, TypeUsage type) : base(id, VarType.Computed, type)
191internal SetOpVar(int id, TypeUsage type) : base(id, VarType.SetOp, type) { }
System\Data\Query\PlanCompiler\ITreeGenerator.cs (18)
284foreach (KeyValuePair<string, TypeUsage> paramInfo in ctree.Parameters)
331private static bool ValidateParameterType(TypeUsage paramType)
339private static RowType ExtractElementRowType(TypeUsage typeUsage)
508private Node ConvertRelOpToScalarOpTree(Node node, TypeUsage resultType)
1128private Node BuildSoftCast(Node node, TypeUsage targetType)
1184return BuildSoftCast(node, TypeUsage.Create(targetType));
1187private Node BuildEntityRef(Node arg, TypeUsage entityType)
1189TypeUsage refType = TypeHelpers.CreateReferenceTypeUsage((EntityType)entityType.EdmType);
1315TypeUsage commonType = TypeHelpers.GetCommonTypeUsage(e.Left.ResultType, e.Right.ResultType);
1718private readonly TypeUsage requiredType;
1743private IsOfFilter(TypeUsage required, bool exact)
1749private IsOfFilter Merge(TypeUsage otherRequiredType, bool otherIsExact)
1807TypeUsage isOfOnlyType = (this.isExact ? this.requiredType : otherRequiredType);
1808TypeUsage isOfType = (this.isExact ? otherRequiredType : this.requiredType);
1846internal IEnumerable<KeyValuePair<TypeUsage, bool>> ToEnumerable()
1851yield return new KeyValuePair<TypeUsage, bool>(currentFilter.requiredType, currentFilter.isExact);
2085TypeUsage elementTypeUsage = resultType.TypeUsage;
2669private Node ProcessGroupAggregate(List<Node> keyVarDefNodes, Node copyOfInput, List<Node> copyOfkeyVarDefNodes, VarVec copyKeyVarSet, TypeUsage inputResultType, out Var groupAggVar)
System\Data\Query\PlanCompiler\PreProcessor.cs (20)
123private readonly HashSet<TypeUsage> m_referencedTypes = new HashSet<TypeUsage>();
226private void AddTypeReference(TypeUsage type)
272private List<EntitySet> GetEntitySets(TypeUsage entityType)
574private Node BuildOfTypeTable(EntitySetBase entitySet, TypeUsage ofType, out Var resultVar)
625TypeUsage entityType = derefOp.Type;
753Node sourceEntityNode, TypeUsage resultType)
842TypeUsage entityType = TypeHelpers.GetElementTypeUsage(relProperty.ToEnd.TypeUsage);
973Node sourceEntityNode, TypeUsage resultType)
1250TypeUsage resultType = navProperty.ToEndMember.TypeUsage;
1257resultType = TypeUsage.Create(resultType.EdmType.GetCollectionType());
1607List<KeyValuePair<string, TypeUsage>> keyFieldTypes = new List<KeyValuePair<string, TypeUsage>>();
1613keyFieldTypes.Add(new KeyValuePair<string, TypeUsage>(k.Name, k.TypeUsage));
1615TypeUsage keyExprType = TypeHelpers.CreateRowTypeUsage(keyFieldTypes, true);
1844AddTypeReference(TypeUsage.Create(entityType));
2079TypeUsage elementType = TypeUsage.Create(op.Table.TableMetadata.Extent.ElementType);
2426private static void AddTypeNeedingNullSentinel(HashSet<string> typesNeedingNullSentinel, TypeUsage typeUsage)
2451internal static void MarkAsNeedingNullSentinel(HashSet<string> typesNeedingNullSentinel, TypeUsage typeUsage)
System\Data\Query\PlanCompiler\StructuredTypeInfo.cs (29)
95private md.TypeUsage m_stringType;
96private md.TypeUsage m_intType;
97private Dictionary<md.TypeUsage, TypeInfo> m_typeInfoMap;
121m_typeInfoMap = new Dictionary<md.TypeUsage, TypeInfo>(TypeUsageEqualityComparer.Instance);
142HashSet<md.TypeUsage> referencedTypes,
164HashSet<md.TypeUsage> referencedTypes,
255internal TypeInfo GetTypeInfo(md.TypeUsage type)
397private void ProcessTypes(HashSet<md.TypeUsage> referencedTypes)
413private void PopulateTypeInfoMap(HashSet<md.TypeUsage> referencedTypes)
415foreach (md.TypeUsage t in referencedTypes)
466private void CreateTypeInfoForType(md.TypeUsage type)
496private TypeInfo CreateTypeInfoForStructuredType(md.TypeUsage type, ExplicitDiscriminatorMap discriminatorMap)
515superTypeInfo = CreateTypeInfoForStructuredType(md.TypeUsage.Create(type.EdmType.BaseType), discriminatorMap);
525md.TypeUsage baseRefType = TypeHelpers.CreateReferenceTypeUsage(entityType.BaseType as md.EntityType);
574foreach (KeyValuePair<md.TypeUsage, TypeInfo> kv in m_typeInfoMap)
695foreach (KeyValuePair<md.TypeUsage, TypeInfo> kv in m_typeInfoMap)
712private TypeInfo ExplodeType(md.TypeUsage type)
723md.TypeUsage elementType = TypeHelpers.GetEdmType<md.CollectionType>(type).TypeUsage;
961List<KeyValuePair<string, md.TypeUsage>> fieldList = new List<KeyValuePair<string, md.TypeUsage>>();
989md.TypeUsage propertyType = GetPropertyType(type, p);
990fieldList.Add(new KeyValuePair<string, md.TypeUsage>(fieldName, propertyType));
1019private md.TypeUsage GetNewType(md.TypeUsage type)
1026md.TypeUsage elementType;
1029md.TypeUsage newElementType = GetNewType(elementType);
1065private md.TypeUsage GetPropertyType(RootTypeInfo typeInfo, PropertyRef p)
1067md.TypeUsage result = null;
1086md.TypeUsage innerType = ((SimplePropertyRef)innerProperty).Property.TypeUsage;
System\Data\SqlClient\SqlGen\SqlGenerator.cs (20)
354private TypeUsage integerType = null;
355internal TypeUsage IntegerType
374defaultStringTypeName = GetSqlPrimitiveType(TypeUsage.CreateStringTypeUsage(this.metadataWorkspace.GetModelPrimitiveType(PrimitiveTypeKind.String), isUnicode: true, isFixedLength: false));
883TypeUsage type = argument.ResultType;
908TypeUsage resultType = e.ResultType;
1184TypeUsage inputType = TypeHelpers.GetElementTypeUsage(e.Argument.ResultType);
1700TypeUsage inputType = TypeHelpers.GetElementTypeUsage(e.Argument.ResultType);
1836TypeUsage type = e.ResultType;
2843string inputVarName, TypeUsage inputVarType, out Symbol fromSymbol)
2923TypeUsage inputType = TypeHelpers.GetElementTypeUsage(elementExpr.Argument.ResultType);
3712/// <see cref="CreateNewSelectStatement(SqlSelectStatement, string, TypeUsage, bool, out Symbol)"/>
3720string inputVarName, TypeUsage inputVarType, out Symbol fromSymbol)
3747string inputVarName, TypeUsage inputVarType, bool finalizeOldStatement, out Symbol fromSymbol)
3814private string GetSqlPrimitiveType(TypeUsage type)
3818TypeUsage storeTypeUsage = this._storeItemCollection.StoreProviderManifest.GetStoreType(type);
3822internal static string GenerateSqlForStoreType(SqlVersion sqlVersion, TypeUsage storeTypeUsage)
4097TypeUsage type = null;
4223private TypeUsage GetPrimitiveType(PrimitiveTypeKind modelType)
4225TypeUsage type = null;
4230type = TypeUsage.CreateDefaultTypeUsage(mappedType);
System\Data\SqlClient\SqlProviderManifest.cs (48)
340public override TypeUsage GetEdmType(TypeUsage storeType)
342EntityUtil.CheckArgumentNull<TypeUsage>(storeType, "storeType");
370return TypeUsage.CreateDefaultTypeUsage(edmPrimitiveType);
438return TypeUsage.CreateBinaryTypeUsage(edmPrimitiveType, true, 8);
442return TypeUsage.CreateDefaultTypeUsage(edmPrimitiveType);
451return TypeUsage.CreateDecimalTypeUsage(edmPrimitiveType, precision, scale);
455return TypeUsage.CreateDecimalTypeUsage(edmPrimitiveType);
460return TypeUsage.CreateDecimalTypeUsage(edmPrimitiveType, 19, 4);
463return TypeUsage.CreateDecimalTypeUsage(edmPrimitiveType, 10, 4);
468return TypeUsage.CreateDateTimeTypeUsage(edmPrimitiveType, null);
470return TypeUsage.CreateDefaultTypeUsage(edmPrimitiveType);
472return TypeUsage.CreateTimeTypeUsage(edmPrimitiveType, null);
474return TypeUsage.CreateDateTimeOffsetTypeUsage(edmPrimitiveType, null);
487return TypeUsage.CreateStringTypeUsage(edmPrimitiveType, isUnicode, isFixedLen, maxLength);
491return TypeUsage.CreateStringTypeUsage(edmPrimitiveType, isUnicode, isFixedLen);
496return TypeUsage.CreateBinaryTypeUsage(edmPrimitiveType, isFixedLen, maxLength);
500return TypeUsage.CreateBinaryTypeUsage(edmPrimitiveType, isFixedLen);
513public override TypeUsage GetStoreType(TypeUsage edmType)
515EntityUtil.CheckArgumentNull<TypeUsage>(edmType, "edmType");
529return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["bit"]);
532return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["tinyint"]);
535return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["smallint"]);
538return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["int"]);
541return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["bigint"]);
564return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["uniqueidentifier"]);
567return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["float"]);
570return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["real"]);
585TypeUsage tu = TypeUsage.CreateDecimalTypeUsage(StoreTypeNameToStorePrimitiveType["decimal"], precision, scale);
596TypeUsage tu;
599tu = TypeUsage.CreateBinaryTypeUsage(StoreTypeNameToStorePrimitiveType["binary"], true, (isMaxLength ? binaryMaxSize : maxLength));
608tu = TypeUsage.CreateBinaryTypeUsage(StoreTypeNameToStorePrimitiveType["varbinary(max)"], false);
613tu = TypeUsage.CreateBinaryTypeUsage(StoreTypeNameToStorePrimitiveType["varbinary"], false, binaryMaxSize);
618tu = TypeUsage.CreateBinaryTypeUsage(StoreTypeNameToStorePrimitiveType["varbinary"], false, maxLength);
635TypeUsage tu;
641tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["nchar"], true, true, (isMaxLength ? nvarcharMaxSize : maxLength));
650tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["nvarchar(max)"], true, false);
656tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["nvarchar"], true, false, nvarcharMaxSize);
661tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["nvarchar"], true, false, maxLength);
669tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["char"], false, true,
679tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["varchar(max)"], false, false);
685tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["varchar"], false, false, varcharMaxSize);
690tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["varchar"], false, false, maxLength);
699return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["datetime"]);
710private TypeUsage GetStorePrimitiveTypeIfPostSql9(string storeTypeName, string edmTypeIdentity, PrimitiveTypeKind primitiveTypeKind)
714return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType[storeTypeName]);
System\Data\SqlClient\SqlProviderServices.cs (11)
110foreach (KeyValuePair<string, TypeUsage> queryParameter in commandTree.Parameters) {
121TypeUsage parameterType;
153protected override void SetDbParameterValue(DbParameter parameter, TypeUsage parameterType, object value)
321internal static SqlParameter CreateSqlParameter(string name, TypeUsage type, ParameterMode mode, object value, bool preventTruncation, SqlVersion version) {
442private static SqlDbType GetSqlDbType(TypeUsage type, bool isOutParam, SqlVersion version, out int? size, out byte? precision, out byte? scale, out string udtName) {
538private static int? GetParameterSize(TypeUsage type, bool isOutParam) {
615private static byte? GetKatmaiDateTimePrecision(TypeUsage type, bool isOutParam) {
624private static byte? GetParameterPrecision(TypeUsage type, byte? defaultIfUndefined) {
638private static byte? GetScale(TypeUsage type) {
652private static SqlDbType GetStringDbType(TypeUsage type) {
686private static SqlDbType GetBinaryDbType(TypeUsage type) {