10 overrides of ParameterCount
Microsoft.CodeAnalysis.CSharp (10)
Lowering\SynthesizedMethodBaseSymbol.cs (1)
102internal override int ParameterCount
Symbols\ErrorMethodSymbol.cs (1)
138internal override int ParameterCount
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
634internal override int ParameterCount
Symbols\ReducedExtensionMethodSymbol.cs (1)
508internal override int ParameterCount
Symbols\Source\SourceConstructorSymbolBase.cs (1)
110internal sealed override int ParameterCount
Symbols\Source\SourceDestructorSymbol.cs (1)
99internal override int ParameterCount
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (1)
159internal sealed override int ParameterCount
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (1)
139internal override int ParameterCount
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
72internal override int ParameterCount
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
64internal override int ParameterCount
174 references to ParameterCount
Microsoft.CodeAnalysis.CSharp (174)
Binder\Binder.ValueChecks.cs (2)
392var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(accessorForDefaultArguments.ParameterCount); 398refKindsBuilderOpt = ArrayBuilder<RefKind>.GetInstance(accessorForDefaultArguments.ParameterCount);
Binder\Binder_Attributes.cs (2)
312if (hasErrors || attributeConstructor.ParameterCount == 0) 326Debug.Assert(rewrittenArguments.Length == attributeConstructor.ParameterCount);
Binder\Binder_Await.cs (2)
481if (method.ParameterCount != 0) 483var parameter = method.Parameters[method.ParameterCount - 1];
Binder\Binder_Conversions.cs (6)
600ParameterCount: 1, 632ParameterCount: 1, 665ParameterCount: 1, 2316Debug.Assert(lambdaSymbol.ParameterCount == delegateParameters.Length); 2317for (int p = 0; p < lambdaSymbol.ParameterCount; p++) 2375if (lambdaParameter.IsParams && !delegateParameter.IsParams && p == lambdaSymbol.ParameterCount - 1)
Binder\Binder_Expressions.cs (2)
5022if (baseParameter.Ordinal == resultMember.ParameterCount - 1) 10166original.ParameterCount == 2 &&
Binder\Binder_Invocation.cs (1)
1971if (!IsUnboundGeneric(m) && m.ParameterCount > 0)
Binder\Binder_Patterns.cs (1)
1072if (parameterIndex < deconstructMethod!.ParameterCount)
Binder\Binder_Statements.cs (3)
1339!(patternMethodSymbol.ParameterCount == 0 || patternMethodSymbol.IsStatic && patternMethodSymbol.ParameterCount == 1)) 3939if (ctor.ParameterCount == 0)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1276Debug.Assert(property.SetMethod.ParameterCount > 0);
Binder\DecisionDagBuilder.cs (1)
536int count = Math.Min(method.ParameterCount - extensionExtra, recursive.Deconstruction.Length);
Binder\ForEachLoopBinder.cs (6)
1090Debug.Assert(getEnumeratorMethod is null or { ParameterCount: 1 }); 1208var argsBuilder = ArrayBuilder<BoundExpression>.GetInstance(patternDisposeMethod.ParameterCount); 1404if (method.ParameterCount == 0 || isAsync) 1901Debug.Assert(resolvedMember is null or { ParameterCount: 0 }); 1912if (method.ParameterCount == 0) 1917var argsBuilder = ArrayBuilder<BoundExpression>.GetInstance(method.ParameterCount);
Binder\InMethodBinder.cs (1)
198if (_methodSymbol.ParameterCount == 0 || (options & LookupOptions.NamespaceAliasesOnly) != 0)
Binder\LockBinder.cs (1)
118ParameterCount: 0,
Binder\MethodArgumentInfo.cs (1)
36Debug.Assert(method.ParameterCount == 0);
Binder\Semantics\Conversions\Conversions.cs (4)
107ToConversion(resolution.OverloadResolutionResult, resolution.MethodGroup, methodSymbol.ParameterCount); 124ToConversion(resolution.OverloadResolutionResult, resolution.MethodGroup, destination.Signature.ParameterCount); 395var conversion = ToConversion(result, methodGroup, delegateType.DelegateInvokeMethod.ParameterCount); 479Debug.Assert(method.ParameterCount == parameterCount + (methodGroup.IsExtensionMethodGroup ? 1 : 0));
Binder\Semantics\Conversions\ConversionsBase.cs (4)
1502if (anonymousFunction.ParameterCount != invokeMethod.ParameterCount) 3382if (sourceSig.ParameterCount != destinationSig.ParameterCount || 3394for (int i = 0; i < sourceSig.ParameterCount; i++)
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (1)
266if (op.ReturnsVoid || op.ParameterCount != 1 || op.ReturnType.TypeKind == TypeKind.Error)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (1)
295if (op.ReturnsVoid || op.ParameterCount != 1)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
967if (op.ParameterCount != 2 || op.ReturnsVoid)
Binder\Semantics\Operators\BinaryOperatorSignature.cs (2)
98Debug.Assert(Method.ParameterCount == 2); 118Debug.Assert(Method.ParameterCount == 2);
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
523if (op.ParameterCount != 1 || op.ReturnsVoid)
Binder\Semantics\Operators\UnaryOperatorSignature.cs (1)
52Debug.Assert(Method.ParameterCount == 1);
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (9)
1865else if (source.Type is FunctionPointerTypeSymbol { Signature: { ParameterCount: int sourceParameterCount } sourceSignature } && 1866target.Type is FunctionPointerTypeSymbol { Signature: { ParameterCount: int targetParameterCount } targetSignature } && 2404if (sourceSignature.ParameterCount != targetSignature.ParameterCount) 2416for (int i = 0; i < sourceSignature.ParameterCount; i++) 2754if (sourceSignature.ParameterCount != targetSignature.ParameterCount) 2766for (int i = 0; i < sourceSignature.ParameterCount; i++) 3201if ((method.ParameterCount < 1) || (arguments.Length < 1))
Binder\UsingStatementBinder.cs (1)
206var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(disposeMethod.ParameterCount);
BoundTree\Constructors.cs (1)
190if (i < method.ParameterCount)
BoundTree\NullabilityRewriter.cs (3)
177Debug.Assert(lambda.ParameterCount == updatedLambda.ParameterCount); 178for (int i = 0; i < lambda.ParameterCount; i++)
BoundTree\UnboundLambda.cs (1)
1124int parameterCount = invoke.ParameterCount;
CodeGen\EmitExpression.cs (4)
3706if (getMethod.ParameterCount == 1) 3712Debug.Assert(getMethod.ParameterCount == 2); 3733if (getField.ParameterCount == 1) 3739Debug.Assert(getField.ParameterCount == 2);
CodeGen\Optimizer.cs (1)
952((BoundObjectCreationExpression)right).Constructor.ParameterCount != 0);
Compiler\AnonymousTypeMethodBodySynthesizer.cs (2)
31int paramCount = this.ParameterCount; 53for (int index = 0; index < this.ParameterCount; index++)
Compiler\MethodBodySynthesizer.cs (2)
90Debug.Assert(submissionConstructor.ParameterCount == 1); 605baseTypeMethod.ParameterCount == 0 &&
Compiler\MethodCompiler.cs (1)
1210Debug.Assert(!(methodSymbol.IsImplicitInstanceConstructor && methodSymbol.ParameterCount == 0) ||
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (7)
402if (sig.ParameterCount > 0) 404var otherParamsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(sig.ParameterCount); 405var otherParamRefCustomModifiersBuilder = ArrayBuilder<ImmutableArray<CustomModifier>>.GetInstance(sig.ParameterCount); 486var key = new AnonymousDelegateWithIndexedNamePartialKey(delegateTemplate.Arity, delegateTemplate.DelegateInvokeMethod.ParameterCount); 919if (sig.ParameterCount > 0) 921var translatedParamsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(sig.ParameterCount); 922var translatedParamRefCustomModifiersBuilder = ArrayBuilder<ImmutableArray<CustomModifier>>.GetInstance(sig.ParameterCount);
Emitter\Model\MethodReference.cs (1)
54return (ushort)UnderlyingMethod.ParameterCount;
Emitter\Model\MethodSymbolAdapter.cs (1)
150return (ushort)AdaptedMethodSymbol.ParameterCount;
Emitter\Model\PEModuleBuilder.cs (1)
1223int ordinal = methodSymbol.ParameterCount;
FlowAnalysis\AbstractFlowPass.cs (1)
3017Debug.Assert(method.ParameterCount is 1);
FlowAnalysis\NullableWalker.cs (13)
4059else if (constructor?.ParameterCount == 1) 4901if (methodOpt?.ParameterCount == 2) 5151method?.ParameterCount == 2) 6369var parameterCount = method.ParameterCount; 8735targetInvokeMethod.ParameterCount != sourceMethod.ParameterCount) 9438Debug.Assert(method.ParameterCount == 1); 10484MethodSymbol? incrementOperator = (node.OperatorKind.IsUserDefined() && node.MethodOpt?.ParameterCount == 1) ? node.MethodOpt : null; 10491if (node.OperandConversion is BoundConversion { Conversion: var operandConversion } && operandConversion.IsUserDefined && operandConversion.Method?.ParameterCount == 1) 11314method.ParameterCount == 1) 11403if ((object)node.LogicalOperator != null && node.LogicalOperator.ParameterCount == 2) 11429if (binary.LogicalOperator != null && binary.LogicalOperator.ParameterCount == 2) 11435if ((object)trueFalseOperator != null && trueFalseOperator.ParameterCount != 1)
FlowAnalysis\NullableWalker_Patterns.cs (1)
449for (int i = 0; i < method.ParameterCount - extensionExtra; i++)
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
486method.ParameterCount == 0 &&
Lowering\DiagnosticsPass_Warnings.cs (1)
237if (method.ParameterCount != arguments.Length ||
Lowering\Extensions.cs (2)
54return creation.Constructor.ParameterCount != 0; 100return creation.Constructor.ParameterCount == 0;
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
303var prologueBuilder = ArrayBuilder<BoundStatement>.GetInstance(_factory.CurrentFunction.ParameterCount);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
185for (int i = extensionExtra; i < method.ParameterCount; i++) 242Debug.Assert(e.Property.GetMethod.ParameterCount == 1);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
926else if (asSpanMethod is MethodSymbol { IsStatic: true, ParameterCount: 1 })
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (2)
1342Debug.Assert(conversion.Method is { } && !conversion.Method.ReturnsVoid && conversion.Method.ParameterCount == 1); 1503Debug.Assert(method.ParameterCount == 1);
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (2)
126enterMethod.ParameterCount == 2) 201Debug.Assert(enterMethod.ParameterCount == 1);
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (1)
184Debug.Assert(withExpr.CloneMethod.ParameterCount == 0);
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (1)
94Debug.Assert(getMethod.ParameterCount == rewrittenArguments.Length);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
633Debug.Assert(node.MethodOpt.ParameterCount == 1);
Lowering\SyntheticBoundNodeFactory.cs (5)
741var ctor = type.InstanceConstructors.Single(c => c.ParameterCount == args.Length); 750var ctor = type.InstanceConstructors.Single(c => c.ParameterCount == args.Length); 857Debug.Assert(method.ParameterCount == args.Length); 894Debug.Assert(method.ParameterCount == args.Length); 1196var ctor = baseType.InstanceConstructors.Single(c => c.ParameterCount == 0);
Operations\CSharpOperationFactory.cs (1)
2945if (patternDisposeInfo.Method.ParameterCount == 0)
Symbols\Attributes\SourceAttributeData.cs (2)
132Debug.Assert(parameterIndex < this.AttributeConstructor.ParameterCount); 140Debug.Assert(this.AttributeConstructor.ParameterCount <= attributeSyntax.ArgumentList.Arguments.Count);
Symbols\ConstraintsHelper.cs (1)
1494if (constructor.ParameterCount == 0)
Symbols\MemberSymbolExtensions.cs (3)
103return ((MethodSymbol)member).ParameterCount; 417if (constructor.ParameterCount != 0) 440return method.MethodKind == MethodKind.Constructor && method.ParameterCount == 0;
Symbols\Metadata\PE\DynamicTypeDecoder.cs (2)
361if (sig.ParameterCount > 0) 364var paramsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(sig.ParameterCount);
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (1)
220if (candidateMethod.ParameterCount != numParams)
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (2)
183if (type.Signature.ParameterCount > 0) 185var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance(type.Signature.ParameterCount);
Symbols\Metadata\PE\TupleTypeDecoder.cs (3)
214if (type.Signature.ParameterCount > 0) 216var paramsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(type.Signature.ParameterCount); 218for (int i = type.Signature.ParameterCount - 1; i >= 0; i--)
Symbols\MethodSymbol.cs (1)
1230int IMethodSymbolInternal.ParameterCount => ParameterCount;
Symbols\MethodSymbolExtensions.cs (3)
18return method.ParameterCount != 0 && method.Parameters[method.ParameterCount - 1].IsParams; 46method.ParameterCount != 0 || method.Arity != 0 || !method.IsMetadataVirtual(MethodSymbol.IsMetadataVirtualOption.IgnoreInterfaceImplementationChanges))
Symbols\NativeIntegerTypeSymbol.cs (1)
114if (underlyingMethod.ParameterCount == 0)
Symbols\ReducedExtensionMethodSymbol.cs (5)
40Debug.Assert(method.ParameterCount > 0); 97Debug.Assert(reducedFrom.ParameterCount > 0); 117Debug.Assert(method.ParameterCount > 0); 148var paramCount = method.ParameterCount; 510get { return _reducedFrom.ParameterCount - 1; }
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
769var paramCount = signature.ParameterCount;
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
364int paramCount = invoke.ParameterCount;
Symbols\Source\SourceMemberContainerSymbol.cs (8)
2150Debug.Assert(method1.ParameterCount == method2.ParameterCount); 2152for (int i = 0; i < method1.ParameterCount; i++) 2561if (op1.ParameterCount != op2.ParameterCount) 2566for (int p = 0; p < op1.ParameterCount; ++p) 4116if (m.MethodKind == MethodKind.Constructor && m.ParameterCount == 0) 4822hasParameterlessInstanceConstructor = hasParameterlessInstanceConstructor || method.ParameterCount == 0;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (6)
1261Debug.Assert(baseMethod.ParameterCount == overrideMethod.ParameterCount - overrideParameterOffset); 1464Debug.Assert(baseMethod.ParameterCount == overrideMethod.ParameterCount - overrideParameterOffset); 1515Debug.Assert(baseMethod.ParameterCount == overrideMethod.ParameterCount - overrideParameterOffset);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
965if (!IsStatic || ParameterCount > 0 || !ReturnsVoid || IsAbstract || IsVirtual)
Symbols\Source\SourceNamedTypeSymbol.cs (2)
1773var parameterlessConstructor = InstanceConstructors.FirstOrDefault(c => c.ParameterCount == 0); 1958|| !InstanceConstructors.Any(c => c is { ParameterCount: 0, DeclaredAccessibility: Accessibility.Internal or Accessibility.Public })
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (2)
124if (ctor.ParameterCount == 1 && ctor.Parameters[0].RefKind == RefKind.None && 164ParameterCount: 0,
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
146return member is MethodSymbol { IsStatic: false, ParameterCount: 1, Arity: 0 } method &&
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (1)
45if (member is MethodSymbol candidate && candidate.ParameterCount == 1 && candidate.Parameters[0].RefKind == RefKind.None &&
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (6)
346Debug.Assert(userMain.ParameterCount == 0 || userMain.ParameterCount == 1); 477Debug.Assert(ctor.ParameterCount == 0); 480Debug.Assert(initializer.ParameterCount == 0); 568Debug.Assert(ctor.ParameterCount == 1); 571Debug.Assert(initializer.ParameterCount == 0);
Symbols\TypeSymbolExtensions.cs (4)
955if (currentPointer.ParameterCount == 0) 977for (i = 0; i < currentPointer.ParameterCount - 1; i++) 2049if (funcPtrType.Signature.ParameterCount > 0) 2051var paramsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(funcPtrType.Signature.ParameterCount);
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
66get { return UnderlyingMethod.ParameterCount; }