163 references to Method
System.Data.Linq (163)
SqlClient\Query\MethodCallConverter.cs (42)
47
return !call.
Method
.IsStatic && call.
Method
.Name == "CompareTo" && call.Arguments.Count == 1 && call.
Method
.ReturnType == typeof(int);
51
return call.
Method
.IsStatic && call.
Method
.Name == "Compare" && call.Arguments.Count > 1 && call.
Method
.ReturnType == typeof(int);
78
return call.
Method
.IsStatic &&
79
call.
Method
.DeclaringType.FullName == "Microsoft.VisualBasic.CompilerServices.Operators" &&
80
call.
Method
.Name == "CompareString";
88
return mc.
Method
.IsStatic &&
89
mc.
Method
.DeclaringType.FullName == "Microsoft.VisualBasic.Interaction" && mc.
Method
.Name == "IIf";
105
if (mc.
Method
.IsStatic) {
106
switch (mc.
Method
.Name) {
128
return mc.
Method
.DeclaringType == typeof(string);
132
return mc.
Method
.Name == "Equals" && mc.Arguments.Count == 1 ||
133
mc.
Method
.Name == "GetType" && mc.Arguments.Count == 0;
218
if (mc.
Method
.IsStatic) {
219
if (mc.
Method
.Name == "Equals" && mc.Arguments.Count == 2) {
220
return sql.Binary(SqlNodeType.EQ2V, mc.Arguments[0], mc.Arguments[1], mc.
Method
);
222
else if (mc.
Method
.DeclaringType == typeof(string) && mc.
Method
.Name == "Concat") {
257
switch (mc.
Method
.Name) {
259
return sql.Binary(SqlNodeType.EQ, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
261
return sql.Binary(SqlNodeType.NE, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
263
return sql.Binary(SqlNodeType.LT, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
265
return sql.Binary(SqlNodeType.LE, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
267
return sql.Binary(SqlNodeType.GT, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
269
return sql.Binary(SqlNodeType.GE, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
271
return sql.Binary(SqlNodeType.Mul, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
273
return sql.Binary(SqlNodeType.Div, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
275
return sql.Binary(SqlNodeType.Sub, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
277
return sql.Binary(SqlNodeType.Add, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
279
return sql.Binary(SqlNodeType.Mod, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
281
return sql.Binary(SqlNodeType.BitAnd, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
283
return sql.Binary(SqlNodeType.BitOr, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
285
return sql.Binary(SqlNodeType.BitXor, mc.Arguments[0], mc.Arguments[1], mc.
Method
, mc.ClrType);
287
return sql.Unary(SqlNodeType.Negate, mc.Arguments[0], mc.
Method
, mc.SourceExpression);
289
return sql.Unary(SqlNodeType.BitNot, mc.Arguments[0], mc.
Method
, mc.SourceExpression);
291
return sql.Unary(SqlNodeType.Not, mc.Arguments[0], mc.
Method
, mc.SourceExpression);
296
if (mc.
Method
.Name == "Equals" && mc.Arguments.Count == 1) {
299
else if (mc.
Method
.Name == "GetType" && mc.Arguments.Count == 0) {
SqlClient\Query\QueryConverter.cs (2)
110
throw Error.InvalidMethodExecution(((SqlMethodCall)retNode).
Method
.Name);
2670
if (mc.Arguments.Count==2 && mc.
Method
.Name=="op_Equality") {
SqlClient\Query\SqlDuplicator.cs (1)
410
return new SqlMethodCall(mc.ClrType, mc.SqlType, mc.
Method
, this.VisitExpression(mc.Object), args, mc.SourceExpression);
SqlClient\Query\SqlExpander.cs (1)
135
return factory.MethodCall(mcs[0].
Method
, mcs[0].Object, expandedArgs.ToArray(), mcs[0].SourceExpression);
SqlClient\Query\SqlFormatter.cs (3)
1384
if (mc.
Method
.IsStatic) {
1385
sb.Append(mc.
Method
.DeclaringType);
1390
sb.Append(mc.
Method
.Name);
SqlClient\Query\SqlMethodCallConverter.cs (106)
169
if(mc.
Method
.IsStatic
171
&& (mc.
Method
.Name == "op_Implicit" || mc.
Method
.Name == "op_Explicit")){
178
if (mc.
Method
.IsStatic && mc.
Method
.Name == "Compare" && mc.
Method
.ReturnType == typeof(int)) {
185
if (!mc.
Method
.IsStatic) {
186
switch (mc.
Method
.Name) {
205
if (mc.
Method
.Name == "GetValueOrDefault" && TypeSystem.IsNullableType(mc.Object.ClrType)) {
215
if (mc.
Method
.IsStatic && mc.
Method
.DeclaringType == typeof(SqlMethods)) {
216
if (mc.
Method
.Name.StartsWith("DateDiff", StringComparison.Ordinal) && mc.Arguments.Count == 2) {
218
if (mc.
Method
.Name == "DateDiff" + datePart) {
227
else if (mc.
Method
.Name == "Like") {
236
else if (mc.
Method
.Name == "RawLength") {
244
if (!mc.
Method
.IsStatic && mc.
Method
.DeclaringType == typeof(DateTime)) {
245
switch (mc.
Method
.Name) {
268
if (!mc.
Method
.IsStatic && mc.
Method
.DeclaringType == typeof(DateTimeOffset)) {
269
switch (mc.
Method
.Name) {
293
if (!mc.
Method
.IsStatic && mc.
Method
.DeclaringType == typeof(TimeSpan)) {
294
switch (mc.
Method
.Name) {
307
if (mc.
Method
.IsStatic && mc.
Method
.DeclaringType == typeof(Convert) && mc.Arguments.Count == 1) {
308
switch (mc.
Method
.Name) {
332
if (mc.
Method
.IsStatic) {
334
switch (mc.
Method
.Name) {
345
switch (mc.
Method
.Name) {
352
if (mc.
Method
.Name.StartsWith("To", StringComparison.Ordinal)) {
363
if (mc.
Method
.DeclaringType == typeof(string)) {
364
if (mc.
Method
.IsStatic) {
365
if (mc.
Method
.Name == "Concat") {
370
switch (mc.
Method
.Name) {
422
if (mc.
Method
.IsStatic && mc.
Method
.DeclaringType == typeof(Math)) {
423
switch (mc.
Method
.Name) {
484
return call.
Method
.IsStatic &&
485
call.
Method
.DeclaringType.FullName == "Microsoft.VisualBasic.CompilerServices.Operators" &&
486
call.
Method
.Name == "CompareString";
490
return mc.
Method
.IsStatic &&
491
(mc.
Method
.DeclaringType.FullName == "Microsoft.VisualBasic.CompilerServices.LikeOperator" && mc.
Method
.Name == "LikeString")
492
|| (mc.
Method
.DeclaringType.FullName == "Microsoft.VisualBasic.CompilerServices.Operators" && mc.
Method
.Name == "LikeString");
496
if (mc.
Method
.IsStatic &&
497
mc.
Method
.DeclaringType.FullName == "Microsoft.VisualBasic.CompilerServices.Conversions") {
498
switch (mc.
Method
.Name) {
899
Type declType = mc.
Method
.DeclaringType;
906
if (mc.
Method
.IsStatic) {
907
if (mc.
Method
.Name == "op_Explicit" || mc.
Method
.Name == "op_Implicit") {
912
else if (mc.
Method
.Name == "Compare" && mc.Arguments.Count == 2 && mc.
Method
.ReturnType == typeof(int)) {
949
if (mc.
Method
.Name == "Equals" && mc.Arguments.Count == 1) {
952
else if (mc.
Method
.Name == "GetValueOrDefault" && mc.
Method
.DeclaringType.IsGenericType
953
&& mc.
Method
.DeclaringType.GetGenericTypeDefinition() == typeof(Nullable<>)) {
956
else if (mc.
Method
.Name == "ToString" && mc.Arguments.Count == 0) {
990
return Error.MethodFormHasNoSupportConversionToSql(mc.
Method
.Name, mc.
Method
);
993
return Error.MethodHasNoSupportConversionToSql(mc.
Method
);
1013
string name = mc.
Method
.Name;
1016
if (mc.
Method
.Name == "DateDiff" + datePart) {
1056
if (mc.
Method
.Name == "CompareTo") {
1059
else if ((mc.
Method
.Name == "Add" && mc.Arguments.Count == 1 && mc.Arguments[0].ClrType == typeof(TimeSpan))
1060
|| (mc.
Method
.Name == "AddTicks")) {
1082
else if (mc.
Method
.Name == "AddMonths") {
1086
else if (mc.
Method
.Name == "AddYears") {
1090
else if (mc.
Method
.Name == "AddMilliseconds") {
1096
else if (mc.
Method
.Name == "AddSeconds") {
1100
else if (mc.
Method
.Name == "AddMinutes") {
1104
else if (mc.
Method
.Name == "AddHours") {
1108
else if (mc.
Method
.Name == "AddDays") {
1118
if (mc.
Method
.Name == "CompareTo") {
1121
else if ((mc.
Method
.Name == "Add" && mc.Arguments.Count == 1 && mc.Arguments[0].ClrType == typeof(TimeSpan))
1122
|| (mc.
Method
.Name == "AddTicks")) {
1141
else if (mc.
Method
.Name == "AddMonths") {
1145
else if (mc.
Method
.Name == "AddYears") {
1149
else if (mc.
Method
.Name == "AddMilliseconds") {
1155
else if (mc.
Method
.Name == "AddSeconds") {
1159
else if (mc.
Method
.Name == "AddMinutes") {
1163
else if (mc.
Method
.Name == "AddHours") {
1167
else if (mc.
Method
.Name == "AddDays") {
1177
if (mc.
Method
.Name == "Add") {
1180
else if (mc.
Method
.Name == "Subtract") {
1183
else if (mc.
Method
.Name == "CompareTo") {
1186
else if (mc.
Method
.Name == "Duration") {
1192
else if (mc.
Method
.Name == "Negate") {
1204
switch (mc.
Method
.Name) {
1393
if (mc.
Method
.IsStatic) {
1395
switch (mc.
Method
.Name) {
1408
return sql.FunctionCall(mc.
Method
.ReturnType, "ROUND", mc.Arguments, mc.SourceExpression);
1412
switch (mc.
Method
.Name) {
1418
return sql.FunctionCall(mc.
Method
.ReturnType, "ROUND",
1427
return sql.FunctionCall(mc.
Method
.ReturnType, "ROUND",
1434
if (mc.
Method
.Name.StartsWith("To", StringComparison.Ordinal)) {
1448
if (mc.
Method
.Name == "Concat") {
1479
else if ((mc.
Method
.Name == "Equals") && (mc.Arguments.Count == 2)) {
1482
else if ((mc.
Method
.Name == "Compare") && (mc.Arguments.Count == 2)) {
1502
switch (mc.
Method
.Name) {
1976
switch (mc.
Method
.Name) {
2060
return new SqlSearchedCase(mc.
Method
.ReturnType, new SqlWhen[] { new SqlWhen(aLower, b) }, a, source);
2155
return sql.FunctionCall(mc.
Method
.ReturnType, "ROUND", new SqlExpression[] { x, sql.ValueFromObject(0, false, source), sql.ValueFromObject(1, false, source) }, source);
2386
switch (mc.
Method
.Name) {
SqlClient\Query\SqlNamer.cs (1)
210
System.Reflection.ParameterInfo[] pis = mc.
Method
.GetParameters();
SqlClient\Query\SqlSupersetValidator.cs (1)
96
throw Error.MethodHasNoSupportConversionToSql(mc.
Method
.Name);
SqlClient\Reader\ObjectReaderCompiler.cs (6)
628
if (mc1.
Method
!= mc2.
Method
|| !AreSimilar(mc1.Object, mc2.Object)) {
893
ParameterInfo[] pis = mc.
Method
.GetParameters();
916
OpCode callOpCode = GetMethodCallOpCode(mc.
Method
);
920
gen.Emit(callOpCode, mc.
Method
);
922
return mc.
Method
.ReturnType;