2 implementations of IsParamArray
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\ParameterSymbol.cs (1)
65bool IParameterSymbol.IsParams => _underlying.IsParams;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\ParameterSymbol.vb (1)
127Public MustOverride ReadOnly Property IsParamArray As Boolean Implements IParameterSymbol.IsParams, IParameterSymbol.IsParamsArray
99 references to IsParamArray
Microsoft.AspNetCore.App.Analyzers (3)
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (2)
442if (lastParameter.IsParams) 518if (lastParameter.IsParams)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
192else if (invocation.TargetMethod.Parameters[0].IsParams)
Microsoft.AspNetCore.Mvc.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
192else if (invocation.TargetMethod.Parameters[0].IsParams)
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
192else if (invocation.TargetMethod.Parameters[0].IsParams)
SymbolApiConventionMatcher.cs (1)
35if (conventionParameter.IsParams)
Microsoft.CodeAnalysis.CodeStyle (4)
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
244if (parameter.IsParams)
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
236if (parameterWithMatchingName.IsParams && parameters.Length != arguments.Count)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
419=> symbol.GetParameters() is [.., { IsParams: true }];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
1087(signature1Parameters.Length > 0 && !signature1Parameters.Last().IsParams));
Microsoft.CodeAnalysis.CodeStyle.Fixes (8)
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
154if (parameters[parameterIndex].IsParams
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
462if (method.Parameters.LastOrDefault()?.IsParams == true) 522if (parameter.IsParams && parameter.Type is IArrayTypeSymbol arrayType)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
219parameter.IsParams ||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
305isParams ?? parameter.IsParams,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (2)
29parameter.IsParams, 44parameter.IsParams,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
96if (parameterSymbol.IsParams)
Microsoft.CodeAnalysis.CSharp (2)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (2)
832if (symbol.IsParams) 840!(symbol.IsParams && symbol.Type is { IsRefLikeType: true } or ITypeParameterSymbol { AllowsRefLikeType: true }))
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
360GetAccessibleInstanceConstructor(constructors, c => c.Parameters.All(p => p.IsOptional || p.IsParams)); 958if (originalCreateMethod.Parameters is [{ IsParams: true, Type: IArrayTypeSymbol { ElementType: ITypeParameterSymbol { TypeParameterKind: TypeParameterKind.Method } } }])
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (9)
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (2)
37originalMethod.Parameters is not [.., { IsParams: true } originalParamsParameter]) 49currentMethod.Parameters is [.., { IsParams: true, Type: IArrayTypeSymbol arrayType }])
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (1)
96if (!parameter.IsParams && !isExplicit && !parameter.IsRefOrOut())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
134=> GetParameterModifiers(ParameterIsScoped(parameter), parameter.RefKind, parameter.IsParams, forFunctionPointerReturnParameter);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (5)
484argumentOpt == null && info.Symbol is IMethodSymbol method && method.Parameters.All(p => p.IsOptional || p.IsParams)) 753var minParameterCount = parameterList.Count(p => !p.IsParams && !p.IsOptional); 754var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length; 781.Select(p => new TypeInferenceInfo(p.Type, p.IsParams)); 794var info = new TypeInferenceInfo(parameter.Type, parameter.IsParams);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Semantics\ParamsCollectionTests.cs (3)
53Assert.Equal(isParamArray | isParamCollection, iParameter.IsParams); 4342Assert.False(parameter.IsParams); 4348Assert.False(parameter.IsParams);
Microsoft.CodeAnalysis.CSharp.Features (9)
ChangeSignature\CSharpChangeSignatureService.cs (1)
904RoslynDebug.Assert(parameterSymbol.IsParams);
SignatureHelp\AttributeSignatureHelpProvider.cs (1)
143constructor.Parameters is [.., { IsParams: true }] && namedParameters.Count == 0;
SignatureHelp\LightweightOverloadResolution.cs (2)
124if (parameter.IsParams 226inParams |= method.Parameters[parameterIndex].IsParams;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
360GetAccessibleInstanceConstructor(constructors, c => c.Parameters.All(p => p.IsOptional || p.IsParams)); 958if (originalCreateMethod.Parameters is [{ IsParams: true, Type: IArrayTypeSymbol { ElementType: ITypeParameterSymbol { TypeParameterKind: TypeParameterKind.Method } } }])
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (2)
37originalMethod.Parameters is not [.., { IsParams: true } originalParamsParameter]) 49currentMethod.Parameters is [.., { IsParams: true, Type: IArrayTypeSymbol arrayType }])
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
33=> !parameters.Last().IsParams || parameters.Length >= argumentCount;
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (1)
96if (!parameter.IsParams && !isExplicit && !parameter.IsRefOrOut())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
134=> GetParameterModifiers(ParameterIsScoped(parameter), parameter.RefKind, parameter.IsParams, forFunctionPointerReturnParameter);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (5)
484argumentOpt == null && info.Symbol is IMethodSymbol method && method.Parameters.All(p => p.IsOptional || p.IsParams)) 753var minParameterCount = parameterList.Count(p => !p.IsParams && !p.IsOptional); 754var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length; 781.Select(p => new TypeInferenceInfo(p.Type, p.IsParams)); 794var info = new TypeInferenceInfo(parameter.Type, parameter.IsParams);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Completion\AbstractArgumentProviderTests`1.cs (2)
113=> parameters.Count(parameter => !parameter.IsOptional && !parameter.IsParams); 116=> parameters.Any(parameter => parameter.IsParams) ? int.MaxValue : parameters.Length;
Microsoft.CodeAnalysis.Features (18)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (1)
114!constructorParams.Any(static p => p.IsParams) &&
ChangeSignature\AbstractChangeSignatureService.cs (4)
521if (!param.IsParams) 800parameters.LastOrDefault()?.IsParams == true && 841parameters[indexInListOfPreexistingArguments].IsParams) 1045if (symbol is IMethodSymbol methodSymbol && methodSymbol.Parameters.LastOrDefault()?.IsParams == true)
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.State.cs (1)
107where c.Parameters.All(p => p.RefKind == RefKind.None) && !c.Parameters.Any(static p => p.IsParams)
GoToBase\AbstractGoToBaseService.cs (1)
28baseConstructor.Parameters.All(p => p.IsOptional || p.IsParams));
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (1)
216if (parameter.IsParams)
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
604!parameter.IsParams &&
Shared\Extensions\ISymbolExtensions_Sorting.cs (3)
89if (xParam.IsParams != yParam.IsParams) 91return xParam.IsParams ? 1 : -1;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
244if (parameter.IsParams)
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
236if (parameterWithMatchingName.IsParams && parameters.Length != arguments.Count)
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
154if (parameters[parameterIndex].IsParams
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
462if (method.Parameters.LastOrDefault()?.IsParams == true) 522if (parameter.IsParams && parameter.Type is IArrayTypeSymbol arrayType)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
219parameter.IsParams ||
Microsoft.CodeAnalysis.Test.Utilities (2)
Diagnostics\OperationTestAnalyzer.cs (2)
1104if (argument.Parameter.IsParams) 1131if (argument.Parameter.IsParams)
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\ParameterSymbol.vb (1)
127Public MustOverride ReadOnly Property IsParamArray As Boolean Implements IParameterSymbol.IsParams, IParameterSymbol.IsParamsArray
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (1)
38If parameter?.IsParams = True AndAlso TypeOf parameter.Type Is IArrayTypeSymbol Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (1)
191If Not parameter.IsOptional AndAlso Not parameter.IsParams Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
74If parameter.IsParams Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\ParamsCollectionTests.vb (1)
143Assert.Equal(isParamArray, iParameter.IsParams)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (1)
38If parameter?.IsParams = True AndAlso TypeOf parameter.Type Is IArrayTypeSymbol Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (1)
191If Not parameter.IsOptional AndAlso Not parameter.IsParams Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
74If parameter.IsParams Then
Microsoft.CodeAnalysis.Workspaces (13)
Editing\SyntaxGenerator.cs (1)
330symbol.IsParams,
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (3)
222var minimumArgumentCount = symbol.Parameters.Count(static p => !p.IsOptional && !p.IsParams); 223var maximumArgumentCount = symbol.Parameters is [.., { IsParams: true }] 227var exactArgumentCount = symbol.Parameters.Any(static p => p.IsOptional || p.IsParams)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
419=> symbol.GetParameters() is [.., { IsParams: true }];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
1087(signature1Parameters.Length > 0 && !signature1Parameters.Last().IsParams));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
305isParams ?? parameter.IsParams,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
73CodeGenerationSymbolFactory.CreateParameterSymbol(p.GetAttributes(), p.RefKind, p.IsParams, p.Type.SubstituteTypes(mapping, typeGenerator), p.Name, p.IsOptional, 170p.RefKind, p.IsParams, p.Type, p.Name, p.IsOptional,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (2)
29parameter.IsParams, 44parameter.IsParams,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IPropertySymbolExtensions.cs (1)
63p.RefKind, p.IsParams, p.Type, p.Name, p.IsOptional,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
96if (parameterSymbol.IsParams)
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
502bool lastParameterDeclaredWithParamsKeyword = parameters.Length > 0 && parameters[parameters.Length - 1].IsParams;
Microsoft.VisualStudio.LanguageServices (2)
ChangeSignature\ChangeSignatureDialogViewModel.ParameterViewModels.cs (1)
202if (ParameterSymbol.IsParams)
Progression\GraphBuilder.cs (1)
318node.SetValue<bool>(Properties.IsParameterArray, parameterSymbol.IsParams);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService_Prototype.cs (1)
536else if (parameter.IsParams)
ObjectBrowser\DescriptionBuilder.cs (1)
436if (current.IsParams)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
ObjectBrowser\DescriptionBuilder.vb (1)
422If current.IsParams Then