10 types derived from CType
Microsoft.CSharp (10)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (1)
19internal sealed class AggregateType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ArgumentListType.cs (1)
11internal sealed class ArgumentListType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ArrayType.cs (1)
14internal sealed class ArrayType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\MethodGroupType.cs (1)
11internal sealed class MethodGroupType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullableType.cs (1)
18internal sealed class NullableType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullType.cs (1)
10internal sealed class NullType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ParameterModifierType.cs (1)
18internal sealed class ParameterModifierType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PointerType.cs (1)
10internal sealed class PointerType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeParameterType.cs (1)
14internal sealed class TypeParameterType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\VoidType.cs (1)
12internal sealed class VoidType : CType
643 references to CType
Microsoft.CSharp (643)
Microsoft\CSharp\RuntimeBinder\Errors\ErrorFmt.cs (5)
59internal CType pType; 88public ErrArg(CType pType) 93public ErrArg(CType pType, ErrArgFlags eaf) 132public static implicit operator ErrArg(CType type) 170public ErrArgNoRef(CType pType)
Microsoft\CSharp\RuntimeBinder\Errors\ErrorHandling.cs (2)
74CType pType = null; 118CType pType2 = null;
Microsoft\CSharp\RuntimeBinder\Errors\UserStringBuilder.cs (3)
134CType pType = TypeManager.SubstType(agg.getThisType(), pctx); 391private void ErrAppendType(CType pType, SubstContext pctx) 467CType elementType = ((ArrayType)pType).BaseElementType;
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (14)
232CType actualType = SymbolTable.GetCTypeFromType(t); 233CType bestType = TypeManager.GetBestAccessibleType(_binder.Context.ContextForMemberLookup, actualType); 340CType type = SymbolTable.GetCTypeFromType(parameter.Type); 386CType ctype; 524CType callingObjectType = callingObject.Type; 547HashSet<CType> distinctCallingTypes = new HashSet<CType>(); 548List<CType> callingTypes = new List<CType>(); 790CType eventCType = null; 1199CType destinationType = SymbolTable.GetCTypeFromType(returnType); 1213CType pDestType = _binder.ChooseArrayIndexType(argument); 1234CType destinationType = SymbolTable.GetCTypeFromType(returnType); 1296CType boolType = SymbolLoader.GetPredefindType(PredefinedType.PT_BOOL);
Microsoft\CSharp\RuntimeBinder\Semantics\Binding\Better.cs (16)
43CType pTypeThrough, 120CType type1 = ta1[i]; 121CType type2 = ta2[i]; 201private static TypeArray RearrangeNamedArguments(TypeArray pta, MethPropWithInst mpwi, CType pTypeThrough, ArgInfos args) 219CType type = pTypeThrough ?? mpwi.GetType(); 220CType[] typeList = new CType[pta.Count]; 237CType tempType = pta[index]; 283CType pTypeThrough, 316CType p1 = pta1[i]; 317CType p2 = pta2[i]; 326CType argType = arg?.RuntimeObjectActualType ?? args.types[i]; 398private BetterType WhichConversionIsBetter(CType argType, CType p1, CType p2) 484CType pTypeThrough,
Microsoft\CSharp\RuntimeBinder\Semantics\BinOpArgInfo.cs (4)
35public CType type1; 36public CType type2; 37public CType typeRaw1; 38public CType typeRaw2;
Microsoft\CSharp\RuntimeBinder\Semantics\BinOpSig.cs (6)
56private readonly CType _type1; 57private readonly CType _type2; 59public BinOpFullSig(CType type1, CType type2, PfnBindBinOp pfn, OpSigFlags grfos, 123public CType Type1() 128public CType Type2()
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (63)
47CType pSourceType, 48CType pDestinationType, 260private BetterType WhichTypeIsBetter(PredefinedType pt1, PredefinedType pt2, CType typeGiven) 296private BetterType WhichTypeIsBetter(CType type1, CType type2, CType typeGiven) 339private bool canConvert(CType src, CType dest, CONVERTTYPE flags) => BindImplicitConversion(null, src, dest, flags); 342public bool canConvert(CType src, CType dest) => canConvert(src, dest, 0); 346private bool canConvert(Expr expr, CType dest) => canConvert(expr, dest, 0); 349private bool canConvert(Expr expr, CType dest, CONVERTTYPE flags) => 355private Expr mustConvertCore(Expr expr, CType destExpr) => mustConvertCore(expr, destExpr, 0); 358private Expr mustConvertCore(Expr expr, CType dest, CONVERTTYPE flags) 406public Expr tryConvert(Expr expr, CType dest) 412private Expr tryConvert(Expr expr, CType dest, CONVERTTYPE flags) 426public Expr mustConvert(Expr expr, CType dest) => mustConvert(expr, dest, (CONVERTTYPE)0); 429private Expr mustConvert(Expr expr, CType dest, CONVERTTYPE flags) => mustConvertCore(expr, dest, flags); 439private Expr mustCastCore(Expr expr, CType dest, CONVERTTYPE flags) 514private static RuntimeBinderException CantConvert(Expr expr, CType dest) 522public Expr mustCast(Expr expr, CType dest) => mustCast(expr, dest, 0); 525public Expr mustCast(Expr expr, CType dest, CONVERTTYPE flags) => mustCastCore(expr, dest, flags); 528private Expr MustCastInUncheckedContext(Expr expr, CType dest, CONVERTTYPE flags) => 533private bool canCast(CType src, CType dest, CONVERTTYPE flags) => BindExplicitConversion(null, src, dest, flags); 536private bool BindImplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, CONVERTTYPE flags) 543private bool BindImplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, out Expr ppDestinationExpr, CONVERTTYPE flags) 552private bool BindImplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, bool needsExprDest, out Expr ppDestinationExpr, CONVERTTYPE flags) 561private bool BindExplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, bool needsExprDest, out Expr ppDestinationExpr, CONVERTTYPE flags) 570private bool BindExplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, out Expr ppDestinationExpr, CONVERTTYPE flags) 579private bool BindExplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, CONVERTTYPE flags) 626private bool bindUserDefinedConversion(Expr exprSrc, CType typeSrc, CType typeDst, bool needExprDest, out Expr pexprDst, bool fImplicitOnly) 637CType typeSrcBase = typeSrc.StripNubs(); 638CType typeDstBase = typeDst.StripNubs(); 687CType typeBestSrc = null; 688CType typeBestDst = null; 694CType typeFrom; 695CType typeTo; 1055private static RuntimeBinderException HandleAmbiguity(CType typeSrc, CType typeDst, List<UdConvInfo> prguci, int iuciBestSrc, int iuciBestDst) 1093private Expr BindUDConversionCore(Expr pFrom, CType pTypeFrom, CType pTypeTo, CType pTypeDestination, MethWithInst mwiBest) 1099private Expr BindUDConversionCore(Expr pFrom, CType pTypeFrom, CType pTypeTo, CType pTypeDestination, MethWithInst mwiBest, out Expr ppTransformedArgument) 1115private ConstCastResult bindConstantCast(Expr exprSrc, CType typeDest, bool needExprDest, out Expr pexprDest, bool explicitConversion) 1325private int CompareSrcTypesBased(CType type1, bool fImplicit1, CType type2, bool fImplicit2) 1359private int CompareDstTypesBased(CType type1, bool fImplicit1, CType type2, bool fImplicit2) 1375private static Expr BindDecimalConstCast(CType destType, CType srcType, ExprConstant src) 1377CType typeDecimal = SymbolLoader.GetPredefindType(PredefinedType.PT_DECIMAL); 1485private bool CanExplicitConversionBeBoundInUncheckedContext(Expr exprSrc, CType typeSrc, CType typeDest, CONVERTTYPE flags)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs (15)
28public static bool FImpRefConv(CType typeSrc, CType typeDst) => 76public static bool FExpRefConv(CType typeSrc, CType typeDst) 183CType typeArr = arrayDest.ElementType; 184CType typeLst = aggtypeSrc.TypeArgsAll[0]; 222public static bool HasGenericDelegateExplicitReferenceConversion(CType source, CType target) => 226public static bool HasGenericDelegateExplicitReferenceConversion(CType pSource, AggregateType pTarget) 246CType pSourceArg = pSourceArgs[iParam]; 247CType pTargetArg = pTargetArgs[iParam]; 326public static bool FWrappingConv(CType typeSrc, CType typeDst) => typeDst is NullableType nubDst && typeSrc == nubDst.UnderlyingType; 340public static bool FUnwrappingConv(CType typeSrc, CType typeDst)
Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs (9)
20private readonly CType _typeSrc; 21private readonly CType _typeDest; 46public ExplicitConversion(ExpressionBinder binder, Expr exprSrc, CType typeSrc, CType typeDest, bool needsExprDest, CONVERTTYPE flags) 255CType typeArr = arrSrc.ElementType; 256CType typeLst = aggDest.TypeArgsAll[0]; 296CType typeArr = arrayDest.ElementType; 297CType typeLst = aggSrc.TypeArgsAll[0]; 482CType underlyingType = aggTypeDest.UnderlyingEnumType;
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (44)
305CType pIntType = GetPredefindType(PredefinedType.PT_INT); 309CType elementType = pArrayType.ElementType; 314CType pDestType = ChooseArrayIndexType(pOp2); 332private Expr MustConvertWithSuppressedMessage(Expr x, CType pDestType) 337private static ExprCast ExprFactoryCreateCastWithSuppressedMessage(EXPRFLAG flags, CType type, Expr argument) 343private void bindSimpleCast(Expr exprSrc, CType typeDest, out Expr pexprDest) => 347private void bindSimpleCast(Expr exprSrc, CType typeDest, out Expr pexprDest, EXPRFLAG exprFlags) 396CType callingObjectType = pObject?.Type; 401CType pReturnType; 439CType pFieldType = TypeManager.SubstType(fwt.Field().GetType(), fwt.GetType()); 494CType pReturnType = TypeManager.SubstType(pwt.Prop().RetType, pwt.GetType()); 506CType type = null; 542CType typeSrc = arg.Type; 601CType typeParam = paramsCur[0]; 652private ExprCall BindLiftedUDUnop(Expr arg, CType typeArg, MethPropWithInst mpwi) 654CType typeRaw = typeArg.StripNubs(); 662CType typeRet = TypeManager.SubstType(mpwi.Meth().RetType, mpwi.GetType()); 681private ExprCall BindUDUnopCall(Expr arg, CType typeArg, MethPropWithInst mpwi) 683CType typeRet = TypeManager.SubstType(mpwi.Meth().RetType, mpwi.GetType()); 828CType type = null; 838private void CheckPropertyAccess(MethWithType mwt, PropWithType pwtSlot, CType type) 919foreach (CType type in meth.Params.Items) 989CType typeObj = pObject.Type; 990CType typeTmp; 1062private void verifyMethodArgs(ExprWithArgs call, CType callingObjectType) 1075private void AdjustCallArgumentsForParams(CType callingObjectType, CType type, MethodOrPropertySymbol mp, TypeArray pTypeArgs, Expr argsPtr, out Expr newArgs) 1137CType substDestType = TypeManager.SubstType(@params[index], type, pTypeArgs); 1151CType arrayType = (ArrayType)TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs); 1170CType substDestType = TypeManager.SubstType(@params[iDst], type, pTypeArgs); 1218CType substitutedArrayType = TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs); 1229CType elementType = subArr.ElementType; 1287internal CType ChooseArrayIndexType(Expr args) 1292CType type = GetPredefindType(predef); 1313CType[] prgtype = new CType[argInfo.carg]; 1344CType[] prgtype; 1350prgtype = new CType[@params.Count - 1]; 1356prgtype = new CType[count]; 1359CType type = @params[@params.Count - 1]; 1369CType elementType = arr.ElementType; 1409private static bool isConstantInRange(ExprConstant exprSrc, CType typeDest) 1415private static bool isConstantInRange(ExprConstant exprSrc, CType typeDest, bool realsOk) 1611private static void CheckUnsafe(CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\ExprFactory.cs (21)
13public static ExprCall CreateCall(EXPRFLAG flags, CType type, Expr arguments, ExprMemberGroup memberGroup, MethWithInst method) => 16public static ExprField CreateField(CType type, Expr optionalObject, FieldWithType field) => 19public static ExprArrayInit CreateArrayInit(CType type, Expr arguments, Expr argumentDimensions, int[] dimSizes) => 22public static ExprProperty CreateProperty(CType type, Expr optionalObjectThrough, Expr arguments, ExprMemberGroup memberGroup, PropWithType property, MethWithType setMethod) => 25public static ExprMemberGroup CreateMemGroup(EXPRFLAG flags, Name name, TypeArray typeArgs, SYMKIND symKind, CType parentType, Expr obj, CMemberLookupResults memberLookupResults) => 33obj, new CMemberLookupResults(TypeArray.Allocate((CType)method.GetType()), name)); 41public static ExprCast CreateCast(CType type, Expr argument) => CreateCast(0, type, argument); 44public static ExprCast CreateCast(EXPRFLAG flags, CType type, Expr argument) => new ExprCast(flags, type, argument); 72public static ExprTypeOf CreateTypeOf(CType sourceType) => 76public static ExprUserLogicalOp CreateUserLogOp(CType type, Expr trueFalseCall, ExprCall operatorCall) => 87public static ExprMultiGet CreateMultiGet(EXPRFLAG flags, CType type, ExprMulti multi) => 91public static ExprMulti CreateMulti(EXPRFLAG flags, CType type, Expr left, Expr op) => 102public static Expr CreateZeroInit(CType type) 139public static ExprConstant CreateConstant(CType type, ConstVal constVal) => new ExprConstant(type, constVal); 149public static ExprArrayIndex CreateArrayIndex(CType type, Expr array, Expr index) => 152public static ExprBinOp CreateBinop(ExpressionKind exprKind, CType type, Expr left, Expr right) => 155public static ExprUnaryOp CreateUnaryOp(ExpressionKind exprKind, CType type, Expr operand) => 158public static ExprOperator CreateOperator(ExpressionKind exprKind, CType type, Expr arg1, Expr arg2) 167public static ExprBinOp CreateUserDefinedBinop(ExpressionKind exprKind, CType type, Expr left, Expr right, Expr call, MethPropWithInst userMethod) => 171public static ExprUnaryOp CreateUserDefinedUnaryOperator(ExpressionKind exprKind, CType type, Expr operand, ExprCall call, MethPropWithInst userMethod) => 245public static ExprClass CreateClass(CType type) => new ExprClass(type);
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (20)
56private readonly List<CType> _HiddenTypes; 83_HiddenTypes = new List<CType>(); 104private static CType GetTypeQualifier(ExprMemberGroup pGroup) 325CType pTypeThrough = _pGroup.OptionalObject?.Type; 466CType[] prgTypes = new CType[pCurrentParameters.Count]; 487private static Expr GenerateOptionalArgument(MethodOrPropertySymbol methprop, CType type, int index) 489CType pParamType = type; 490CType pRawParamType = type.StripNubs(); 495CType pConstValType = methprop.GetDefaultParameterValueConstValType(index); 580public static MethodOrPropertySymbol FindMostDerivedMethod(MethodOrPropertySymbol pMethProp, CType pType) 705CType[] prgTypes = new CType[@params.Count]; 917CType var = _pCurrentParameters[ivar]; 928CType var = _pCurrentParameters[ivar]; 960CType argStripped = _pArguments.types[ivar] is ParameterModifierType modArg ? 962CType varStripped = var is ParameterModifierType modVar ? modVar.ParameterType : var; 1023CType pType = _pCurrentParameters[iParam]; 1042private static bool DoesTypeArgumentsContainErrorSym(CType var) 1052CType type = typeVars[i];
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (6)
18public ImplicitConversion(ExpressionBinder binder, Expr exprSrc, CType typeSrc, CType typeDest, bool needsExprDest, CONVERTTYPE flags) 32private readonly CType _typeSrc; 33private readonly CType _typeDest; 296CType typeDstBase = nubDst.StripNubs(out dstWasNullable); 297CType typeSrcBase = _typeSrc.StripNubs(out srcWasNullable);
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs (4)
40private CType _typeSrc; 41private CType _typeQual; 485private static bool IsDelegateType(CType pSrcType, AggregateType pAggType) => 521public bool Lookup(CType typeSrc, Expr obj, ParentSymbol symWhere, Name name, int arity, MemLookFlags flags)
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookupResults.cs (1)
31CType qualifyingType, AggregateSymbol context, int arity, EXPRFLAG flags, symbmask_t mask, ArgInfos nonTrailingNamedArguments) =>
Microsoft\CSharp\RuntimeBinder\Semantics\MethodIterator.cs (2)
18private readonly CType _qualifyingType; 27public CMethodIterator(Name name, TypeArray containingTypes, CType qualifyingType, AggregateSymbol context, int arity, EXPRFLAG flags, symbmask_t mask, ArgInfos nonTrailingNamedArguments)
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (74)
35private readonly List<CType>[] _pExactBounds; 36private readonly List<CType>[] _pUpperBounds; 37private readonly List<CType>[] _pLowerBounds; 38private readonly CType[] _pFixedResults; 126_pFixedResults = new CType[pMethodTypeParameters.Count]; 127_pLowerBounds = new List<CType>[pMethodTypeParameters.Count]; 128_pUpperBounds = new List<CType>[pMethodTypeParameters.Count]; 129_pExactBounds = new List<CType>[pMethodTypeParameters.Count]; 132_pLowerBounds[iBound] = new List<CType>(); 133_pUpperBounds[iBound] = new List<CType>(); 134_pExactBounds[iBound] = new List<CType>(); 179private void AddLowerBound(TypeParameterType pParam, CType pBound) 191private void AddUpperBound(TypeParameterType pParam, CType pBound) 203private void AddExactBound(TypeParameterType pParam, CType pBound) 243private static bool IsReallyAType(CType pType) => 276CType pDest = _pMethodFormalParameterTypes[iArg]; 287CType pSource = pExpr.RuntimeObjectActualType ?? _pMethodArguments.types[iArg]; 758private void ExactInference(CType pSource, CType pDest) 797private bool ExactTypeParameterInference(CType pSource, CType pDest) 814private bool ExactArrayInference(CType pSource, CType pDest) 834private bool ExactNullableInference(CType pSource, CType pDest) 849private bool ExactConstructedInference(CType pSource, CType pDest) 893private void LowerBoundInference(CType pSource, CType pDest) 963private bool LowerBoundTypeParameterInference(CType pSource, CType pDest) 981private bool LowerBoundArrayInference(CType pSource, CType pDest) 1004CType pElementSource = pArraySource.ElementType; 1005CType pElementDest; 1070private bool LowerBoundConstructedInference(CType pSource, CType pDest) 1133private bool LowerBoundClassInference(CType pSource, AggregateType pDest) 1175private bool LowerBoundInterfaceInference(CType pSource, AggregateType pDest) 1251CType pSourceArg = pSourceArgs[arg]; 1252CType pDestArg = pDestArgs[arg]; 1278private void UpperBoundInference(CType pSource, CType pDest) 1322private bool UpperBoundTypeParameterInference(CType pSource, CType pDest) 1340private bool UpperBoundArrayInference(CType pSource, CType pDest) 1355CType pElementDest = pArrayDest.ElementType; 1356CType pElementSource; 1400private bool UpperBoundConstructedInference(CType pSource, CType pDest) 1456private bool UpperBoundClassInference(AggregateType pSource, CType pDest) 1486private bool UpperBoundInterfaceInference(AggregateType pSource, CType pDest) 1558CType pSourceArg = pSourceArgs[arg]; 1559CType pDestArg = pDestArgs[arg]; 1605List<CType> initialCandidates = new List<CType>(); 1612HashSet<CType> typeSet = new HashSet<CType>(); 1614foreach (CType pCurrent in _pLowerBounds[iParam]) 1622foreach (CType pCurrent in _pUpperBounds[iParam]) 1643foreach (CType pBound in _pLowerBounds[iParam]) 1645List<CType> removeList = new List<CType>(); 1646foreach (CType pCandidate in initialCandidates) 1653foreach (CType pRemove in removeList) 1661foreach (CType pBound in _pUpperBounds[iParam]) 1663List<CType> removeList = new List<CType>(); 1664foreach (CType pCandidate in initialCandidates) 1671foreach (CType pRemove in removeList) 1681CType pBest = null; 1682foreach (CType pCandidate in initialCandidates) 1684foreach (CType pCandidate2 in initialCandidates)
Microsoft\CSharp\RuntimeBinder\Semantics\Nullable.cs (1)
52CType typeBase = nubSrc.UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (67)
204CType typeSig1 = GetPredefindType(bos.pt1); 205CType typeSig2 = GetPredefindType(bos.pt2); 458CType typeBool = GetPredefindType(PredefinedType.PT_BOOL); 628CType resultType; 657private void LiftArgument(Expr pArgument, CType pParameterType, bool bConvertBeforeLift, 732private bool CanConvertArg1(BinOpArgInfo info, CType typeDst, out LiftFlags pgrflt, 733out CType ptypeSig1, out CType ptypeSig2) 767private bool CanConvertArg2(BinOpArgInfo info, CType typeDst, out LiftFlags pgrflt, 768out CType ptypeSig1, out CType ptypeSig2) 806CType typeSig1; 807CType typeSig2; 849CType typeSig1 = null; 850CType typeSig2 = null; 924CType type1 = info.type1; 925CType type2 = info.type2; 926CType typeObj = GetPredefindType(PredefinedType.PT_OBJECT); 927CType typeCls = null; 938CType typeDel = GetPredefindType(PredefinedType.PT_DELEGATE); 1032private int WhichBofsIsBetter(BinOpFullSig bofs1, BinOpFullSig bofs2, CType type1, CType type2) 1158CType type = pArgument.Type; 1162CType nonNub = nub.UnderlyingType; 1303CType pArgumentType = pArgument.Type; 1304CType pRawType = pArgumentType.StripNubs(); 1398CType pArgumentType = pArgument.Type; 1399CType pRawType = pArgumentType.StripNubs(); 1412CType typeSig = null; 1539private int WhichUofsIsBetter(UnaOpFullSig uofs1, UnaOpFullSig uofs2, CType typeArg) 1611CType typeRaw = uofs.GetType().StripNubs(); 1630private Expr BindIncOpCore(ExpressionKind ek, EXPRFLAG flags, Expr exprVal, CType type) 1688private Expr LScalar(ExpressionKind ek, EXPRFLAG flags, Expr exprVal, CType type, ConstVal cv, CType typeTmp) 1690CType typeOne = type; 1710CType type = uofs.GetType(); 1767CType typeDec = GetPredefindType(PredefinedType.PT_DECIMAL); 1770CType typeRet; 1810CType typeDec = GetPredefindType(PredefinedType.PT_DECIMAL); 1874CType typeBool = GetPredefindType(PredefinedType.PT_BOOL); 1875CType typeRes = TypeManager.GetNullable(typeBool); 1916CType typeBool = GetPredefindType(PredefinedType.PT_BOOL); 1975CType RetType = null; 2023CType typeOp = GetPredefindType(ptOp); 2042CType nonNullableType1 = arg1.Type is NullableType arg1NubType ? arg1NubType.UnderlyingType : arg1.Type; 2043CType nonNullableType2 = arg2.Type is NullableType arg2NubType ? arg2NubType.UnderlyingType : arg2.Type; 2091CType typeEnum = ((ExprCast)arg).Argument.Type; 2100CType typeOp = GetPredefindType(ptOp); 2191CType typeOp = GetPredefindType(ptOp); 2202CType typeDest = kind.IsRelational() ? GetPredefindType(PredefinedType.PT_BOOL) : typeOp; 2245CType typeOp = GetPredefindType(ptOp); 2279CType typeDest = kind.IsRelational() ? GetPredefindType(PredefinedType.PT_BOOL) : op1.Type; 2337CType typeRet = pCall.Type; 2370private static AggregateType GetUserDefinedBinopArgumentType(CType type) 2385private static int GetUserDefinedBinopArgumentTypes(CType type1, CType type2, AggregateType[] rgats) 2414CType typeRet = TypeManager.SubstType(method.RetType, ats); 2472CType[] rgtype = new CType[2]; 2577CType typeRetRaw = TypeManager.SubstType(pmethBest.mpwi.Meth().RetType, pmethBest.mpwi.GetType()); 2583private ExprCall BindUDBinopCall(Expr arg1, Expr arg2, TypeArray Params, CType typeRet, MethPropWithInst mpwi) 2606CType typeRet; 2607CType typeRetRaw = TypeManager.SubstType(mpwi.Meth().RetType, mpwi.GetType()); 2680private static AggregateType GetEnumBinOpType(ExpressionKind ek, CType argType1, CType argType2, out AggregateType ppEnumType) 2722private static ExprBinOp CreateBinopForPredefMethodCall(ExpressionKind ek, PREDEFMETH predefMeth, CType RetType, Expr arg1, Expr arg2) 2737private static ExprUnaryOp CreateUnaryOpForPredefMethodCall(ExpressionKind ek, PREDEFMETH predefMeth, CType pRetType, Expr pArg)
Microsoft\CSharp\RuntimeBinder\Semantics\PredefinedMembers.cs (7)
231private static CType LoadTypeFromSignature(int[] signature, ref int indexIntoSignatures, TypeArray classTyVars) 261CType[] typeArgs = new CType[typeCount]; 281CType[] ptypes = new CType[count]; 337CType returnType = LoadTypeFromSignature(signature, ref index, classTyVars); 353private static MethodSymbol LookupMethodWhileLoading(AggregateSymbol type, int cMethodTyVars, Name methodName, ACCESS methodAccess, bool isStatic, bool isVirtual, CType returnType, TypeArray argumentTypes)
Microsoft\CSharp\RuntimeBinder\Semantics\SemanticChecker.cs (7)
24public static void CheckForStaticClass(CType type) 33public static ACCESSERROR CheckAccess2(Symbol symCheck, AggregateType atsCheck, Symbol symWhere, CType typeThru) 64CType type = symCheck.getType(); 83public static bool CheckTypeAccess(CType type, Symbol symWhere) 117private static ACCESSERROR CheckAccessCore(Symbol symCheck, AggregateType atsCheck, Symbol symWhere, CType typeThru) 254public static RuntimeBinderException ReportAccessError(SymWithType swtBad, Symbol symWhere, CType typeQual) 266public static bool CheckAccess(Symbol symCheck, AggregateType atsCheck, Symbol symWhere, CType typeThru) =>
Microsoft\CSharp\RuntimeBinder\Semantics\SubstitutionContext.cs (4)
10public readonly CType[] ClassTypes; 11public readonly CType[] MethodTypes; 17ClassTypes = typeArgsCls?.Items ?? Array.Empty<CType>(); 19MethodTypes = typeArgsMeth?.Items ?? Array.Empty<CType>();
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\EventSymbol.cs (1)
28public CType type; // Type of the event.
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\FieldSymbol.cs (2)
27public void SetType(CType pType) 32public new CType GetType()
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\LocalVariableSymbol.cs (2)
16public void SetType(CType pType) 21public new CType GetType()
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodOrPropertySymbol.cs (6)
39private CType[] _defaultParameterConstValTypes; 50public CType RetType; // Return type. 68_defaultParameterConstValTypes = Array.Empty<CType>(); 76_defaultParameterConstValTypes = new CType[count]; 130public void SetDefaultParameterValue(int index, CType type, ConstVal cv) 145public CType GetDefaultParameterValueConstValType(int index)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\Symbol.cs (1)
110public CType getType()
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolLoader.cs (20)
29foreach (CType iface in atsDer.IfacesAll.Items) 45public static bool IsBaseClassOfClass(CType pDerived, CType pBase) 56private static bool IsBaseClass(CType pDerived, CType pBase) 106public static bool HasIdentityOrImplicitReferenceConversion(CType pSource, CType pDest) 118private static bool AreTypesEqualForConversion(CType pType1, CType pType2) => pType1.Equals(pType2); 121private static bool HasArrayConversionToInterface(ArrayType pSource, CType pDest) 163private static bool HasImplicitReferenceConversion(CType pSource, CType pDest) 290private static bool HasAnyBaseInterfaceConversion(CType pDerived, CType pBase) 372CType pSourceArg = pSourceArgs[iParam]; 373CType pDestArg = pDestArgs[iParam]; 403private static bool HasImplicitBoxingConversion(CType pSource, CType pDest) 441public static bool HasBaseConversion(CType pSource, CType pDest)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactory.cs (1)
112public static LocalVariableSymbol CreateLocalVar(Name name, Scope parent, CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\VariableSymbol.cs (1)
17protected CType type; // CType of the field.
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayIndex.cs (1)
8public ExprArrayIndex(CType type, Expr array, Expr index)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayInitialization.cs (1)
8public ExprArrayInit(CType type, Expr arguments, Expr argumentDimensions, int[] dimensionSizes)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\BinaryOperator.cs (2)
10public ExprBinOp(ExpressionKind kind, CType type, Expr left, Expr right) 21public ExprBinOp(ExpressionKind kind, CType type, Expr left, Expr right, Expr call, MethPropWithInst userMethod)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Call.cs (1)
10public ExprCall(CType type, EXPRFLAG flags, Expr arguments, ExprMemberGroup member, MethWithInst method)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Cast.cs (1)
11public ExprCast(EXPRFLAG flags, CType type, Expr argument)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Class.cs (1)
10public ExprClass(CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\CompoundOperator.cs (2)
10public ExprMultiGet(CType type, EXPRFLAG flags, ExprMulti multi) 23public ExprMulti(CType type, EXPRFLAG flags, Expr left, Expr op)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Concatenate.cs (2)
21private static CType TypeFromOperands(Expr first, Expr second) 23CType type = first.Type;
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Constant.cs (1)
12public ExprConstant(CType type, ConstVal value)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\EXPR.cs (3)
11private CType _type; 20internal CType RuntimeObjectActualType { get; set; } 30public CType Type
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ExprOperator.cs (2)
10protected ExprOperator(ExpressionKind kind, CType type) 16protected ExprOperator(ExpressionKind kind, CType type, Expr call, MethPropWithInst userDefinedMethod)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ExprWithArgs.cs (1)
8protected ExprWithArgs(ExpressionKind kind, CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ExprWithType.cs (1)
10protected ExprWithType(ExpressionKind kind, CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Field.cs (1)
8public ExprField(CType type, Expr optionalObject, FieldWithType field)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\FieldInfo.cs (1)
10public ExprFieldInfo(FieldSymbol field, AggregateType fieldType, CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MemberGroup.cs (2)
11public ExprMemberGroup(EXPRFLAG flags, Name name, TypeArray typeArgs, SYMKIND symKind, CType parentType, Expr optionalObject, CMemberLookupResults memberLookupResults) 46public CType ParentType { get; }
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodInfo.cs (2)
13public ExprMethodInfo(CType type, MethodSymbol method, AggregateType methodType, TypeArray methodParameters) 34CType genericReturn = TypeManager.SubstType(methSym.RetType, aggType, methSym.typeVars);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Property.cs (1)
19public ExprProperty(CType type, Expr pOptionalObjectThrough, Expr pOptionalArguments, ExprMemberGroup pMemberGroup, PropWithType pwtSlot, MethWithType mwtSet)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\PropertyInfo.cs (1)
13public ExprPropertyInfo(CType type, PropertySymbol propertySymbol, AggregateType propertyType)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\TypeOf.cs (3)
10public ExprTypeOf(CType type, CType sourceType) 17public CType SourceType { get; }
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UnaryOperator.cs (2)
10public ExprUnaryOp(ExpressionKind kind, CType type, Expr operand) 18public ExprUnaryOp(ExpressionKind kind, CType type, Expr operand, Expr call, MethPropWithInst userMethod)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UserDefinedLogicalOperator.cs (1)
10public ExprUserLogicalOp(CType type, Expr trueFalseCall, ExprCall operatorCall)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (25)
103CType typeRet = TypeManager.SubstType(mwi.Meth().RetType, mwi.GetType(), mwi.TypeArgs); 407CType typeL = origL.Type; 408CType typeR = origR.Type; 414CType convertL = null; 415CType convertR = null; 668private Expr GenerateConversion(Expr arg, CType CType, bool bChecked) => 672private static Expr GenerateConversionWithSource(Expr pTarget, CType pType, bool bChecked) 683CType pStrippedTypeOfArgument = pArgument.Type.StripNubs(); 689private Expr GenerateUserDefinedConversion(Expr arg, CType type, MethWithInst method) 696private static Expr GenerateUserDefinedConversion(Expr arg, CType CType, Expr target, MethWithInst method) 708CType underlyingType = arg.Type.StripNubs().UnderlyingEnumType; 709CType nullableType = TypeManager.GetNullable(underlyingType); 719CType pMethodReturnType = TypeManager.SubstType(method.Meth().RetType, 788private static Expr GenerateParameter(string name, CType CType) 800private static ExprTypeOf CreateTypeOf(CType type) => ExprFactory.CreateTypeOf(type); 857CType intType = SymbolLoader.GetPredefindType(PredefinedType.PT_INT); 987CType fptype1 = method.Params[0]; 988CType fptype2 = method.Params[1]; 989CType aatype1 = orig1.Type; 990CType aatype2 = orig2.Type; 1000CType nubfptype1 = TypeManager.GetNullable(fptype1); 1001CType nubfptype2 = TypeManager.GetNullable(fptype2); 1017private static bool IsNullableValueType(CType pType) => 1026private static bool isEnumToDecimalConversion(CType argtype, CType desttype) =>
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ZeroInitialize.cs (1)
11public ExprZeroInit(CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (7)
36public static bool CheckConstraints(CType type, CheckConstraintsFlags flags) 104CType arg = typeArgsThis[i].GetNakedType(true); 150CType arg = typeArgs[i]; 162private static bool CheckSingleConstraint(Symbol symErr, TypeParameterType var, CType arg, TypeArray typeArgsCls, TypeArray typeArgsMeth, CheckConstraintsFlags flags) 211CType typeBnd = bnds[j]; 307private static bool SatisfiesBound(CType arg, CType typeBnd)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (3)
191List<CType> typeList = new List<CType>(); 321CType typeArg = typeArgs[i];
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ArrayType.cs (5)
16public ArrayType(CType elementType, int rank, bool isSZArray) 28public CType ElementType { get; } 31public CType BaseElementType 35CType type = ElementType; 59public override CType BaseOrParameterOrElementType => ElementType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullableType.cs (5)
22public NullableType(CType underlyingType) 32public override CType StripNubs() => UnderlyingType; 34public override CType StripNubs(out bool wasNullable) 40public CType UnderlyingType { get; } 54public override CType BaseOrParameterOrElementType => UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ParameterModifierType.cs (3)
20public ParameterModifierType(CType parameterType, bool isOut) 29public CType ParameterType { get; } 37public override CType BaseOrParameterOrElementType => ParameterType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PointerType.cs (3)
12public PointerType(CType referentType) 18public CType ReferentType { get; } 28public override CType BaseOrParameterOrElementType => ReferentType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\Type.cs (5)
28public virtual CType BaseOrParameterOrElementType => null; 44public CType GetNakedType(bool fStripNub) 46for (CType type = this; ;) 70public virtual CType StripNubs() => this; 72public virtual CType StripNubs(out bool wasNullable)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeArray.cs (18)
26private readonly CType[] _types; 29public TypeArrayKey(CType[] types) 33foreach (CType type in types) 47CType[] types = _types; 48CType[] otherTypes = other._types; 84public static readonly TypeArray Empty = new TypeArray(Array.Empty<CType>()); 86private TypeArray(CType[] types) 94public CType[] Items { get; } 96public CType this[int i] => Items[i]; 105public void CopyItems(int i, int c, CType[] dest) => Array.Copy(Items, i, dest, 0, c); 119CType[] types = array.Items; 120CType[] newTypes = new CType[ctype]; 125public static TypeArray Allocate(params CType[] types) 145CType[] prgtype1 = pta1.Items; 151CType[] prgtype2 = pta2.Items; 157CType[] combined = new CType[prgtype1.Length + prgtype2.Length];
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (51)
67public static ArrayType GetArray(CType elementType, int args, bool isSZArray) 135public static PointerType GetPointer(CType baseType) 150public static NullableType GetNullable(CType pUnderlyingType) 164public static ParameterModifierType GetParameterModifier(CType paramType, bool isOut) 182private static CType SubstType(CType typeSrc, TypeArray typeArgsCls, TypeArray typeArgsMeth, bool denormMeth) 197private static CType SubstType(CType typeSrc, TypeArray typeArgsCls, TypeArray typeArgsMeth) => 204CType[] srcs = taSrc.Items; 207CType src = srcs[i]; 208CType dst = SubstTypeCore(src, ctx); 211CType[] dsts = new CType[srcs.Length]; 249private static CType SubstTypeCore(CType type, SubstContext pctx) 251CType typeSrc; 252CType typeDst; 313public static bool SubstEqualTypes(CType typeDst, CType typeSrc, TypeArray typeArgsCls, TypeArray typeArgsMeth, bool denormMeth) 360private static bool SubstEqualTypesCore(CType typeDst, CType typeSrc, SubstContext pctx) 458public static bool TypeContainsType(CType type, CType typeFind) 501public static bool TypeContainsTyVars(CType type, TypeArray typeVars) 552public static CType SubstType(CType typeSrc, SubstContext pctx) => 555public static CType SubstType(CType typeSrc, AggregateType atsCls) => SubstType(typeSrc, atsCls, null); 557public static CType SubstType(CType typeSrc, AggregateType atsCls, TypeArray typeArgsMeth) => 560public static CType SubstType(CType typeSrc, CType typeCls, TypeArray typeArgsMeth) => 568private static bool SubstEqualTypes(CType typeDst, CType typeSrc, CType typeCls, TypeArray typeArgsMeth) => 571public static bool SubstEqualTypes(CType typeDst, CType typeSrc, CType typeCls) => SubstEqualTypes(typeDst, typeSrc, typeCls, null); 587internal static CType GetBestAccessibleType(AggregateSymbol context, CType typeSrc) 612if ((aggSrc.IsInterfaceType || aggSrc.IsDelegateType) && TryVarianceAdjustmentToGetAccessibleType(context, aggSrc, out CType typeDst)) 643if (TryArrayVarianceAdjustmentToGetAccessibleType(context, arrSrc, out CType typeDst)) 664private static bool TryVarianceAdjustmentToGetAccessibleType(AggregateSymbol context, AggregateType typeSrc, out CType typeDst) 683CType[] newTypeArgsTemp = new CType[typeArgs.Count]; 687CType typeArg = typeArgs[i]; 709CType intermediateType = GetAggregate(aggSym, typeSrc.OuterType, newTypeArgs); 725private static bool TryArrayVarianceAdjustmentToGetAccessibleType(AggregateSymbol context, ArrayType typeSrc, out CType typeDst) 733CType elementType = typeSrc.ElementType; 737CType destElement = GetBestAccessibleType(context, elementType);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeTable.cs (20)
54private static readonly Dictionary<KeyPair<CType, int>, ArrayType> s_arrayTable = 55new Dictionary<KeyPair<CType, int>, ArrayType>(); 57private static readonly Dictionary<KeyPair<CType, bool>, ParameterModifierType> s_parameterModifierTable = 58new Dictionary<KeyPair<CType, bool>, ParameterModifierType>(); 61private static readonly Dictionary<CType, PointerType> s_pointerTable = new Dictionary<CType, PointerType>(); 62private static readonly Dictionary<CType, NullableType> s_nullableTable = new Dictionary<CType, NullableType>(); 82public static ArrayType LookupArray(CType elementType, int rankNum) 85s_arrayTable.TryGetValue(new KeyPair<CType, int>(elementType, rankNum), out ArrayType result); 89public static void InsertArray(CType elementType, int rankNum, ArrayType pArray) 93s_arrayTable.Add(new KeyPair<CType, int>(elementType, rankNum), pArray); 96public static ParameterModifierType LookupParameterModifier(CType elementType, bool isOut) 99s_parameterModifierTable.TryGetValue(new KeyPair<CType, bool>(elementType, isOut), out ParameterModifierType result); 103public static void InsertParameterModifier(CType elementType, bool isOut, ParameterModifierType parameterModifier) 107s_parameterModifierTable.Add(new KeyPair<CType, bool>(elementType, isOut), parameterModifier); 110public static PointerType LookupPointer(CType elementType) 116public static void InsertPointer(CType elementType, PointerType pointer) 122public static NullableType LookupNullable(CType underlyingType) 128public static void InsertNullable(CType underlyingType, NullableType nullable)
Microsoft\CSharp\RuntimeBinder\Semantics\UnaOpSig.cs (3)
36private readonly CType _type; 38public UnaOpFullSig(CType type, PfnBindUnaOp pfn, LiftFlags grflt, UnaOpFuncKind fnkind) 87public new CType GetType()
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (32)
100CType type = callingObject.Type; 174CType cType = GetCTypeFromType(type); 304CType[] ctypes = new CType[genericArguments.Length]; 333List<CType> ctypes = new List<CType>(); 358CType ctype; 581private static CType LoadSymbolsFromType(Type type) 608CType ctype = ProcessSpecialTypeInChain(current, t); 666private static CType GetConstructedType(Type type, AggregateSymbol agg) 672List<CType> types = new List<CType>(); 683CType ctype = agg.getThisType(); 689private static CType ProcessSpecialTypeInChain(NamespaceOrAggregateSymbol parent, Type t) 809internal static CType[] GetCTypeArrayFromTypes(Type[] types) 816return Array.Empty<CType>(); 819CType[] ctypes = new CType[length]; 832internal static CType GetCTypeFromType(Type type) => type.IsByRef 1118CType addedFieldType = addedField?.GetType(); 1486CType cvType = SymbolLoader.GetPredefindType(PredefinedType.PT_DATETIME); 1496CType cvType = SymbolLoader.GetPredefindType(PredefinedType.PT_DECIMAL); 1505CType cvType = SymbolLoader.GetPredefindType(PredefinedType.PT_OBJECT); 1612CType[] types = new CType[isVarArg ? parameters.Length + 1 : parameters.Length]; 1630private static CType GetTypeOfParameter(ParameterInfo p, MemberInfo m) 1633CType ctype; 1647CType parameterType = mod.ParameterType; 1709CType t = GetCTypeFromType(baseMemberInfo.DeclaringType); 1766CType t = GetCTypeFromType(type); 1770CType endT; 1780foreach (CType bound in paramType.Bounds.Items)