Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (28)
1317Debug.Assert(pArgumentType is AggregateType);
1324((AggregateType)pArgumentType).OwningAggregate.GetUnderlyingType(),
1334((AggregateType)pArgumentType).OwningAggregate.GetUnderlyingType(),
2012AggregateType typeDst = GetEnumBinOpType(ek, arg1.Type, arg2.Type, out AggregateType typeEnum);
2053NullableType typeDst = TypeManager.GetNullable(GetEnumBinOpType(ek, nonNullableType1, nonNullableType2, out AggregateType typeEnum));
2370private static AggregateType GetUserDefinedBinopArgumentType(CType type)
2377if (type is AggregateType ats && (ats.IsClassType || ats.IsStructType) && !ats.OwningAggregate.IsSkipUDOps())
2385private static int GetUserDefinedBinopArgumentTypes(CType type1, CType type2, AggregateType[] rgats)
2406private static bool UserDefinedBinaryOperatorCanBeLifted(ExpressionKind ek, MethodSymbol method, AggregateType ats,
2451ExpressionKind ek, MethodSymbol method, AggregateType ats, Expr arg1, Expr arg2, bool fDontLift)
2489List<CandidateFunctionMember> candidateList, ExpressionKind ek, AggregateType type,
2508private AggregateType GetApplicableUserDefinedBinaryOperatorCandidatesInBaseTypes(
2509List<CandidateFunctionMember> candidateList, ExpressionKind ek, AggregateType type,
2510Expr arg1, Expr arg2, bool fDontLift, AggregateType atsStop)
2512for (AggregateType atsCur = type; atsCur != null && atsCur != atsStop; atsCur = atsCur.BaseClass)
2530AggregateType[] rgats = { null, null };
2544AggregateType atsStop = GetApplicableUserDefinedBinaryOperatorCandidatesInBaseTypes(methFirst, ek,
2680private static AggregateType GetEnumBinOpType(ExpressionKind ek, CType argType1, CType argType2, out AggregateType ppEnumType)
2684AggregateType type1 = argType1 as AggregateType;
2685AggregateType type2 = argType2 as AggregateType;
2687AggregateType typeEnum = type1.IsEnumType ? type1 : type2;
2692AggregateType typeDst = typeEnum;
2730AggregateType callingType = TypeManager.GetAggregate(agg, TypeArray.Empty);
2745AggregateType pCallingType = TypeManager.GetAggregate(pAgg, TypeArray.Empty);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (29)
89public static AggregateType GetAggregate(AggregateSymbol agg, AggregateType atsOuter, TypeArray typeArgs)
96AggregateType pAggregate = TypeTable.LookupAggregate(agg, atsOuter, typeArgs);
113public static AggregateType GetAggregate(AggregateSymbol agg, TypeArray typeArgsAll)
130AggregateType atsOuter = GetAggregate(aggOuter, typeArgsOuter);
189public static AggregateType SubstType(AggregateType typeSrc, TypeArray typeArgsCls)
234private static AggregateType SubstTypeCore(AggregateType type, SubstContext ctx)
285return SubstTypeCore((AggregateType)type, pctx);
405if (!(typeDst is AggregateType atsDst))
408AggregateType atsSrc = (AggregateType)typeSrc;
486AggregateType ats = (AggregateType)type;
524AggregateType ats = (AggregateType)type;
549public static AggregateType SubstType(AggregateType typeSrc, SubstContext ctx) =>
555public static CType SubstType(CType typeSrc, AggregateType atsCls) => SubstType(typeSrc, atsCls, null);
557public static CType SubstType(CType typeSrc, AggregateType atsCls, TypeArray typeArgsMeth) =>
561SubstType(typeSrc, (typeCls as AggregateType)?.TypeArgsAll, typeArgsMeth);
563public static TypeArray SubstTypeArray(TypeArray taSrc, AggregateType atsCls, TypeArray typeArgsMeth) =>
566public static TypeArray SubstTypeArray(TypeArray taSrc, AggregateType atsCls) => SubstTypeArray(taSrc, atsCls, null);
569SubstEqualTypes(typeDst, typeSrc, (typeCls as AggregateType)?.TypeArgsAll, typeArgsMeth, false);
608if (typeSrc is AggregateType aggSrc)
622AggregateType baseType = aggSrc.BaseClass;
664private static bool TryVarianceAdjustmentToGetAccessibleType(AggregateSymbol context, AggregateType typeSrc, out CType typeDst)
672AggregateType aggOpenType = aggSym.getThisType();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeTable.cs (9)
51private static readonly Dictionary<KeyPair<AggregateSymbol, KeyPair<AggregateType, TypeArray>>, AggregateType> s_aggregateTable =
52new Dictionary<KeyPair<AggregateSymbol, KeyPair<AggregateType, TypeArray>>, AggregateType>();
67public static AggregateType LookupAggregate(AggregateSymbol aggregate, AggregateType outer, TypeArray args)
70s_aggregateTable.TryGetValue(MakeKey(aggregate, MakeKey(outer, args)), out AggregateType result);
74public static void InsertAggregate(AggregateSymbol aggregate, AggregateType outer, TypeArray args, AggregateType ats)
Microsoft\CSharp\RuntimeBinder\Semantics\WithType.cs (14)
25private AggregateType _ats;
32public SymWithType(Symbol sym, AggregateType ats)
43public AggregateType Ats
53public new AggregateType GetType()
127public void Set(Symbol sym, AggregateType ats)
143public MethPropWithType(MethodOrPropertySymbol mps, AggregateType ats)
155public MethWithType(MethodSymbol meth, AggregateType ats)
163public PropWithType(PropertySymbol prop, AggregateType ats)
176public FieldWithType(FieldSymbol field, AggregateType ats)
202public MethPropWithInst(MethodOrPropertySymbol mps, AggregateType ats)
207public MethPropWithInst(MethodOrPropertySymbol mps, AggregateType ats, TypeArray typeArgs)
218public void Set(MethodOrPropertySymbol mps, AggregateType ats, TypeArray typeArgs)
233public MethWithInst(MethodSymbol meth, AggregateType ats)
237public MethWithInst(MethodSymbol meth, AggregateType ats, TypeArray typeArgs)