219 references to Count
Microsoft.CSharp (219)
Microsoft\CSharp\RuntimeBinder\Errors\UserStringBuilder.cs (5)
79for (int i = 0; i < @params.Count; i++) 86if (isParamArray && i == @params.Count - 1) 136if (pctx != null && !pctx.IsNop && parent is AggregateSymbol agg && 0 != agg.GetTypeVarsAll().Count) 151if (@params != null && @params.Count != 0) 155for (int i = 1; i < @params.Count; i++)
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (2)
834if ((payload.Name.StartsWith("set_", StringComparison.Ordinal) && ((MethodSymbol)swt.Sym).Params.Count > 1) || 835(payload.Name.StartsWith("get_", StringComparison.Ordinal) && ((MethodSymbol)swt.Sym).Params.Count > 0))
Microsoft\CSharp\RuntimeBinder\Semantics\Binding\Better.cs (15)
60if (mpwi1.TypeArgs.Count != 0) 62if (mpwi2.TypeArgs.Count == 0) 67else if (mpwi2.TypeArgs.Count != 0) 111if (ta1.Count != ta2.Count) 114return ta1.Count > ta2.Count ? BetterType.Left : BetterType.Right; 119for (int i = 0; i < ta1.Count; i++) 208for (int i = pta.Count; i < args.carg; i++) 222CType[] typeList = new CType[pta.Count]; 226for (int iParam = 0; iParam < pta.Count; iParam++) 366if (pta1.Count != pta2.Count && betterMethod == BetterType.Neither) 384if (pta1.Count == carg) 389if (pta2.Count == carg)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (1)
740if (convCur.Params.Count != 1)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs (7)
138if (typeArgsAll.Count != 1) 169if (!arrayDest.IsSZArray || !typeSrc.IsInterfaceType || aggtypeSrc.TypeArgsAll.Count != 1) 245Debug.Assert(pTypeParams.Count == pSourceArgs.Count); 246Debug.Assert(pTypeParams.Count == pTargetArgs.Count); 248for (int iParam = 0; iParam < pTypeParams.Count; ++iParam)
Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs (2)
240|| !aggDest.IsInterfaceType || aggDest.TypeArgsAll.Count != 1) 281if (!arrayDest.IsSZArray || !(_typeSrc is AggregateType aggSrc) || !aggSrc.IsInterfaceType || aggSrc.TypeArgsAll.Count != 1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (16)
477Debug.Assert(pwt.Prop().Params.Count == 0 || pwt.Prop() is IndexerSymbol); 605if (!methCur.isOperator || methCur.Params.Count != 1) 610Debug.Assert(methCur.typeVars.Count == 0); 1109int paramCount = mp.Params.Count; 1139if (paramCount == 1 && mp.isParamArray && argCount > mp.Params.Count) 1161Debug.Assert(index != mp.Params.Count); 1166mp.isParamArray && index == mp.Params.Count - 1) 1176CType arrayType = (ArrayType)TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs); 1203if (mp.isParamArray && paramCount == 1 && argCount >= mp.Params.Count) 1243CType substitutedArrayType = TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs); 1371if (count < @params.Count - 1) 1376prgtype = new CType[@params.Count - 1]; 1377@params.CopyItems(0, @params.Count - 1, prgtype); 1383@params.CopyItems(0, @params.Count - 1, prgtype); 1385CType type = @params[@params.Count - 1]; 1397for (int itype = @params.Count - 1; itype < count; itype++)
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (29)
125CMemberLookupResults.CMethodIterator iterator = _pGroup.MemberLookupResults.GetMethodIterator(GetTypeQualifier(_pGroup), _pExprBinder.ContextForMemberLookup, _pGroup.TypeArgs.Count, _pGroup.Flags, mask, _namedArgumentsKind == NamedArgumentsKind.NonTrailing ? _pOriginalArguments : null); 183if (_pCurrentParameters.Count != _pArguments.carg) 332pAmbig1.mpwi.MethProp().Params.Count != pAmbig2.mpwi.MethProp().Params.Count || 378int numParameters = _pCurrentParameters.Count; 403int numParameters = pCurrentParameters.Count; 418if (index >= pCurrentParameters.Count) 452else if (paramArrayArgument != null && index == methprop.Params.Count - 1) 467CType[] prgTypes = new CType[pCurrentParameters.Count]; 480pArguments.carg = pCurrentParameters.Count; 668if (_pCurrentParameters.Count <= _pArguments.carg) 689Expr[] pArguments = new Expr[_pCurrentParameters.Count - i]; 690for (; i < @params.Count; i++, index++) 706CType[] prgTypes = new CType[@params.Count]; 707for (int n = 0; n < @params.Count; n++) 712_pArguments.carg = @params.Count; 840for (int i = _pArguments.carg; i < _pCurrentSym.Params.Count; i++) 847if (_pArguments.carg + numOptionals < _pCurrentParameters.Count - 1) 864if (_pCurrentSym is MethodSymbol methSym && methSym.typeVars.Count != typeArgs.Count) 867if (typeArgs.Count > 0) 875Debug.Assert(methSym.typeVars.Count > 0); 890if (pTypeVars != null && _pCurrentTypeArgs != null && pTypeVars.Count == _pCurrentTypeArgs.Count) 1017for (int iParam = 0; iParam < _pCurrentParameters.Count; ++iParam) 1051for (int i = 0; i < typeVars.Count; i++) 1078Debug.Assert(_pGroup.TypeArgs.Count == 0 || _pGroup.SymKind == SYMKIND.SK_MethodSymbol); 1085if (_results.BestResult.TypeArgs.Count > 0) 1183int 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)
497aggDest.TypeArgsAll.Count == 1 &&
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs (9)
124if (_arity > 0 && (!(symCur is MethodSymbol curMeth) || curMeth.typeVars.Count != _arity)) 148(!symCur.name.Text.StartsWith("set_", StringComparison.Ordinal) || meth.Params.Count <= 1) && 149(!symCur.name.Text.StartsWith("get_", StringComparison.Ordinal) || meth.Params.Count <= 0)) 408Debug.Assert(typeStart != null || types.Count != 0); 418for (int i = 0; i < types.Count; i++) 461if (itypeNext >= types.Count) 558AggregateType typeCls2 = typeIface != null || ifaces.Count > 0 566if ((typeIface != null || ifaces.Count > 0) && LookupInInterfaces(typeIface, ifaces) && typeCls2 != null) 650int cvar = badMeth.typeVars.Count;
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookupResults.cs (1)
27Debug.Assert(containingTypes.Count != 0);
Microsoft\CSharp\RuntimeBinder\Semantics\MethodIterator.cs (3)
32Debug.Assert(containingTypes.Count != 0); 75if (_arity > 0 & _mask == symbmask_t.MASK_MethodSymbol && ((MethodSymbol)CurrentSymbol).typeVars.Count != _arity) 155if (_currentTypeIndex >= _containingTypes.Count)
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (52)
92Debug.Assert(pMethod.typeVars.Count > 0); 95if (pMethodFormalParameterTypes.Count == 0 || pMethod.InferenceMustFail()) 101Debug.Assert(pMethodArguments.carg <= pMethodFormalParameterTypes.Count); 127_pFixedResults = new CType[pMethodTypeParameters.Count]; 128_pLowerBounds = new List<CType>[pMethodTypeParameters.Count]; 129_pUpperBounds = new List<CType>[pMethodTypeParameters.Count]; 130_pExactBounds = new List<CType>[pMethodTypeParameters.Count]; 131for (int iBound = 0; iBound < pMethodTypeParameters.Count; ++iBound) 149Debug.Assert(iParam < _pMethodTypeParameters.Count); 168for (int iParam = 0; iParam < _pMethodTypeParameters.Count; ++iParam) 219Debug.Assert(iParam < _pMethodTypeParameters.Count); 257Debug.Assert(_pMethodArguments.carg <= _pMethodFormalParameterTypes.Count); 479bool[] pNeedsFixing = new bool[_pMethodTypeParameters.Count]; 482for (iParam = 0; iParam < _pMethodTypeParameters.Count; iParam++) 490for (iParam = 0; iParam < _pMethodTypeParameters.Count; iParam++) 517bool[] pNeedsFixing = new bool[_pMethodTypeParameters.Count]; 520for (iParam = 0; iParam < _pMethodTypeParameters.Count; iParam++) 528for (iParam = 0; iParam < _pMethodTypeParameters.Count; iParam++) 581_ppDependencies = new Dependency[_pMethodTypeParameters.Count][]; 582for (int iParam = 0; iParam < _pMethodTypeParameters.Count; ++iParam) 584_ppDependencies[iParam] = new Dependency[_pMethodTypeParameters.Count]; 600Debug.Assert(0 <= iParam && iParam < _pMethodTypeParameters.Count); 601Debug.Assert(0 <= jParam && jParam < _pMethodTypeParameters.Count); 616Debug.Assert(0 <= iParam && iParam < _pMethodTypeParameters.Count); 617Debug.Assert(0 <= jParam && jParam < _pMethodTypeParameters.Count); 627for (int kParam = 0; kParam < _pMethodTypeParameters.Count; ++kParam) 657for (int iParam = 0; iParam < _pMethodTypeParameters.Count; ++iParam) 659for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 679for (int iParam = 0; iParam < _pMethodTypeParameters.Count; ++iParam) 681for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 696for (int iParam = 0; iParam < _pMethodTypeParameters.Count; ++iParam) 698for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 717for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 729Debug.Assert(0 <= iParam && iParam < _pMethodTypeParameters.Count); 730for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 744Debug.Assert(0 <= iParam && iParam < _pMethodTypeParameters.Count); 745for (int jParam = 0; jParam < _pMethodTypeParameters.Count; ++jParam) 881Debug.Assert(pSourceArgs.Count == pDestArgs.Count); 883for (int arg = 0; arg < pSourceArgs.Count; ++arg) 1079if (pDestArgs.Count == 0) 1246Debug.Assert(pTypeParams.Count == pSourceArgs.Count); 1247Debug.Assert(pTypeParams.Count == pDestArgs.Count); 1249for (int arg = 0; arg < pSourceArgs.Count; ++arg) 1409if (pSourceArgs.Count == 0) 1553Debug.Assert(pTypeParams.Count == pSourceArgs.Count); 1554Debug.Assert(pTypeParams.Count == pDestArgs.Count); 1556for (int arg = 0; arg < pSourceArgs.Count; ++arg)
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (3)
2396Debug.Assert(pCall.MethWithInst.Meth().Params.Count == 2); 2513if (!method.isOperator || method.Params.Count != 2) 2517Debug.Assert(method.typeVars.Count == 0);
Microsoft\CSharp\RuntimeBinder\Semantics\PredefinedMembers.cs (2)
259int typeCount = agg.GetTypeVars().Count; 373methsym.typeVars.Count == cMethodTyVars &&
Microsoft\CSharp\RuntimeBinder\Semantics\SemanticChecker.cs (2)
76if (atsCheck.TypeArgsAll.Count > 0) 110for (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)
165Debug.Assert(atsDest.TypeArgsAll.Count == 1); 380Debug.Assert(pTypeParams.Count == pSourceArgs.Count); 381Debug.Assert(pTypeParams.Count == pDestArgs.Count); 383for (int iParam = 0; iParam < pTypeParams.Count; ++iParam)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodInfo.cs (6)
58m.GetParameters().Length == genericParams.Count && 63for (int i = 0; i < genericParams.Count; i++) 76int size = Method.TypeArgs?.Count ?? 0; 80for (int i = 0; i < Method.TypeArgs.Count; i++) 126Debug.Assert(c.GetParameters() == null || c.GetParameters().Length == genericInstanceParams.Count); 130for (int i = 0; i < genericInstanceParams.Count; i++)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\PropertyInfo.cs (2)
54(p.GetIndexParameters() == null || p.GetIndexParameters().Length == genericInstanceParams.Count)); 59for (int i = 0; i < genericInstanceParams.Count; i++)
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (14)
53if (ats.TypeArgsAll.Count == 0) 80Debug.Assert(typeVars.Count == typeArgsThis.Count); 93if (typeVars.Count > 0) 103for (int i = 0; i < typeArgsThis.Count; i++) 128Debug.Assert(mwi.Meth().typeVars.Count == mwi.TypeArgs.Count); 131if (mwi.TypeArgs.Count > 0) 145Debug.Assert(typeVars.Count == typeArgs.Count); 146Debug.Assert(typeVars.Count > 0); 149for (int i = 0; i < typeVars.Count; i++) 207if (bnds.Count != 0 && bnds[0].IsPredefType(PredefinedType.PT_VALUE)) 213for (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)
97Debug.Assert(agg.GetTypeVars().Count == typeArgs.Count); 118Debug.Assert(typeArgsAll != null && typeArgsAll.Count == agg.GetTypeVarsAll().Count); 120if (typeArgsAll.Count == 0) 128int cvarOuter = aggOuter.GetTypeVarsAll().Count; 129Debug.Assert(cvarOuter <= typeArgsAll.Count); 132TypeArray typeArgsInner = TypeArray.Allocate(agg.GetTypeVars().Count, typeArgsAll, cvarOuter); 212if (taSrc != null && taSrc.Count != 0 && ctx != null && !ctx.IsNop) 239=> taSrc == null || taSrc.Count == 0 250if (args.Count > 0) 354if (taDst.Count != taSrc.Count) 356if (taDst.Count == 0) 366for (int i = 0; i < taDst.Count; i++) 428Debug.Assert(atsSrc.TypeArgsAll.Count == atsDst.TypeArgsAll.Count); 431for (int i = 0; i < atsSrc.TypeArgsAll.Count; i++) 503for (int i = 0; i < ats.TypeArgsAll.Count; i++) 541for (int i = 0; i < ats.TypeArgsAll.Count; i++) 552if (typeVars != null && typeVars.Count > 0) 555return ivar < typeVars.Count && type == typeVars[ivar]; 710CType[] newTypeArgsTemp = new CType[typeArgs.Count];
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (4)
342int outerParameters = agg.isNested() ? agg.GetOuterAgg().GetTypeVarsAll().Count : 0; 958for (int i = 0; i < agg.GetTypeVars().Count; i++) 1278if (isIndexer || prop.GetterMethod.Params.Count == 0) 1299if (isIndexer || prop.SetterMethod.Params.Count == 1)