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