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
94 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)
356=> 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 (7)
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
154if (parameters[parameterIndex].IsParams
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
461if (method.Parameters.LastOrDefault()?.IsParams == true) 521if (parameter.IsParams && parameter.Type is IArrayTypeSymbol arrayType)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
228parameter.IsParams ||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
304isParams ?? parameter.IsParams,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
29parameter.IsParams,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
96if (parameterSymbol.IsParams)
Microsoft.CodeAnalysis.CSharp (2)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (2)
824if (symbol.IsParams) 832!(symbol.IsParams && symbol.Type is { IsRefLikeType: true } or ITypeParameterSymbol { AllowsRefLikeType: true }))
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
332GetAccessibleInstanceConstructor(constructors, c => c.Parameters.All(p => p.IsOptional || p.IsParams)); 1057if (originalCreateMethod.Parameters is [{ IsParams: true, Type: IArrayTypeSymbol { ElementType: ITypeParameterSymbol { TypeParameterKind: TypeParameterKind.Method } } }])
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (2)
88if (parameter.IsParams) 102if (!parameter.IsParams && !isExplicit && !parameter.IsRefOrOut())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (5)
468argumentOpt == null && info.Symbol is IMethodSymbol method && method.Parameters.All(p => p.IsOptional || p.IsParams)) 737var minParameterCount = parameterList.Count(p => !p.IsParams && !p.IsOptional); 738var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length; 765.Select(p => new TypeInferenceInfo(p.Type, p.IsParams)); 778var 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 (7)
ChangeSignature\CSharpChangeSignatureService.cs (1)
905RoslynDebug.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)
332GetAccessibleInstanceConstructor(constructors, c => c.Parameters.All(p => p.IsOptional || p.IsParams)); 1057if (originalCreateMethod.Parameters is [{ IsParams: true, Type: IArrayTypeSymbol { ElementType: ITypeParameterSymbol { TypeParameterKind: TypeParameterKind.Method } } }])
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
33=> !parameters.Last().IsParams || parameters.Length >= argumentCount;
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (2)
88if (parameter.IsParams) 102if (!parameter.IsParams && !isExplicit && !parameter.IsRefOrOut())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (5)
468argumentOpt == null && info.Symbol is IMethodSymbol method && method.Parameters.All(p => p.IsOptional || p.IsParams)) 737var minParameterCount = parameterList.Count(p => !p.IsParams && !p.IsOptional); 738var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length; 765.Select(p => new TypeInferenceInfo(p.Type, p.IsParams)); 778var 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)
112!constructorParams.Any(static p => p.IsParams) &&
ChangeSignature\AbstractChangeSignatureService.cs (4)
519if (!param.IsParams) 798parameters.LastOrDefault()?.IsParams == true && 842parameters[indexInListOfPreexistingArguments].IsParams) 1045if (symbol is IMethodSymbol methodSymbol && methodSymbol.Parameters.LastOrDefault()?.IsParams == true)
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.State.cs (1)
105where 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)
461if (method.Parameters.LastOrDefault()?.IsParams == true) 521if (parameter.IsParams && parameter.Type is IArrayTypeSymbol arrayType)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
228parameter.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)
219var minimumArgumentCount = symbol.Parameters.Count(static p => !p.IsOptional && !p.IsParams); 220var maximumArgumentCount = symbol.Parameters is [.., { IsParams: true }] 224var exactArgumentCount = symbol.Parameters.Any(static p => p.IsOptional || p.IsParams)
Shared\Extensions\IParameterSymbolExtensions.cs (1)
20parameter.IsParams,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
356=> 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)
304isParams ?? 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 (1)
29parameter.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)
445if (current.IsParams)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
ObjectBrowser\DescriptionBuilder.vb (1)
396If current.IsParams Then