33 instantiations of SqlWhen
System.Data.Linq (33)
SqlClient\Common\SqlFactory.cs (1)
459
whens.Add(new
SqlWhen
(matches[i], values[i]));
SqlClient\Query\MethodCallConverter.cs (3)
195
new
SqlWhen
(lower, sql.ValueFromObject(-1, false, source)),
196
new
SqlWhen
(equal, sql.ValueFromObject(0, false, source)),
316
whens.Add(new
SqlWhen
(mc.Arguments[0], mc.Arguments[1]));
SqlClient\Query\QueryConverter.cs (2)
810
whens.Add(new
SqlWhen
(this.VisitExpression(cond.Test), this.VisitExpression(cond.IfTrue)));
1384
whens.Add(new
SqlWhen
(sql.Unary(SqlNodeType.IsNull, left, left.SourceExpression), right));
SqlClient\Query\SqlBinder.cs (2)
578
new [] { new
SqlWhen
(uo.Operand, sql.ValueFromObject(1, false, uo.SourceExpression)) },
754
whens.Add(new
SqlWhen
(when.Match, value));
SqlClient\Query\SqlBooleanizer.cs (3)
65
new
SqlWhen
(predicateExpression, valueTrue),
66
new
SqlWhen
(new SqlUnary(SqlNodeType.Not, predicateExpression.ClrType, predicateExpression.SqlType, predicateExpression, predicateExpression.SourceExpression), valueFalse)
75
new SqlWhen[] { new
SqlWhen
(predicateExpression, valueTrue) },
SqlClient\Query\SqlDuplicator.cs (2)
312
whens[i] = new
SqlWhen
(this.VisitExpression(when.Match), this.VisitExpression(when.Value));
330
whens[i] = new
SqlWhen
(this.VisitExpression(when.Match), this.VisitExpression(when.Value));
SqlClient\Query\SqlMethodCallConverter.cs (19)
1046
new
SqlWhen
(lower, sql.ValueFromObject(-1, false, source)),
1047
new
SqlWhen
(equal, sql.ValueFromObject(0, false, source)),
1612
SqlWhen when = new
SqlWhen
(lenZeroExpr, sql.ValueFromObject(0, source));
1632
SqlWhen when = new
SqlWhen
(lenZeroExpr, mc.Arguments[1]);
1655
SqlWhen when = new
SqlWhen
(lenZeroExpr, mc.Arguments[1]);
1694
SqlWhen whenNotContained = new
SqlWhen
(notContained, sql.ValueFromObject(-1, false, source));
1698
SqlWhen whenLenZero = new
SqlWhen
(lenZeroExpr, sql.Subtract(sql.CLRLENGTH(exprS), 1));
1728
SqlWhen whenNotContained = new
SqlWhen
(notContained, sql.ValueFromObject(-1, false, source));
1734
SqlWhen whenLenZero = new
SqlWhen
(lenZeroExpr, mc.Arguments[1]);
1766
SqlWhen whenNotContained = new
SqlWhen
(notContained, sql.ValueFromObject(-1, false, source));
1772
SqlWhen whenLenZero = new
SqlWhen
(lenZeroExpr, mc.Arguments[1]);
1801
return sql.SearchedCase(new SqlWhen[] { new
SqlWhen
(insertingAtEnd, stringConcat) }, stuffCall, source);
1818
return sql.SearchedCase(new SqlWhen[] { new
SqlWhen
(dontChange, exprS) }, elseCase, source);
1834
return sql.SearchedCase(new SqlWhen[] { new
SqlWhen
(dontChange, exprS) }, elseCase, source);
1851
return sql.SearchedCase(new SqlWhen[] { new
SqlWhen
(dontChange, exprS) }, elseCase, source);
1867
return sql.SearchedCase(new SqlWhen[] { new
SqlWhen
(dontChange, exprS) }, elseCase, source);
2060
return new SqlSearchedCase(mc.Method.ReturnType, new SqlWhen[] { new
SqlWhen
(aLower, b) }, a, source);
2069
return sql.SearchedCase(new SqlWhen[] { new
SqlWhen
(aLower, a) }, b, source);
2110
return sql.SearchedCase(new SqlWhen[] { new
SqlWhen
(condition, specialCase) }, roundX, source);
SqlClient\Query\SqlTypeConverter.cs (1)
139
new SqlWhen[] { new
SqlWhen
(expr, sql.ValueFromObject(true.ToString(), false, expr.SourceExpression)) },
72 references to SqlWhen
System.Data.Linq (72)
SqlClient\Common\SqlFactory.cs (3)
432
internal SqlSearchedCase SearchedCase(
SqlWhen
[] whens, SqlExpression @else, Expression sourceExpression) {
457
List<
SqlWhen
> whens = new List<
SqlWhen
>();
SqlClient\Common\SqlNode.cs (8)
1149
private List<
SqlWhen
> whens;
1152
internal SqlSearchedCase(Type clrType, IEnumerable<
SqlWhen
> whens, SqlExpression @else, Expression sourceExpression)
1156
this.whens = new List<
SqlWhen
>(whens);
1162
internal List<
SqlWhen
> Whens {
1194
private List<
SqlWhen
> whens = new List<
SqlWhen
>();
1196
internal SqlSimpleCase(Type clrType, SqlExpression expr, IEnumerable<
SqlWhen
> whens, Expression sourceExpression)
1217
internal List<
SqlWhen
> Whens {
SqlClient\Common\SqlVisitor.cs (2)
490
SqlWhen
when = c.Whens[i];
509
SqlWhen
when = c.Whens[i];
SqlClient\Query\MethodCallConverter.cs (3)
194
new
SqlWhen
[] {
315
List<
SqlWhen
> whens = new List<
SqlWhen
>(1);
SqlClient\Query\QueryConverter.cs (4)
809
List<
SqlWhen
> whens = new List<
SqlWhen
>(1);
1383
List<
SqlWhen
> whens = new List<
SqlWhen
>(1);
SqlClient\Query\SqlBinder.cs (6)
391
foreach (
var
when in sc.Whens) {
734
foreach (
SqlWhen
when in sc.Whens) {
751
List<
SqlWhen
> whens = new List<
SqlWhen
>(sc.Whens.Count);
752
foreach (
SqlWhen
when in sc.Whens) {
1331
foreach (
SqlWhen
when in sc.Whens) {
SqlClient\Query\SqlBooleanizer.cs (2)
64
new
SqlWhen
[] {
75
new
SqlWhen
[] { new SqlWhen(predicateExpression, valueTrue) },
SqlClient\Query\SqlBooleanMismatchVisitor.cs (1)
80
SqlWhen
when = c.Whens[i];
SqlClient\Query\SqlCaseSimplifier.cs (7)
62
foreach (
SqlWhen
when in sc.Whens) {
78
foreach(
SqlWhen
when in sc.Whens) {
103
List<
SqlWhen
> newWhens = new List<
SqlWhen
>();
107
SqlWhen
when = c.Whens[i];
175
private SqlExpression TryToWriteAsSimpleBooleanExpression(Type caseType, SqlExpression discriminator, List<
SqlWhen
> newWhens, bool allValuesLiteral) {
225
private SqlExpression TryToWriteAsReducedCase(Type caseType, SqlExpression discriminator, List<
SqlWhen
> newWhens, SqlExpression elseCandidate, int originalWhenCount) {
SqlClient\Query\SqlDuplicator.cs (6)
309
SqlWhen
[] whens = new
SqlWhen
[c.Whens.Count];
311
SqlWhen
when = c.Whens[i];
327
SqlWhen
[] whens = new
SqlWhen
[c.Whens.Count];
329
SqlWhen
when = c.Whens[i];
SqlClient\Query\SqlFormatter.cs (2)
1094
SqlWhen
when = c.Whens[i];
1123
SqlWhen
when = c.Whens[i];
SqlClient\Query\SqlMethodCallConverter.cs (24)
1045
new
SqlWhen
[] {
1612
SqlWhen
when = new SqlWhen(lenZeroExpr, sql.ValueFromObject(0, source));
1618
return sql.SearchedCase(new
SqlWhen
[] { when }, @else, source);
1632
SqlWhen
when = new SqlWhen(lenZeroExpr, mc.Arguments[1]);
1640
return sql.SearchedCase(new
SqlWhen
[] { when }, @else, source);
1655
SqlWhen
when = new SqlWhen(lenZeroExpr, mc.Arguments[1]);
1671
return sql.SearchedCase(new
SqlWhen
[] { when }, @else, source);
1694
SqlWhen
whenNotContained = new SqlWhen(notContained, sql.ValueFromObject(-1, false, source));
1698
SqlWhen
whenLenZero = new SqlWhen(lenZeroExpr, sql.Subtract(sql.CLRLENGTH(exprS), 1));
1700
return sql.SearchedCase(new
SqlWhen
[] { whenLenZero, whenNotContained },
1728
SqlWhen
whenNotContained = new SqlWhen(notContained, sql.ValueFromObject(-1, false, source));
1734
SqlWhen
whenLenZero = new SqlWhen(lenZeroExpr, mc.Arguments[1]);
1736
return sql.SearchedCase(new
SqlWhen
[] { whenLenZero, whenNotContained },
1766
SqlWhen
whenNotContained = new SqlWhen(notContained, sql.ValueFromObject(-1, false, source));
1772
SqlWhen
whenLenZero = new SqlWhen(lenZeroExpr, mc.Arguments[1]);
1774
return sql.SearchedCase(new
SqlWhen
[] { whenLenZero, whenNotContained },
1801
return sql.SearchedCase(new
SqlWhen
[] { new SqlWhen(insertingAtEnd, stringConcat) }, stuffCall, source);
1818
return sql.SearchedCase(new
SqlWhen
[] { new SqlWhen(dontChange, exprS) }, elseCase, source);
1834
return sql.SearchedCase(new
SqlWhen
[] { new SqlWhen(dontChange, exprS) }, elseCase, source);
1851
return sql.SearchedCase(new
SqlWhen
[] { new SqlWhen(dontChange, exprS) }, elseCase, source);
1867
return sql.SearchedCase(new
SqlWhen
[] { new SqlWhen(dontChange, exprS) }, elseCase, source);
2060
return new SqlSearchedCase(mc.Method.ReturnType, new
SqlWhen
[] { new SqlWhen(aLower, b) }, a, source);
2069
return sql.SearchedCase(new
SqlWhen
[] { new SqlWhen(aLower, a) }, b, source);
2110
return sql.SearchedCase(new
SqlWhen
[] { new SqlWhen(condition, specialCase) }, roundX, source);
SqlClient\Query\SqlRetyper.cs (2)
171
foreach (
SqlWhen
when in c.Whens.Where(w => w.Value.SqlType != type && !w.Value.SqlType.IsRuntimeOnlyType)) {
193
foreach (
SqlWhen
when in c.Whens.Where(w => w.Value.SqlType != type && !w.Value.SqlType.IsRuntimeOnlyType)) {
SqlClient\Query\SqlTypeConverter.cs (1)
139
new
SqlWhen
[] { new SqlWhen(expr, sql.ValueFromObject(true.ToString(), false, expr.SourceExpression)) },
SqlClient\Reader\ObjectReaderCompiler.cs (1)
2031
SqlWhen
when = ssc.Whens[i];