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