89 references to BetterType
Microsoft.CSharp (89)
Microsoft\CSharp\RuntimeBinder\Semantics\Binding\Better.cs (60)
40
private static
BetterType
WhichMethodIsBetterTieBreaker(
55
return node1.ctypeLift < node2.ctypeLift ?
BetterType
.Left :
BetterType
.Right;
63
return
BetterType
.Right;
68
return
BetterType
.Left;
76
return
BetterType
.Right;
81
return
BetterType
.Left;
85
BetterType
nT = CompareTypes(
88
if (nT ==
BetterType
.Left || nT ==
BetterType
.Right)
96
return mpwi1.MethProp().modOptCount < mpwi2.MethProp().modOptCount ?
BetterType
.Left :
BetterType
.Right;
100
return
BetterType
.Neither;
103
private static
BetterType
CompareTypes(TypeArray ta1, TypeArray ta2)
107
return
BetterType
.Same;
113
return ta1.Count > ta2.Count ?
BetterType
.Left :
BetterType
.Right;
116
BetterType
nTot =
BetterType
.Neither;
122
BetterType
nParam =
BetterType
.Neither;
129
nParam =
BetterType
.Right;
133
nParam =
BetterType
.Left;
160
if (nParam ==
BetterType
.Right || nParam ==
BetterType
.Left)
162
if (nTot ==
BetterType
.Same || nTot ==
BetterType
.Neither)
168
return
BetterType
.Neither;
280
private
BetterType
WhichMethodIsBetter(
311
BetterType
betterMethod =
BetterType
.Neither;
332
BetterType
betterConversion = WhichConversionIsBetter(argType, p1, p2);
334
if (betterMethod ==
BetterType
.Right)
336
if (betterConversion ==
BetterType
.Left)
338
betterMethod =
BetterType
.Neither;
342
else if (betterMethod ==
BetterType
.Left)
344
if (betterConversion ==
BetterType
.Right)
346
betterMethod =
BetterType
.Neither;
352
Debug.Assert(betterMethod ==
BetterType
.Neither);
353
if (betterConversion ==
BetterType
.Right || betterConversion ==
BetterType
.Left)
363
if (pta1.Count != pta2.Count && betterMethod ==
BetterType
.Neither)
369
return
BetterType
.Right;
374
return
BetterType
.Left;
383
return
BetterType
.Left;
388
return
BetterType
.Right;
391
return
BetterType
.Neither;
398
private
BetterType
WhichConversionIsBetter(CType argType, CType p1, CType p2)
426
return
BetterType
.Same;
446
return
BetterType
.Left;
451
return
BetterType
.Right;
459
return a2b ?
BetterType
.Left :
BetterType
.Right;
470
return (
BetterType
)s_betterConversionTable[(int)pt1][(int)pt2];
475
return
BetterType
.Neither;
519
case
BetterType
.Left:
523
case
BetterType
.Right:
563
case
BetterType
.Right:
567
case
BetterType
.Same:
568
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;
243
private
BetterType
WhichSimpleConversionIsBetter(PredefinedType pt1, PredefinedType pt2)
250
return (
BetterType
)s_simpleTypeBetter[(int)pt1][(int)pt2];
260
private
BetterType
WhichTypeIsBetter(PredefinedType pt1, PredefinedType pt2, CType typeGiven)
264
return
BetterType
.Same;
268
return
BetterType
.Left;
272
return
BetterType
.Right;
280
return
BetterType
.Left;
284
return
BetterType
.Right;
296
private
BetterType
WhichTypeIsBetter(CType type1, CType type2, CType typeGiven)
301
return
BetterType
.Same;
305
return
BetterType
.Left;
309
return
BetterType
.Right;
316
return f12 ?
BetterType
.Left :
BetterType
.Right;
323
return
BetterType
.Neither;
334
return
BetterType
.Neither;
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (9)
1034
BetterType
bt1;
1035
BetterType
bt2;
1053
BetterType
.Left => -1,
1054
BetterType
.Right => 1,
1059
case
BetterType
.Left:
1063
case
BetterType
.Right:
1541
BetterType
bt;
1556
BetterType
.Left => -1,
1557
BetterType
.Right => +1,