105 references to ValueFromObject
System.Data.Linq (105)
SqlClient\Common\SqlFactory.cs (6)
144
return Binary(SqlNodeType.Add, expr,
ValueFromObject
(second, false, expr.SourceExpression));
148
return Binary(SqlNodeType.Sub, expr,
ValueFromObject
(second, false, expr.SourceExpression));
152
return Binary(SqlNodeType.Mul, expr,
ValueFromObject
(second, false, expr.SourceExpression));
156
return Binary(SqlNodeType.Div, expr,
ValueFromObject
(second, false, expr.SourceExpression));
160
return Binary(SqlNodeType.Mod, expr,
ValueFromObject
(second, false, expr.SourceExpression));
472
return
ValueFromObject
(value, false, sourceExpression);
SqlClient\Query\MethodCallConverter.cs (4)
195
new SqlWhen(lower, sql.
ValueFromObject
(-1, false, source)),
196
new SqlWhen(equal, sql.
ValueFromObject
(0, false, source)),
198
sql.
ValueFromObject
(1, false, source), source
232
return sql.
ValueFromObject
("", false, mc.SourceExpression);
SqlClient\Query\QueryConverter.cs (3)
2378
select.Top = this.sql.
ValueFromObject
(1, false, this.dominatingExpression);
2412
SqlExpression sqlExprItem = sql.
ValueFromObject
(conItem.Value, true, source);
2620
sql.Binary(SqlNodeType.GT, this.GetRowCountExpression(), sql.
ValueFromObject
(0, false, this.dominatingExpression)),
SqlClient\Query\SqlBinder.cs (15)
235
return sql.
ValueFromObject
(leftValue==rightValue, false, bo.SourceExpression);
237
return sql.
ValueFromObject
(leftValue!=rightValue, false, bo.SourceExpression);
253
return sql.
ValueFromObject
(false, false, bo.SourceExpression);
259
return sql.
ValueFromObject
(false, false, bo.SourceExpression);
262
return sql.
ValueFromObject
((bool)(vLeft.Value ?? false) && (bool)(vRight.Value ?? false), false, bo.SourceExpression);
274
return sql.
ValueFromObject
(true, false, bo.SourceExpression);
280
return sql.
ValueFromObject
(true, false, bo.SourceExpression);
283
return sql.
ValueFromObject
((bool)(vLeft.Value ?? false) || (bool)(vRight.Value ?? false), false, bo.SourceExpression);
335
return this.VisitExpression(sql.
ValueFromObject
(bo.NodeType == SqlNodeType.NE, false, bo.SourceExpression));
341
return this.VisitExpression(sql.
ValueFromObject
(
578
new [] { new SqlWhen(uo.Operand, sql.
ValueFromObject
(1, false, uo.SourceExpression)) },
579
sql.
ValueFromObject
(0, false, uo.SourceExpression),
582
return sql.Binary(SqlNodeType.EQ, c, sql.
ValueFromObject
(0, false, uo.SourceExpression));
596
return sql.
ValueFromObject
(uo.NodeType == SqlNodeType.IsNotNull, false, uo.SourceExpression);
615
return sql.
ValueFromObject
(uo.NodeType == SqlNodeType.IsNotNull, false, uo.SourceExpression);
SqlClient\Query\SqlBooleanizer.cs (2)
58
SqlExpression valueTrue = sql.
ValueFromObject
(true, false, predicateExpression.SourceExpression);
59
SqlExpression valueFalse = sql.
ValueFromObject
(false, false, predicateExpression.SourceExpression);
SqlClient\Query\SqlCaseSimplifier.cs (1)
82
values.Add(sql.
ValueFromObject
((nt==SqlNodeType.EQ || nt==SqlNodeType.EQ2V) == eq, false, sc.SourceExpression));
SqlClient\Query\SqlMethodCallConverter.cs (70)
734
SqlExpression char2 = sql.FunctionCall(typeof(void), "NCHAR", new SqlExpression[1] { sql.
ValueFromObject
(2, false, source) }, source);
735
SqlExpression char4 = sql.FunctionCall(typeof(void), "NCHAR", new SqlExpression[1] { sql.
ValueFromObject
(4, false, source) }, source);
741
SqlExpression date = sql.Concat(month, sql.
ValueFromObject
("/", false, source), day, sql.
ValueFromObject
("/", false, source), year);
742
return sql.FunctionCall(typeof(DateTime), "CONVERT", new SqlExpression[3] { datetime, date, sql.
ValueFromObject
(101, false, source) }, source);
752
SqlExpression date = sql.Concat(year, sql.
ValueFromObject
("-", false, source), month, sql.
ValueFromObject
("-", false, source), day);
753
SqlExpression time = sql.Concat(hour, sql.
ValueFromObject
(":", false, source), minute, sql.
ValueFromObject
(":", false, source), second);
754
SqlExpression dateAndTime = sql.Concat(date, sql.
ValueFromObject
(' ', false, source), time);
756
return sql.FunctionCall(typeof(DateTime), "CONVERT", new SqlExpression[3] { datetime, dateAndTime, sql.
ValueFromObject
(120, false, source) }, source);
762
sql.Add(sql.
ValueFromObject
(1000, false, source),sox.Args[6])}, source);
767
SqlExpression startIndex = sql.Binary(SqlNodeType.Sub, len, sql.
ValueFromObject
(2, false, source));
768
ms = sql.FunctionCall(typeof(string), "SUBSTRING", new SqlExpression[3] { msRaw, startIndex, sql.
ValueFromObject
(3, false, source) }, source);
771
ms = sql.FunctionCall(typeof(string), "RIGHT", new SqlExpression[2] { msRaw, sql.
ValueFromObject
(3, false, source) }, source);
773
dateAndTime = sql.Concat(dateAndTime, sql.
ValueFromObject
('.', false, source), ms);
774
return sql.FunctionCall(typeof(DateTime), "CONVERT", new SqlExpression[3] { datetime, dateAndTime, sql.
ValueFromObject
(121, false, source) }, source);
788
new SqlExpression[2] { sox.Args[0], sql.
ValueFromObject
(0, false, source) },
808
SqlExpression char2 = sql.FunctionCall(typeof(void), "NCHAR", new SqlExpression[1] { sql.
ValueFromObject
(2, false, source) }, source);
809
SqlExpression char4 = sql.FunctionCall(typeof(void), "NCHAR", new SqlExpression[1] { sql.
ValueFromObject
(4, false, source) }, source);
810
SqlExpression char5 = sql.FunctionCall(typeof(void), "NCHAR", new SqlExpression[1] { sql.
ValueFromObject
(5, false, source) }, source);
814
sql.Add(sql.
ValueFromObject
(10000, false, source),sox.Args[0])}, source);
815
SqlExpression year = sql.FunctionCall(typeof(string), "RIGHT", new SqlExpression[2] { yyRaw, sql.
ValueFromObject
(4, false, source) }, source);
823
SqlExpression date = sql.Concat(year, sql.
ValueFromObject
("-", false, source), month, sql.
ValueFromObject
("-", false, source), day);
824
SqlExpression time = sql.Concat(hour, sql.
ValueFromObject
(":", false, source), minute, sql.
ValueFromObject
(":", false, source), second);
832
dateAndTime = sql.Concat(date, sql.
ValueFromObject
(' ', false, source), time);
833
result = sql.FunctionCall(typeof(DateTimeOffset), "CONVERT", new SqlExpression[3] { datetimeoffset, dateAndTime, sql.
ValueFromObject
(120, false, source) }, source);
839
sql.Add(sql.
ValueFromObject
(1000, false, source),sox.Args[6])}, source);
840
SqlExpression ms = sql.FunctionCall(typeof(string), "RIGHT", new SqlExpression[2] { msRaw, sql.
ValueFromObject
(3, false, source) }, source);
841
dateAndTime = sql.Concat(date, sql.
ValueFromObject
(' ', false, source), time, sql.
ValueFromObject
('.', false, source), ms);
842
result = sql.FunctionCall(typeof(DateTimeOffset), "CONVERT", new SqlExpression[3] { datetimeoffset, dateAndTime, sql.
ValueFromObject
(121, false, source) }, source);
1046
new SqlWhen(lower, sql.
ValueFromObject
(-1, false, source)),
1047
new SqlWhen(equal, sql.
ValueFromObject
(0, false, source)),
1049
sql.
ValueFromObject
(1, false, source), source
1421
sql.
ValueFromObject
(0, false, mc.SourceExpression),
1422
sql.
ValueFromObject
(1, false, mc.SourceExpression)
1430
sql.
ValueFromObject
(0, false, mc.SourceExpression)
1458
returnValue = sql.
ValueFromObject
("", false, source);
1512
pattern = sql.
ValueFromObject
(patternText, true, pattern.SourceExpression);
1531
escape = sql.
ValueFromObject
("~", false, source);
1546
pattern = sql.
ValueFromObject
(patternText, true, pattern.SourceExpression);
1565
escape = sql.
ValueFromObject
("~", false, source);
1580
pattern = sql.
ValueFromObject
(patternText, true, pattern.SourceExpression);
1599
escape = sql.
ValueFromObject
("~", false, source);
1660
sql.
ValueFromObject
(1, false, source),
1689
SqlExpression notContained = sql.Binary(SqlNodeType.EQ, charIndex, sql.
ValueFromObject
(0, false, source));
1692
SqlExpression elseCase = sql.Add(sql.
ValueFromObject
(1, false, source), sql.Subtract(len1, sql.Add(len2, charIndexOfReverse)));
1694
SqlWhen whenNotContained = new SqlWhen(notContained, sql.
ValueFromObject
(-1, false, source));
1723
SqlExpression notContained = sql.Binary(SqlNodeType.EQ, charIndex, sql.
ValueFromObject
(0, false, source));
1726
SqlExpression elseCase = sql.Add(sql.
ValueFromObject
(1, false, source), sql.Subtract(len1, sql.Add(len2, charIndexOfReverse)));
1728
SqlWhen whenNotContained = new SqlWhen(notContained, sql.
ValueFromObject
(-1, false, source));
1762
SqlExpression elseCase = sql.Add(sql.
ValueFromObject
(1, false, source), sql.Subtract(len1, sql.Add(len2, charIndexOfReverse)));
1763
SqlExpression notContained = sql.Binary(SqlNodeType.EQ, charIndex, sql.
ValueFromObject
(0, false, source));
1766
SqlWhen whenNotContained = new SqlWhen(notContained, sql.
ValueFromObject
(-1, false, source));
1789
sql.
ValueFromObject
(0, false, source),
1879
sql.
ValueFromObject
("", false, source)
1890
sql.
ValueFromObject
("", false, source)
1958
sql.
ValueFromObject
(1, false, source)
2086
i = sql.
ValueFromObject
(0, false, source);
2155
return sql.FunctionCall(mc.Method.ReturnType, "ROUND", new SqlExpression[] { x, sql.
ValueFromObject
(0, false, source), sql.
ValueFromObject
(1, false, source) }, source);
2329
return this.sql.
ValueFromObject
(0, false, exp.SourceExpression);
2441
matchesList.Add(sql.
ValueFromObject
(true, false, source));
2442
valuesList.Add(sql.
ValueFromObject
(-1, false, source));
2443
matchesList.Add(sql.
ValueFromObject
(false, false, source));
2444
valuesList.Add(sql.
ValueFromObject
(0, false, source));
2496
SqlExpression escape = needsEscape ? sql.
ValueFromObject
("~", false, mc.SourceExpression) : null;
SqlClient\Query\SqlTypeConverter.cs (4)
126
new SqlExpression[] { sql.
ValueFromObject
(30, false, expr.SourceExpression) },
131
new SqlExpression[] { nvarchar, expr, sql.
ValueFromObject
(2, false, expr.SourceExpression) },
139
new SqlWhen[] { new SqlWhen(expr, sql.
ValueFromObject
(true.ToString(), false, expr.SourceExpression)) },
140
sql.
ValueFromObject
(false.ToString(), false, expr.SourceExpression),