219 references to Count
Microsoft.CSharp (219)
Microsoft\CSharp\RuntimeBinder\Errors\UserStringBuilder.cs (5)
77for (int i = 0; i < @params.Count; i++) 84if (isParamArray && i == @params.Count - 1) 132if (pctx != null && !pctx.IsNop && parent is AggregateSymbol agg && 0 != agg.GetTypeVarsAll().Count) 146if (@params != null && @params.Count != 0) 150for (int i = 1; i < @params.Count; i++)
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (2)
812if ((payload.Name.StartsWith("set_", StringComparison.Ordinal) && ((MethodSymbol)swt.Sym).Params.Count > 1) || 813(payload.Name.StartsWith("get_", StringComparison.Ordinal) && ((MethodSymbol)swt.Sym).Params.Count > 0))
Microsoft\CSharp\RuntimeBinder\Semantics\Binding\Better.cs (15)
59if (mpwi1.TypeArgs.Count != 0) 61if (mpwi2.TypeArgs.Count == 0) 66else if (mpwi2.TypeArgs.Count != 0) 110if (ta1.Count != ta2.Count) 113return ta1.Count > ta2.Count ? BetterType.Left : BetterType.Right; 118for (int i = 0; i < ta1.Count; i++) 206for (int i = pta.Count; i < args.carg; i++) 220CType[] typeList = new CType[pta.Count]; 224for (int iParam = 0; iParam < pta.Count; iParam++) 363if (pta1.Count != pta2.Count && betterMethod == BetterType.Neither) 381if (pta1.Count == carg) 386if (pta2.Count == carg)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (1)
713if (convCur.Params.Count != 1)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs (7)
136if (typeArgsAll.Count != 1) 167if (!arrayDest.IsSZArray || !typeSrc.IsInterfaceType || aggtypeSrc.TypeArgsAll.Count != 1) 241Debug.Assert(pTypeParams.Count == pSourceArgs.Count); 242Debug.Assert(pTypeParams.Count == pTargetArgs.Count); 244for (int iParam = 0; iParam < pTypeParams.Count; ++iParam)
Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs (2)
239|| !aggDest.IsInterfaceType || aggDest.TypeArgsAll.Count != 1) 280if (!arrayDest.IsSZArray || !(_typeSrc is AggregateType aggSrc) || !aggSrc.IsInterfaceType || aggSrc.TypeArgsAll.Count != 1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (16)
466Debug.Assert(pwt.Prop().Params.Count == 0 || pwt.Prop() is IndexerSymbol); 593if (!methCur.isOperator || methCur.Params.Count != 1) 598Debug.Assert(methCur.typeVars.Count == 0); 1084int paramCount = mp.Params.Count; 1114if (paramCount == 1 && mp.isParamArray && argCount > mp.Params.Count) 1136Debug.Assert(index != mp.Params.Count); 1141mp.isParamArray && index == mp.Params.Count - 1) 1151CType arrayType = (ArrayType)TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs); 1178if (mp.isParamArray && paramCount == 1 && argCount >= mp.Params.Count) 1218CType substitutedArrayType = TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs); 1345if (count < @params.Count - 1) 1350prgtype = new CType[@params.Count - 1]; 1351@params.CopyItems(0, @params.Count - 1, prgtype); 1357@params.CopyItems(0, @params.Count - 1, prgtype); 1359CType type = @params[@params.Count - 1]; 1371for (int itype = @params.Count - 1; itype < count; itype++)
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (29)
124CMemberLookupResults.CMethodIterator iterator = _pGroup.MemberLookupResults.GetMethodIterator(GetTypeQualifier(_pGroup), _pExprBinder.ContextForMemberLookup, _pGroup.TypeArgs.Count, _pGroup.Flags, mask, _namedArgumentsKind == NamedArgumentsKind.NonTrailing ? _pOriginalArguments : null); 182if (_pCurrentParameters.Count != _pArguments.carg) 331pAmbig1.mpwi.MethProp().Params.Count != pAmbig2.mpwi.MethProp().Params.Count || 377int numParameters = _pCurrentParameters.Count; 402int numParameters = pCurrentParameters.Count; 417if (index >= pCurrentParameters.Count) 451else if (paramArrayArgument != null && index == methprop.Params.Count - 1) 466CType[] prgTypes = new CType[pCurrentParameters.Count]; 479pArguments.carg = pCurrentParameters.Count; 667if (_pCurrentParameters.Count <= _pArguments.carg) 688Expr[] pArguments = new Expr[_pCurrentParameters.Count - i]; 689for (; i < @params.Count; i++, index++) 705CType[] prgTypes = new CType[@params.Count]; 706for (int n = 0; n < @params.Count; n++) 711_pArguments.carg = @params.Count; 839for (int i = _pArguments.carg; i < _pCurrentSym.Params.Count; i++) 846if (_pArguments.carg + numOptionals < _pCurrentParameters.Count - 1) 863if (_pCurrentSym is MethodSymbol methSym && methSym.typeVars.Count != typeArgs.Count) 866if (typeArgs.Count > 0) 874Debug.Assert(methSym.typeVars.Count > 0); 889if (pTypeVars != null && _pCurrentTypeArgs != null && pTypeVars.Count == _pCurrentTypeArgs.Count) 1016for (int iParam = 0; iParam < _pCurrentParameters.Count; ++iParam) 1050for (int i = 0; i < typeVars.Count; i++) 1077Debug.Assert(_pGroup.TypeArgs.Count == 0 || _pGroup.SymKind == SYMKIND.SK_MethodSymbol); 1084if (_results.BestResult.TypeArgs.Count > 0) 1182int cvar = _mwtBadArity.Meth().typeVars.Count;
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinderResult.cs (5)
32for (int i = 0; i < pTypeArgs.Count; i++) 50int max = pTypeArgs1.Count > pTypeArgs2.Count ? pTypeArgs2.Count : pTypeArgs1.Count;
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (1)
495aggDest.TypeArgsAll.Count == 1 &&
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs (9)
123if (_arity > 0 && (!(symCur is MethodSymbol curMeth) || curMeth.typeVars.Count != _arity)) 147(!symCur.name.Text.StartsWith("set_", StringComparison.Ordinal) || meth.Params.Count <= 1) && 148(!symCur.name.Text.StartsWith("get_", StringComparison.Ordinal) || meth.Params.Count <= 0)) 407Debug.Assert(typeStart != null || types.Count != 0); 417for (int i = 0; i < types.Count; i++) 460if (itypeNext >= types.Count) 557AggregateType typeCls2 = typeIface != null || ifaces.Count > 0 565if ((typeIface != null || ifaces.Count > 0) && LookupInInterfaces(typeIface, ifaces) && typeCls2 != null) 649int cvar = badMeth.typeVars.Count;
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookupResults.cs (1)
25Debug.Assert(containingTypes.Count != 0);
Microsoft\CSharp\RuntimeBinder\Semantics\MethodIterator.cs (3)
31Debug.Assert(containingTypes.Count != 0); 74if (_arity > 0 & _mask == symbmask_t.MASK_MethodSymbol && ((MethodSymbol)CurrentSymbol).typeVars.Count != _arity) 154if (_currentTypeIndex >= _containingTypes.Count)
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (52)
91Debug.Assert(pMethod.typeVars.Count > 0); 94if (pMethodFormalParameterTypes.Count == 0 || pMethod.InferenceMustFail()) 100Debug.Assert(pMethodArguments.carg <= pMethodFormalParameterTypes.Count); 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]; 130for (int iBound = 0; iBound < pMethodTypeParameters.Count; ++iBound) 148Debug.Assert(iParam < _pMethodTypeParameters.Count); 167for (int iParam = 0; iParam < _pMethodTypeParameters.Count; ++iParam) 218Debug.Assert(iParam < _pMethodTypeParameters.Count); 256Debug.Assert(_pMethodArguments.carg <= _pMethodFormalParameterTypes.Count); 478bool[] pNeedsFixing = new bool[_pMethodTypeParameters.Count]; 481for (iParam = 0; iParam < _pMethodTypeParameters.Count; iParam++) 489for (iParam = 0; iParam < _pMethodTypeParameters.Count; iParam++) 516bool[] pNeedsFixing = new bool[_pMethodTypeParameters.Count]; 519for (iParam = 0; iParam < _pMethodTypeParameters.Count; iParam++) 527for (iParam = 0; iParam < _pMethodTypeParameters.Count; iParam++) 580_ppDependencies = new Dependency[_pMethodTypeParameters.Count][]; 581for (int iParam = 0; iParam < _pMethodTypeParameters.Count; ++iParam) 583_ppDependencies[iParam] = new Dependency[_pMethodTypeParameters.Count]; 599Debug.Assert(0 <= iParam && iParam < _pMethodTypeParameters.Count); 600Debug.Assert(0 <= jParam && jParam < _pMethodTypeParameters.Count); 615Debug.Assert(0 <= iParam && iParam < _pMethodTypeParameters.Count); 616Debug.Assert(0 <= jParam && jParam < _pMethodTypeParameters.Count); 626for (int kParam = 0; kParam < _pMethodTypeParameters.Count; ++kParam) 656for (int iParam = 0; iParam < _pMethodTypeParameters.Count; ++iParam) 658for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 678for (int iParam = 0; iParam < _pMethodTypeParameters.Count; ++iParam) 680for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 695for (int iParam = 0; iParam < _pMethodTypeParameters.Count; ++iParam) 697for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 716for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 728Debug.Assert(0 <= iParam && iParam < _pMethodTypeParameters.Count); 729for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 743Debug.Assert(0 <= iParam && iParam < _pMethodTypeParameters.Count); 744for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 880Debug.Assert(pSourceArgs.Count == pDestArgs.Count); 882for (int arg = 0; arg < pSourceArgs.Count; ++arg) 1078if (pDestArgs.Count == 0) 1245Debug.Assert(pTypeParams.Count == pSourceArgs.Count); 1246Debug.Assert(pTypeParams.Count == pDestArgs.Count); 1248for (int arg = 0; arg < pSourceArgs.Count; ++arg) 1408if (pSourceArgs.Count == 0) 1552Debug.Assert(pTypeParams.Count == pSourceArgs.Count); 1553Debug.Assert(pTypeParams.Count == pDestArgs.Count); 1555for (int arg = 0; arg < pSourceArgs.Count; ++arg)
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (3)
2339Debug.Assert(pCall.MethWithInst.Meth().Params.Count == 2); 2453if (!method.isOperator || method.Params.Count != 2) 2457Debug.Assert(method.typeVars.Count == 0);
Microsoft\CSharp\RuntimeBinder\Semantics\PredefinedMembers.cs (2)
255int typeCount = agg.GetTypeVars().Count; 364methsym.typeVars.Count == cMethodTyVars &&
Microsoft\CSharp\RuntimeBinder\Semantics\SemanticChecker.cs (2)
74if (atsCheck.TypeArgsAll.Count > 0) 107for (int i = 0; i < typeArgs.Count; i++)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodOrPropertySymbol.cs (3)
63int count = value.Count; 92Debug.Assert(index < Params.Count); 125Debug.Assert(index < Params.Count);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodSymbol.cs (3)
42for (int ivar = 0; ivar < typeVars.Count; ivar++) 48if (ipar >= Params.Count) 74Params.Count == 1 &&
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolLoader.cs (6)
157Debug.Assert(atsDest.TypeArgsAll.Count == 1); 367Debug.Assert(pTypeParams.Count == pSourceArgs.Count); 368Debug.Assert(pTypeParams.Count == pDestArgs.Count); 370for (int iParam = 0; iParam < pTypeParams.Count; ++iParam)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodInfo.cs (6)
57m.GetParameters().Length == genericParams.Count && 62for (int i = 0; i < genericParams.Count; i++) 75int size = Method.TypeArgs?.Count ?? 0; 79for (int i = 0; i < Method.TypeArgs.Count; i++) 125Debug.Assert(c.GetParameters() == null || c.GetParameters().Length == genericInstanceParams.Count); 129for (int i = 0; i < genericInstanceParams.Count; i++)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\PropertyInfo.cs (2)
53(p.GetIndexParameters() == null || p.GetIndexParameters().Length == genericInstanceParams.Count)); 58for (int i = 0; i < genericInstanceParams.Count; i++)
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (14)
52if (ats.TypeArgsAll.Count == 0) 79Debug.Assert(typeVars.Count == typeArgsThis.Count); 92if (typeVars.Count > 0) 102for (int i = 0; i < typeArgsThis.Count; i++) 126Debug.Assert(mwi.Meth().typeVars.Count == mwi.TypeArgs.Count); 129if (mwi.TypeArgs.Count > 0) 142Debug.Assert(typeVars.Count == typeArgs.Count); 143Debug.Assert(typeVars.Count > 0); 146for (int i = 0; i < typeVars.Count; i++) 203if (bnds.Count != 0 && bnds[0].IsPredefType(PredefinedType.PT_VALUE)) 209for (int j = itypeMin; j < bnds.Count; j++)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (1)
317Type[] systemTypeArgs = new Type[typeArgs.Count];
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeArray.cs (2)
101Debug.Assert(Count >= 0); 114if (ctype == array.Count)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (23)
95Debug.Assert(agg.GetTypeVars().Count == typeArgs.Count); 115Debug.Assert(typeArgsAll != null && typeArgsAll.Count == agg.GetTypeVarsAll().Count); 117if (typeArgsAll.Count == 0) 125int cvarOuter = aggOuter.GetTypeVarsAll().Count; 126Debug.Assert(cvarOuter <= typeArgsAll.Count); 129TypeArray typeArgsInner = TypeArray.Allocate(agg.GetTypeVars().Count, typeArgsAll, cvarOuter); 202if (taSrc != null && taSrc.Count != 0 && ctx != null && !ctx.IsNop) 228=> taSrc == null || taSrc.Count == 0 237if (args.Count > 0) 339if (taDst.Count != taSrc.Count) 341if (taDst.Count == 0) 351for (int i = 0; i < taDst.Count; i++) 413Debug.Assert(atsSrc.TypeArgsAll.Count == atsDst.TypeArgsAll.Count); 416for (int i = 0; i < atsSrc.TypeArgsAll.Count; i++) 488for (int i = 0; i < ats.TypeArgsAll.Count; i++) 526for (int i = 0; i < ats.TypeArgsAll.Count; i++) 537if (typeVars != null && typeVars.Count > 0) 540return ivar < typeVars.Count && type == typeVars[ivar]; 683CType[] newTypeArgsTemp = new CType[typeArgs.Count];
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (4)
334int outerParameters = agg.isNested() ? agg.GetOuterAgg().GetTypeVarsAll().Count : 0; 938for (int i = 0; i < agg.GetTypeVars().Count; i++) 1253if (isIndexer || prop.GetterMethod.Params.Count == 0) 1274if (isIndexer || prop.SetterMethod.Params.Count == 1)