89 references to BetterType
Microsoft.CSharp (89)
Microsoft\CSharp\RuntimeBinder\Semantics\Binding\Better.cs (60)
41
private static
BetterType
WhichMethodIsBetterTieBreaker(
56
return node1.ctypeLift < node2.ctypeLift ?
BetterType
.Left :
BetterType
.Right;
64
return
BetterType
.Right;
69
return
BetterType
.Left;
77
return
BetterType
.Right;
82
return
BetterType
.Left;
86
BetterType
nT = CompareTypes(
89
if (nT ==
BetterType
.Left || nT ==
BetterType
.Right)
97
return mpwi1.MethProp().modOptCount < mpwi2.MethProp().modOptCount ?
BetterType
.Left :
BetterType
.Right;
101
return
BetterType
.Neither;
104
private static
BetterType
CompareTypes(TypeArray ta1, TypeArray ta2)
108
return
BetterType
.Same;
114
return ta1.Count > ta2.Count ?
BetterType
.Left :
BetterType
.Right;
117
BetterType
nTot =
BetterType
.Neither;
123
BetterType
nParam =
BetterType
.Neither;
130
nParam =
BetterType
.Right;
134
nParam =
BetterType
.Left;
161
if (nParam ==
BetterType
.Right || nParam ==
BetterType
.Left)
163
if (nTot ==
BetterType
.Same || nTot ==
BetterType
.Neither)
169
return
BetterType
.Neither;
283
private
BetterType
WhichMethodIsBetter(
314
BetterType
betterMethod =
BetterType
.Neither;
335
BetterType
betterConversion = WhichConversionIsBetter(argType, p1, p2);
337
if (betterMethod ==
BetterType
.Right)
339
if (betterConversion ==
BetterType
.Left)
341
betterMethod =
BetterType
.Neither;
345
else if (betterMethod ==
BetterType
.Left)
347
if (betterConversion ==
BetterType
.Right)
349
betterMethod =
BetterType
.Neither;
355
Debug.Assert(betterMethod ==
BetterType
.Neither);
356
if (betterConversion ==
BetterType
.Right || betterConversion ==
BetterType
.Left)
366
if (pta1.Count != pta2.Count && betterMethod ==
BetterType
.Neither)
372
return
BetterType
.Right;
377
return
BetterType
.Left;
386
return
BetterType
.Left;
391
return
BetterType
.Right;
394
return
BetterType
.Neither;
402
private
BetterType
WhichConversionIsBetter(CType argType, CType p1, CType p2)
430
return
BetterType
.Same;
450
return
BetterType
.Left;
455
return
BetterType
.Right;
463
return a2b ?
BetterType
.Left :
BetterType
.Right;
474
return (
BetterType
)s_betterConversionTable[(int)pt1][(int)pt2];
479
return
BetterType
.Neither;
524
case
BetterType
.Left:
528
case
BetterType
.Right:
568
case
BetterType
.Right:
572
case
BetterType
.Same:
573
case
BetterType
.Neither:
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (20)
184
private const byte same = (byte)
BetterType
.Same;
185
private const byte left = (byte)
BetterType
.Left;
186
private const byte right = (byte)
BetterType
.Right;
187
private const byte neither = (byte)
BetterType
.Neither;
245
private
BetterType
WhichSimpleConversionIsBetter(PredefinedType pt1, PredefinedType pt2)
252
return (
BetterType
)s_simpleTypeBetter[(int)pt1][(int)pt2];
263
private
BetterType
WhichTypeIsBetter(PredefinedType pt1, PredefinedType pt2, CType typeGiven)
267
return
BetterType
.Same;
271
return
BetterType
.Left;
275
return
BetterType
.Right;
283
return
BetterType
.Left;
287
return
BetterType
.Right;
300
private
BetterType
WhichTypeIsBetter(CType type1, CType type2, CType typeGiven)
305
return
BetterType
.Same;
309
return
BetterType
.Left;
313
return
BetterType
.Right;
320
return f12 ?
BetterType
.Left :
BetterType
.Right;
327
return
BetterType
.Neither;
338
return
BetterType
.Neither;
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (9)
1058
BetterType
bt1;
1059
BetterType
bt2;
1077
BetterType
.Left => -1,
1078
BetterType
.Right => 1,
1083
case
BetterType
.Left:
1087
case
BetterType
.Right:
1570
BetterType
bt;
1585
BetterType
.Left => -1,
1586
BetterType
.Right => +1,