2 implementations of IParameterSymbol
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\ParameterSymbol.cs (1)
13internal sealed class ParameterSymbol : Symbol, IParameterSymbol
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\ParameterSymbol.vb (1)
21Implements IParameterSymbol, IParameterSymbolInternal
1301 references to IParameterSymbol
Aspire.Hosting.Analyzers (3)
AppHostAnalyzer.cs (3)
78[NotNullWhen(true)] out (IParameterSymbol ModelNameParameter, ModelType[] ModelTypes)[]? parameterData) 97ModelType[] GetModelNameAttributes(IParameterSymbol parameter) 119private static bool TryGetStringToken(IInvocationOperation invocation, IParameterSymbol modelNameParameter, out SyntaxToken token)
ConfigurationSchemaGenerator (13)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (4)
581foreach (IParameterSymbol parameter in ctor.Parameters) 696foreach (IParameterSymbol parameter in ctor.Parameters) 959var firstParam = parameters[0]; 960var secondParam = parameters[1];
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (3)
42ImmutableArray<IParameterSymbol> @params = operation.TargetMethod.Parameters; 137ImmutableArray<IParameterSymbol> @params = targetMethod.Parameters; 192ImmutableArray<IParameterSymbol> @params = targetMethod.Parameters;
RuntimeSource\Configuration.Binder\Parser\OptionsBuilderConfigurationExtensions.cs (3)
18ImmutableArray<IParameterSymbol> @params = targetMethod.Parameters; 46ImmutableArray<IParameterSymbol> @params = targetMethod.Parameters; 73ImmutableArray<IParameterSymbol> @params = targetMethod.Parameters;
RuntimeSource\Configuration.Binder\Parser\OptionsConfigurationServiceCollectionExtensions.cs (1)
19ImmutableArray<IParameterSymbol> @params = targetMethod.Parameters;
RuntimeSource\Configuration.Binder\Specs\Members\MemberSpec.cs (1)
14Debug.Assert(member is IPropertySymbol or IParameterSymbol);
RuntimeSource\Configuration.Binder\Specs\Members\ParameterSpec.cs (1)
14public ParameterSpec(IParameterSymbol parameter, TypeRef typeRef) : base(parameter, typeRef)
ILLink.RoslynAnalyzer (11)
COMAnalyzer.cs (2)
49 foreach (var parameter in targetMethod.Parameters) { 84 if (symbol is IParameterSymbol parameterSymbol)
DataFlow\LocalDataFlowVisitor.cs (2)
133 public abstract TValue GetParameterTargetValue (IParameterSymbol parameter); 752 if (parameterProxy.ParameterSymbol is not IParameterSymbol parameter)
DynamicallyAccessedMembersAnalyzer.cs (1)
160 foreach (var parameter in method.Parameters) {
ISymbolExtensions.cs (1)
145 case IParameterSymbol parameterSymbol:
TrimAnalysis\FlowAnnotations.cs (1)
145 IParameterSymbol parameter = param.ParameterSymbol!;
TrimAnalysis\MethodParameterValue.cs (1)
12 public MethodParameterValue (IParameterSymbol parameterSymbol)
TrimAnalysis\ParameterProxy.cs (2)
12 public ParameterProxy (IParameterSymbol parameter) 39 public IParameterSymbol? ParameterSymbol => IsImplicitThis ? null : Method.Method.Parameters[MetadataIndex];
TrimAnalysis\TrimAnalysisVisitor.cs (1)
229 public override MultiValue GetParameterTargetValue (IParameterSymbol parameter)
Microsoft.Analyzers.Extra (4)
AsyncMethodWithoutCancellation.cs (1)
156foreach (var argument in method.Parameters)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (2)
239ImmutableArray<IParameterSymbol> attributeCtorParams, 243foreach (var param in attributeCtorParams)
CallAnalysis\Fixers\LegacyLoggingFixer.FixDetails.cs (1)
199foreach (var p in method.Parameters)
Microsoft.AspNetCore.App.Analyzers (27)
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (10)
277var parameter = FindParameterForArgument(semanticModel, argument, allowUncertainCandidates: true, cancellationToken); 295var parameter = FindParameterForAttributeArgument(semanticModel, argument, allowUncertainCandidates: true, cancellationToken); 372private static IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, CancellationToken cancellationToken) 375private static IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, CancellationToken cancellationToken) 383public static IParameterSymbol? DetermineParameter( 413var parameter = parameters.FirstOrDefault(p => p.Name == name); 436var lastParameter = parameters.LastOrDefault(); 460public static IParameterSymbol? DetermineParameter( 493var parameter = parameters.FirstOrDefault(p => p.Name == name); 513var lastParameter = parameters.LastOrDefault();
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (3)
278var delegateParameter = method.Parameters.FirstOrDefault(p => delegateSymbol.IsAssignableFrom(p.Type)); 291var routeStringParameter = method.Parameters.FirstOrDefault(p => SymbolEqualityComparer.Default.Equals(stringSymbol, p.Type) && 308private static ArgumentSyntax? GetArgumentSyntax(BaseArgumentListSyntax argumentList, IMethodSymbol methodSymbol, IParameterSymbol parameterSymbol)
RouteHandlers\AtMostOneFromBodyAttribute.cs (1)
27foreach (var asParameterDecoratedParameter in asParametersDecoratedParameters)
RouteHandlers\DetectAmbiguousRoutes.cs (1)
271static IOperation? GetParameterArgument(IParameterSymbol parameter, ImmutableArray<IArgumentOperation> arguments)
RouteHandlers\DetectMismatchedParameterOptionality.cs (1)
21foreach (var parameter in method.Parameters)
RouteHandlers\DisallowMvcBindArgumentsOnParameters.cs (1)
22foreach (var parameter in methodSymbol.Parameters)
RouteHandlers\DisallowNonParsableComplexTypesOnParameters.cs (4)
24foreach (var handlerDelegateParameter in methodSymbol.Parameters) 86static bool IsRouteParameter(RouteUsageModel routeUsage, IParameterSymbol handlerDelegateParameter) 97static bool ReportFromAttributeDiagnostic(OperationAnalysisContext context, WellKnownType fromMetadataInterfaceType, WellKnownTypes wellKnownTypes, IParameterSymbol parameter, INamedTypeSymbol parameterTypeSymbol, Location location) 116static INamedTypeSymbol? ResovleParameterTypeSymbol(IParameterSymbol parameterSymbol)
src\Shared\RoslynUtils\SymbolExtensions.cs (6)
147IParameterSymbol parameterSymbol => parameterSymbol.Type, 153public static ImmutableArray<IParameterSymbol> GetParameters(this ISymbol? symbol) 158_ => ImmutableArray<IParameterSymbol>.Empty, 164public static bool IsOptional(this IParameterSymbol parameterSymbol) => 176public static string GetDefaultValueString(this IParameterSymbol parameterSymbol) 218public static string GetParameterInfoFromConstructorCode(this IParameterSymbol parameterSymbol)
Microsoft.AspNetCore.Components.Analyzers (1)
InternalUsageAnalyzer.cs (1)
109foreach (var parameter in method.Parameters)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
InternalUsageAnalyzer.cs (1)
109foreach (var parameter in method.Parameters)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (13)
src\Shared\RoslynUtils\SymbolExtensions.cs (6)
147IParameterSymbol parameterSymbol => parameterSymbol.Type, 153public static ImmutableArray<IParameterSymbol> GetParameters(this ISymbol? symbol) 158_ => ImmutableArray<IParameterSymbol>.Empty, 164public static bool IsOptional(this IParameterSymbol parameterSymbol) => 176public static string GetDefaultValueString(this IParameterSymbol parameterSymbol) 218public static string GetParameterInfoFromConstructorCode(this IParameterSymbol parameterSymbol)
StaticRouteHandlerModel\Emitters\DiagnosticEmitter.cs (1)
30public static void EmitRequiredDiagnostics(this IParameterSymbol parameterSymbol, List<Diagnostic> diagnostics, Location location)
StaticRouteHandlerModel\Endpoint.cs (1)
57var parameterSymbol = method.Parameters[i];
StaticRouteHandlerModel\EndpointParameter.cs (4)
21public EndpointParameter(Endpoint endpoint, IParameterSymbol parameter, WellKnownTypes wellKnownTypes) : this(endpoint, parameter.Type, parameter.Name, wellKnownTypes) 30private EndpointParameter(Endpoint endpoint, IPropertySymbol property, IParameterSymbol? parameter, WellKnownTypes wellKnownTypes) : this(endpoint, property.Type, property.Name, wellKnownTypes) 434if (typeSymbol is IParameterSymbol parameter) 495foreach (var parameter in parameters)
StaticRouteHandlerModel\Model\ConstructorParameter.cs (1)
7internal record ConstructorParameter(IPropertySymbol Property, IParameterSymbol? Parameter);
Microsoft.AspNetCore.Mvc.Analyzers (4)
TopLevelParameterNameAnalyzer.cs (4)
66var parameter = method.Parameters[i]; 84internal static bool IsProblematicParameter(in SymbolCache symbolCache, IParameterSymbol parameter) 176internal static bool SpecifiesModelType(in SymbolCache symbolCache, IParameterSymbol parameterSymbol) 195var constructorParameters = attribute.AttributeConstructor?.Parameters ?? ImmutableArray<IParameterSymbol>.Empty;
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
ActualApiResponseMetadataFactory.cs (1)
198var parameter = argument.Parameter;
SymbolApiConventionMatcher.cs (1)
34var conventionParameter = conventionMethodParameters[i];
SymbolApiResponseMetadataProvider.cs (1)
210var parameter = constructorParameters[i];
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.Parser.cs (1)
312foreach (var parameter in member.Parameters)
HubServerProxyGenerator.Parser.cs (1)
300foreach (var parameter in member.Parameters)
Microsoft.CodeAnalysis (25)
Compilation\Compilation.cs (1)
1723foreach (var param in funcPtr.Signature.Parameters)
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (2)
775private bool AllParametersMatch(ImmutableArray<IParameterSymbol> symbolParameters, ParameterInfo[] expectedParameters) 793private bool ParameterMatches(IParameterSymbol symbol, ParameterInfo parameterInfo)
DocumentationCommentId.cs (4)
480private void AppendParameters(ImmutableArray<IParameterSymbol> parameters) 493var p = parameters[i]; 1379private static bool AllParametersMatch(ImmutableArray<IParameterSymbol> symbolParameters, List<ParameterInfo> expectedParameters) 1397private static bool ParameterMatches(IParameterSymbol symbol, ParameterInfo parameterInfo)
Generated\Operations.Generated.cs (9)
881IParameterSymbol Parameter { get; } 2423IParameterSymbol Parameter { get; } 2567IParameterSymbol? Parameter { get; } 5316internal ParameterReferenceOperation(IParameterSymbol parameter, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5322public IParameterSymbol Parameter { get; } 7659internal ParameterInitializerOperation(IParameterSymbol parameter, ImmutableArray<ILocalSymbol> locals, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7664public IParameterSymbol Parameter { get; } 7914internal ArgumentOperation(ArgumentKind argumentKind, IParameterSymbol? parameter, IOperation value, IConvertibleConversion inConversion, IConvertibleConversion outConversion, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7924public IParameterSymbol? Parameter { get; }
Operations\ControlFlowGraphBuilder.cs (1)
7248foreach (var parameter in propertySymbol.Parameters)
SymbolDisplay\AbstractSymbolDisplayVisitor_Minimal.cs (2)
117var parameterSymbol = symbol as IParameterSymbol;
Symbols\IMethodSymbol.cs (1)
125ImmutableArray<IParameterSymbol> Parameters { get; }
Symbols\IParameterSymbol.cs (1)
108new IParameterSymbol OriginalDefinition { get; }
Symbols\IPropertySymbol.cs (1)
72ImmutableArray<IParameterSymbol> Parameters { get; }
Symbols\SymbolVisitor.cs (1)
83public virtual void VisitParameter(IParameterSymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
86public virtual TResult? VisitParameter(IParameterSymbol symbol)
Symbols\SymbolVisitor`2.cs (1)
91public virtual TResult VisitParameter(IParameterSymbol symbol, TArgument argument)
Microsoft.CodeAnalysis.CodeStyle (96)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (5)
58private readonly ConcurrentDictionary<IParameterSymbol, bool> _referencedParameters; 535var unusedParameter = (IParameterSymbol)symbol; 722foreach (var parameter in method.Parameters) 743foreach (var parameter in method.Parameters)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (4)
45private readonly ConcurrentDictionary<IParameterSymbol, bool> _unusedParameters = []; 120IParameterSymbol parameter, 196private bool IsUnusedParameterCandidate(IParameterSymbol parameter, INamedTypeSymbol? interpolatedStringHandlerAttributeType, CancellationToken cancellationToken) 290IParameterSymbol parameter,
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
243var parameter = method.Parameters.Single();
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (8)
183ImmutableArray<IParameterSymbol> parameters, 193ImmutableArray<IParameterSymbol> parameters, 210ImmutableArray<IParameterSymbol> parameters) 221var parameterWithMatchingName = GetParameterWithMatchingName(parameters, searchArgumentName); 244private static IParameterSymbol? GetParameterWithMatchingName(ImmutableArray<IParameterSymbol> parameters, string searchArgumentName) 246foreach (var p in parameters) 259ImmutableArray<IParameterSymbol> parameters,
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (2)
775private bool AllParametersMatch(ImmutableArray<IParameterSymbol> symbolParameters, ParameterInfo[] expectedParameters) 793private bool ParameterMatches(IParameterSymbol symbol, ParameterInfo parameterInfo)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IParameterSymbolExtensions.cs (3)
11public static bool IsRefOrOut(this IParameterSymbol symbol) 23public static IPropertySymbol? GetAssociatedSynthesizedRecordProperty(this IParameterSymbol parameter, CancellationToken cancellationToken) 56public static bool IsPrimaryConstructor(this IParameterSymbol parameter, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (6)
282IParameterSymbol parameterSymbol => parameterSymbol.Type, 326if (symbol is IParameterSymbol parameter) 342=> symbol is IParameterSymbol { IsThis: true }; 349return ((IParameterSymbol)symbol).Type; 358public static ImmutableArray<IParameterSymbol> GetParameters(this ISymbol? symbol) 567IParameterSymbol parameterSymbol => parameterSymbol.Type,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (1)
119public override bool VisitParameter(IParameterSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
111foreach (var param in funcPtrSignature.Parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.CollectTypeParameterSymbolsVisitor.cs (1)
44foreach (var parameter in symbol.Signature.Parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (1)
33foreach (var parameter in symbol.Signature.Parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (3)
144ImmutableArray<IParameterSymbol> parameters) 152ImmutableArray<IParameterSymbol> parameters) 156foreach (var parameter in parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (4)
26private readonly ImmutableArray<IParameterSymbol> _parameters; 74ImmutableArray<IParameterSymbol> parameters, 418foreach (var parameter in _parameters) 439foreach (var parameter in _parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (1)
55public bool IsInitialParameterValueUsed(IParameterSymbol parameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFacts.cs (2)
94IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken); 95IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
121public static IParameterSymbol? FindParameterForArgument(this ISemanticFacts semanticFacts, SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 124public static IParameterSymbol? FindParameterForAttributeArgument(this ISemanticFacts semanticFacts, SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (6)
37/// the "same" <see cref="IParameterSymbol.Type"/>s and 38/// equal <see cref="IParameterSymbol.RefKind"/>s.</item> 53/// <item>Two <see cref="IParameterSymbol"/>s are the "same" if they have 61/// the "same" <see cref="IParameterSymbol.Type"/>s and 62/// the "same" <see cref="IParameterSymbol.RefKind"/>s.</item> 272ImmutableArray<IParameterSymbol> parameters,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ParameterSymbolKey.cs (7)
12private sealed class ParameterSymbolKey : AbstractSymbolKey<IParameterSymbol> 16public sealed override void Create(IParameterSymbol symbol, SymbolKeyWriter visitor) 24SymbolKeyReader reader, IParameterSymbol? contextualSymbol, out string? failureReason) 41using var result = PooledArrayBuilder<IParameterSymbol>.GetInstance(); 80PooledArrayBuilder<IParameterSymbol> result, SymbolKeyReader reader, 81string metadataName, int ordinal, ImmutableArray<IParameterSymbol> parameters) 85foreach (var parameter in parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
384ImmutableArray<IParameterSymbol> parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (5)
61private readonly Action<IParameterSymbol> _writeParameterType; 62private readonly Action<IParameterSymbol> _writeRefKind; 278internal void WriteParameterTypesArray(ImmutableArray<IParameterSymbol> symbols) 297internal void WriteRefKindArray(ImmutableArray<IParameterSymbol> values) 443public override void VisitParameter(IParameterSymbol parameterSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (10)
467if (symbol is IParameterSymbol parameterSymbol && 468newSymbol is IParameterSymbol newParameterSymbol && 1082ImmutableArray<IParameterSymbol> signature1Parameters, 1083ImmutableArray<IParameterSymbol> signature2Parameters) 1112var specifiedParameters1 = new List<IParameterSymbol>(); 1113var specifiedParameters2 = new List<IParameterSymbol>(); 1124var parameter1 = signature1Parameters.FirstOrDefault(p => p.Name == name); 1127var parameter2 = signature2Parameters.FirstOrDefault(p => p.Name == name); 1162var parameter1 = signature1Parameters[i]; 1168var parameter2 = signature2Parameters[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (5)
23private IEqualityComparer<IParameterSymbol> ParameterEquivalenceComparer => _symbolEquivalenceComparer.ParameterEquivalenceComparer; 106IList<IParameterSymbol> parameters1, 107IList<IParameterSymbol> parameters2) 118IList<IParameterSymbol> parameters1, 119IList<IParameterSymbol> parameters2,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (6)
128SymbolKind.Parameter => ParametersAreEquivalent((IParameterSymbol)x, (IParameterSymbol)y, equivalentTypesWithDifferingAssemblies), 461ImmutableArray<IParameterSymbol> xParameters, 462ImmutableArray<IParameterSymbol> yParameters, 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
20private readonly Func<int, IParameterSymbol, int> _parameterAggregator; 69SymbolKind.Parameter => CombineHashCodes((IParameterSymbol)x, currentHash), 223private int CombineHashCodes(IParameterSymbol x, int currentHash)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (8)
16bool distinguishRefFromOut) : IEqualityComparer<IParameterSymbol?> 19IParameterSymbol? x, 20IParameterSymbol? y, 53public bool Equals(IParameterSymbol? x, IParameterSymbol? y) 56public bool Equals(IParameterSymbol? x, IParameterSymbol? y, bool compareParameterName, bool isCaseSensitive) 59public int GetHashCode(IParameterSymbol? x)
Microsoft.CodeAnalysis.CodeStyle.Fixes (86)
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (1)
198string argumentName, ImmutableArray<IParameterSymbol> parameters, ref int parameterIndex)
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
113ImmutableArray<IParameterSymbol> parameters,
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
493var parameter = method.Parameters[i]; 518Compilation compilation, TypeInfo argumentTypeInfo, IParameterSymbol parameter,
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (3)
120var parameterSymbol = CreateParameterSymbol( 159private static IParameterSymbol CreateParameterSymbol( 167var newParameterSymbol = CodeGenerationSymbolFactory.CreateParameterSymbol(
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (5)
56private ImmutableArray<IParameterSymbol> _parameters; 185ImmutableArray<IParameterSymbol> allParameters, 206ImmutableArray<IParameterSymbol> parameters, 258var ctorParameter = ctor.Parameters[i]; 418using var _ = ArrayBuilder<IParameterSymbol>.GetInstance(out var parameters);
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (2)
19ImmutableArray<IParameterSymbol> parameters, 105var constructorParameter = constructorInCompilation.Parameters[i];
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
22public abstract ImmutableArray<IParameterSymbol> TryMakeParameters(SemanticModel semanticModel, SyntaxNode target, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
231private static ImmutableArray<string> GenerateParameterNamesBasedOnParameterTypes(ImmutableArray<IParameterSymbol> parameters) 236foreach (var parameter in parameters)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
207private async ValueTask<ImmutableArray<IParameterSymbol>> DetermineParametersAsync(CancellationToken cancellationToken) 214var result = new FixedSizeArrayBuilder<IParameterSymbol>(modifiers.Length);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
222var parameter = containingMethod.Parameters[i];
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
36public ImmutableArray<IParameterSymbol> Parameters { get; private set; }
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (7)
42ImmutableArray<IParameterSymbol> GetNonCapturedPrimaryConstructorParameters( 46using var _2 = ArrayBuilder<IParameterSymbol>.GetInstance(out var result); 65bool IsAssignedToFieldOrProperty(ImmutableArray<IFieldSymbol> fields, ImmutableArray<IPropertySymbol> properties, IParameterSymbol parameter) 68bool IsAssignedToField(IFieldSymbol field, IParameterSymbol parameter) 84bool IsAssignedToProperty(IPropertySymbol property, IParameterSymbol parameter) 100bool InitializerReferencesParameter(SyntaxNode? initializer, IParameterSymbol parameter) 151foreach (var parameter in methodSymbol.Parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
95public TDeclarationNode AddParameters<TDeclarationNode>(TDeclarationNode destination, IEnumerable<IParameterSymbol> parameters, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode 132public abstract TDeclarationNode AddParameters<TDeclarationNode>(TDeclarationNode destinationMember, IEnumerable<IParameterSymbol> parameters, TCodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (16)
56ImmutableArray<IParameterSymbol> parameters, 85ImmutableArray<IParameterSymbol> parameters, IMethodSymbol? getMethod, IMethodSymbol? setMethod, 128ImmutableArray<IParameterSymbol> parameters, 161ImmutableArray<IParameterSymbol> parameters, 182ImmutableArray<IParameterSymbol> parameters, 201ImmutableArray<IParameterSymbol> parameters, 225IParameterSymbol fromType, 253IParameterSymbol fromType, 268public static IParameterSymbol CreateParameterSymbol(ITypeSymbol type, string name) 271public static IParameterSymbol CreateParameterSymbol(RefKind refKind, ITypeSymbol type, string name) 280public static IParameterSymbol CreateParameterSymbol( 289internal static IParameterSymbol CreateParameterSymbol( 290IParameterSymbol parameter, 471ImmutableArray<IParameterSymbol> parameters = default, 521ImmutableArray<IParameterSymbol>? parameters = null, 547ImmutableArray<IParameterSymbol>? parameters = null,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\ICodeGenerationService.cs (1)
89TDeclarationNode AddParameters<TDeclarationNode>(TDeclarationNode destination, IEnumerable<IParameterSymbol> parameters, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
49public abstract ImmutableArray<IParameterSymbol> Parameters { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
60public override ImmutableArray<IParameterSymbol> Parameters
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorSymbol.cs (1)
22ImmutableArray<IParameterSymbol> parameters) : CodeGenerationMethodSymbol(containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConversionSymbol.cs (1)
23IParameterSymbol fromType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorSymbol.cs (1)
22parameters: ImmutableArray<IParameterSymbol>.Empty,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (2)
23public override ImmutableArray<IParameterSymbol> Parameters { get; } 37ImmutableArray<IParameterSymbol> parameters,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationOperatorSymbol.cs (1)
25ImmutableArray<IParameterSymbol> parameters,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (4)
26object defaultValue) : CodeGenerationSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, new DeclarationModifiers(), name), IParameterSymbol 30bool IParameterSymbol.IsParamsArray => IsParams; 31bool IParameterSymbol.IsParamsCollection => false; 48public new IParameterSymbol OriginalDefinition => this;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertySymbol.cs (2)
27ImmutableArray<IParameterSymbol> parametersOpt, 35public ImmutableArray<IParameterSymbol> Parameters { get; } = parametersOpt.NullToEmpty();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (5)
13public static ImmutableArray<IParameterSymbol> RenameParameters(this IList<IParameterSymbol> parameters, ImmutableArray<string> parameterNames) 15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count); 22public static IParameterSymbol RenameParameter(this IParameterSymbol parameter, string parameterName)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (15)
61ImmutableArray<IParameterSymbol> parameters) 68IParameterSymbol parameter) 124: throughMember is IParameterSymbol 264ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewFieldMap, bool isContainedInUnsafeType) 267foreach (var parameter in parameters) 286ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewPropertyMap, bool isContainedInUnsafeType) 289foreach (var parameter in parameters) 319ImmutableArray<IParameterSymbol> parameters, 328foreach (var parameter in parameters) 370IParameterSymbol parameter, 407this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter, SyntaxNode fieldAccess) 416public static SyntaxNode CreateThrowArgumentNullExpression(this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter) 419private static SyntaxNode CreateNewArgumentNullException(SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter) 432IParameterSymbol parameter) 451public static SyntaxNode CreateThrowArgumentNullExceptionStatement(this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
82var originalParameter = methodSymbol.Parameters.First(); 462ImmutableArray<IParameterSymbol> parameters,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
230public IParameterSymbol FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 233public IParameterSymbol FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
89protected static IEnumerable<ITypeSymbol> ExpandParamsParameter(IParameterSymbol parameterSymbol)
Microsoft.CodeAnalysis.CSharp (36)
Compilation\CSharpSemanticModel.cs (1)
3213public abstract IParameterSymbol GetDeclaredSymbol(ParameterSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
Compilation\MemberSemanticModel.cs (1)
814public override IParameterSymbol GetDeclaredSymbol(ParameterSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
365public override IParameterSymbol GetDeclaredSymbol(ParameterSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (1)
2109public override IParameterSymbol GetDeclaredSymbol(ParameterSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
CSharpExtensions.cs (1)
1562public static IParameterSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, ParameterSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Operations\CSharpOperationFactory.cs (2)
667IParameterSymbol parameter = boundParameter.ParameterSymbol.GetPublicSymbol(); 1744IParameterSymbol parameter = boundParameterEqualsValue.Parameter.GetPublicSymbol();
Operations\CSharpOperationFactory_Methods.cs (1)
36internal IArgumentOperation CreateArgumentOperation(ArgumentKind kind, IParameterSymbol? parameter, BoundExpression expression)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (4)
631foreach (var param in symbol.Parameters) 781public override void VisitParameter(IParameterSymbol symbol) 970private void AddParametersIfNeeded(bool hasThisParameter, bool isVarargs, ImmutableArray<IParameterSymbol> parameters) 985foreach (var param in parameters)
Symbols\PublicModel\MethodSymbol.cs (2)
21private ImmutableArray<IParameterSymbol> _lazyParameters; 122ImmutableArray<IParameterSymbol> IMethodSymbol.Parameters
Symbols\PublicModel\ParameterSymbol.cs (17)
26ITypeSymbol IParameterSymbol.Type 39CodeAnalysis.NullableAnnotation IParameterSymbol.NullableAnnotation => _underlying.TypeWithAnnotations.ToPublicAnnotation(); 41ImmutableArray<CustomModifier> IParameterSymbol.CustomModifiers 46ImmutableArray<CustomModifier> IParameterSymbol.RefCustomModifiers 51IParameterSymbol IParameterSymbol.OriginalDefinition 59RefKind IParameterSymbol.RefKind => _underlying.RefKind; 61ScopedKind IParameterSymbol.ScopedKind => _underlying.EffectiveScope; 63bool IParameterSymbol.IsDiscard => _underlying.IsDiscard; 65bool IParameterSymbol.IsParams => _underlying.IsParams; 67bool IParameterSymbol.IsParamsArray => _underlying.IsParamsArray; 69bool IParameterSymbol.IsParamsCollection => _underlying.IsParamsCollection; 71bool IParameterSymbol.IsOptional => _underlying.IsOptional; 73bool IParameterSymbol.IsThis => _underlying.IsThis; 75int IParameterSymbol.Ordinal => _underlying.Ordinal; 77bool IParameterSymbol.HasExplicitDefaultValue => _underlying.HasExplicitDefaultValue; 79object IParameterSymbol.ExplicitDefaultValue => _underlying.ExplicitDefaultValue;
Symbols\PublicModel\PropertySymbol.cs (1)
46ImmutableArray<IParameterSymbol> IPropertySymbol.Parameters
Symbols\SymbolExtensions.cs (4)
629internal static IParameterSymbol? GetPublicSymbol(this ParameterSymbol? symbol) 631return symbol.GetPublicSymbol<IParameterSymbol>(); 739internal static ImmutableArray<IParameterSymbol> GetPublicSymbols(this ImmutableArray<ParameterSymbol> symbols) 741return GetPublicSymbols<IParameterSymbol>(StaticCast<Symbol>.From(symbols));
Microsoft.CodeAnalysis.CSharp.CodeStyle (27)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (2)
164var lambdaParameter = lambdaMethod.Parameters[i]; 165var invokedParameter = invokedMethod.Parameters[i];
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
137if (exprSymbol is not IParameterSymbol and not ILocalSymbol)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
545var parameter = argument.DetermineParameter(semanticModel, cancellationToken: cancellationToken); 578var siblingParameter = siblingArgument.DetermineParameter(semanticModel, cancellationToken: cancellationToken);
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
73var firstParameter = constructor.Parameters[0];
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (2)
114private static bool IsSliceFirstParameter(IParameterSymbol parameter) 118private static bool IsSliceSecondParameter(IParameterSymbol parameter)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (9)
144PooledDictionary<ISymbol, IParameterSymbol> candidateMembersToRemove, 153private readonly PooledDictionary<ISymbol, IParameterSymbol> _candidateMembersToRemove = candidateMembersToRemove; 323var candidateMembersToRemove = PooledDictionary<ISymbol, IParameterSymbol>.GetInstance(); 387Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove) 409Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove) 416using var _2 = ArrayBuilder<(IParameterSymbol parameter, SyntaxNode assignedMemberDeclaration, bool parameterIsWrittenTo)>.GetInstance(out var orderedParameterAssignments); 466Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove, 467ArrayBuilder<(IParameterSymbol parameter, SyntaxNode assignedMemberDeclaration, bool parameterIsWrittenTo)>? orderedParameterAssignments, 533semanticModel.GetSymbolInfo(assignmentExpression.Right, cancellationToken).GetAnySymbol() is IParameterSymbol parameter &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
39public static IParameterSymbol? DetermineParameter(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
22public static IParameterSymbol? DetermineParameter(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
441var parameter = member.Parameters[index]; 474public static IParameterSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, ParameterSyntax syntax, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (2)
268public IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 271public IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (4)
669if (castedSymbol is not IFieldSymbol and not ILocalSymbol and not IParameterSymbol and not IParameterSymbol { RefKind: RefKind.Ref }) 1421var originalParameter = originalParameters[i]; 1422var rewrittenParameter = rewrittenParameters[i];
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (52)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (5)
95private static async Task<MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol>)>> GetUnassignedParametersAsync( 105var result = new MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol>)>(); 151MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol> unassignedParameters)>.ValueSet values, 155SyntaxGenerator generator, ImmutableArray<IParameterSymbol> unassignedParameters) 159foreach (var parameter in unassignedParameters)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAboveReturnCodeFixProvider.cs (1)
33MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol> unassignedParameters)>.ValueSet values,
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAtStartCodeFixProvider.cs (1)
57MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol> unassignedParameters)>.ValueSet values,
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (16)
49} && arg.WalkDownConversion() is IParameterReferenceOperation { Parameter: IParameterSymbol param } 167var left = GetParamFromArgument(leftOperand); 168var right = GetParamFromArgument(rightOperand); 185ImmutableArray<IParameterSymbol> parameters, 229IParameterSymbol parameter) 242Instance: IParameterReferenceOperation { Parameter: IParameterSymbol referencedParameter }, 248Instance: IParameterReferenceOperation { Parameter: IParameterSymbol referencedParameter }, 305if (arg is { Parameter: IParameterSymbol param, Value.Syntax: ExpressionSyntax captured }) 505var parameter = methodSymbol.Parameters.First(); 569IParameterSymbol parameter, 587Parameter: IParameterSymbol referencedParameter1 607private static IParameterSymbol? GetParamFromArgument(IOperation operation) 640var invokedOn = GetParamFromArgument(instance); 641var param = GetParamFromArgument(arg); 958IParameterSymbol parameter, 992IParameterSymbol? referencedParameter = null;
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
40public override ImmutableArray<IParameterSymbol> TryMakeParameters(SemanticModel semanticModel, SyntaxNode target, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (3)
87var thisParameter = (IParameterSymbol?)captures.FirstOrDefault(c => c.IsThisParameter()); 208private static ImmutableArray<(IParameterSymbol symbol, ISymbol capture)> CreateParameterSymbols(ImmutableArray<ISymbol> captures)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (5)
180else if (symbol is IParameterSymbol parameter) 225var parameter = method.Parameters.Where(p => p.Name == identifier.Text).FirstOrDefault(); 232var parameter = method.Parameters[index]; 256var parameterSymbol = model.GetDeclaredSymbol(optionalParameter, cancellationToken); 302static TypeSyntax? TryGetParameterTypeSyntax(IParameterSymbol? parameterSymbol, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (2)
250static ParameterSyntax PromoteParameter(SyntaxGenerator generator, ParameterSyntax parameterNode, IParameterSymbol delegateParameter) 315private static EqualsValueClauseSyntax GetDefaultValue(SyntaxGenerator generator, IParameterSymbol parameter)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
283IEnumerable<IParameterSymbol> parameters, 294foreach (var parameter in parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (9)
22ImmutableArray<IParameterSymbol> parameterDefinitions, 32ImmutableArray<IParameterSymbol> parameterDefinitions, 44ImmutableArray<IParameterSymbol> parameterDefinitions, 52foreach (var p in parameterDefinitions) 63internal static ParameterSyntax GetParameter(IParameterSymbol parameter, CSharpCodeGenerationContextInfo info, bool isExplicit, bool isFirstParam, bool seenOptional) 77IParameterSymbol parameter, bool isFirstParam) 98IParameterSymbol parameter, 118private static ExpressionSyntax GenerateEqualsValueClauseWorker(SyntaxGenerator generator, IParameterSymbol parameter, object? value) 122IParameterSymbol parameter, bool isExplicit, CSharpCodeGenerationContextInfo info)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (7)
704ImmutableArray<ImmutableArray<IParameterSymbol>> parameterizedSymbols, 720ImmutableArray<ImmutableArray<IParameterSymbol>> parameterizedSymbols, 724using var _1 = ArrayBuilder<ImmutableArray<IParameterSymbol>>.GetInstance(out var parameterListsWithMatchingCount); 725using var _2 = ArrayBuilder<ImmutableArray<IParameterSymbol>>.GetInstance(out var parameterListsWithoutMatchingCount); 755ImmutableArray<ImmutableArray<IParameterSymbol>> parameterizedSymbols, 777var parameter = parameterSet[index]; 1205SemanticModel.GetDeclaredSymbol(equalsValue.Parent, CancellationToken) is IParameterSymbol parameter)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
SymbolKey\SymbolKeyTestBase.cs (1)
232foreach (var parameter in method.Parameters)
SymbolKey\SymbolKeyTests.cs (1)
170var callbackParamater = method.Parameters[1];
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (12)
Semantics\ParamsCollectionTests.cs (11)
50IParameterSymbol iParameter = parameter.GetPublicSymbol(); 56private static void VerifyParams(IParameterSymbol parameter, bool isParamArray = false, bool isParamCollection = false) 2757var parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 2791parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 2955var parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 2986parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 4340var parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().First()); 4346parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Skip(1).First());
Semantics\RecordTests.cs (1)
449var parameter = model.GetDeclaredSymbol(parameterSyntax)!;
Microsoft.CodeAnalysis.CSharp.Features (120)
ChangeSignature\CSharpChangeSignatureService.cs (2)
903protected override TArgumentSyntax CreateExplicitParamsArrayFromIndividualArguments<TArgumentSyntax>(SeparatedSyntaxList<TArgumentSyntax> newArguments, int indexInExistingList, IParameterSymbol parameterSymbol) 925protected override ImmutableArray<IParameterSymbol> GetParameters(ISymbol declarationSymbol)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (3)
258private static SyntaxNode GenerateArgument(IParameterSymbol p, string name, bool shouldUseNamedArguments = false) 261private static List<string> GenerateUniqueParameterNames(ImmutableArray<IParameterSymbol> parameters, List<string> reservedNames) 267private static ParameterSyntax GenerateParameter(IParameterSymbol p, string name)
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (2)
201private static bool IsValid(ImmutableArray<IParameterSymbol> parameterList, ISet<string> existingNamedParameters) 218private static IEnumerable<ImmutableArray<IParameterSymbol>> GetParameterLists(
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
150var parameter = CSharpSemanticFacts.Instance.FindParameterForArgument(
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
304foreach (var overloadParameter in overload.Parameters)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.CompletionSymbolDisplay.cs (1)
87private static void AddParameters(ImmutableArray<IParameterSymbol> parameters, StringBuilder builder)
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (14)
31internal sealed partial class NamedParameterCompletionProvider : LSPCompletionProvider, IEqualityComparer<IParameterSymbol> 110foreach (var parameter in unspecifiedParameters) 135private static bool IsValid(ImmutableArray<IParameterSymbol> parameterList, ISet<string> existingNamedParameters) 150private static IEnumerable<ImmutableArray<IParameterSymbol>>? GetParameterLists( 167private static IEnumerable<ImmutableArray<IParameterSymbol>>? GetObjectCreationExpressionParameterLists( 183private static IEnumerable<ImmutableArray<IParameterSymbol>>? GetElementAccessExpressionParameterLists( 206private static IEnumerable<ImmutableArray<IParameterSymbol>>? GetConstructorInitializerParameterLists( 229private static IEnumerable<ImmutableArray<IParameterSymbol>>? GetPrimaryConstructorParameterLists( 248private static IEnumerable<ImmutableArray<IParameterSymbol>>? GetInvocationExpressionParameterLists( 274bool IEqualityComparer<IParameterSymbol>.Equals(IParameterSymbol? x, IParameterSymbol? y) 277int IEqualityComparer<IParameterSymbol>.GetHashCode(IParameterSymbol obj)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
388protected override ImmutableArray<IParameterSymbol> GetParameters(ISymbol declarationSymbol)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (4)
134async Task<MultiDictionary<IParameterSymbol, IdentifierNameSyntax>> GetParameterReferencesAsync() 136var result = new MultiDictionary<IParameterSymbol, IdentifierNameSyntax>(); 176ImmutableDictionary<IParameterSymbol, IFieldSymbol> CreateSynthesizedFields() 179using var _2 = PooledDictionary<IParameterSymbol, IFieldSymbol>.GetInstance(out var result);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (2)
191Debug.Assert(localOrParameter is IParameterSymbol or ILocalSymbol or IRangeVariableSymbol); 1149if (oldSymbol is IParameterSymbol oldParameter)
EditAndContinue\SyntaxUtilities.cs (1)
69ParameterSyntax { Parent.Parent: RecordDeclarationSyntax } parameterSyntax when symbol is not IParameterSymbol
GenerateConstructorFromMembers\CSharpGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
47protected override string ToDisplayString(IParameterSymbol parameter, SymbolDisplayFormat format)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (2)
167private static bool DefaultValueMatches(IParameterSymbol parameterSymbol1, IParameterSymbol parameterSymbol2)
InitializeParameter\CSharpInitializeMemberFromParameterCodeRefactoringProvider.cs (2)
66IParameterSymbol parameter, 106ITupleOperation tupleLeft, ITupleOperation tupleRight, IParameterSymbol sibling, out int index)
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (6)
194ImmutableArray<IParameterSymbol> GetParametersWithoutAssociatedMembers() 196using var result = TemporaryArray<IParameterSymbol>.Empty; 198foreach (var parameter in constructor.Parameters) 214ISymbol CreateField(IParameterSymbol parameter) 240ISymbol CreateProperty(IParameterSymbol parameter) 275IParameterSymbol parameter,
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider_Update.cs (7)
31ImmutableArray<IParameterSymbol> parameters, 57var currentParameter = (IParameterSymbol?)parameter.GetSymbolKey(cancellationToken).Resolve(currentCompilation, cancellationToken: cancellationToken).GetAnySymbol(); 80IParameterSymbol parameter, 141Compilation compilation, IParameterSymbol parameter, CancellationToken cancellationToken) where TSymbol : class, ISymbol 164IParameterSymbol parameter, 202IParameterSymbol parameter,
InlineHints\CSharpInlineParameterNameHintsService.cs (4)
34ArrayBuilder<(int position, string? identifierArgument, IParameterSymbol? parameter, HintKind kind)> buffer, 50ArrayBuilder<(int position, string? identifierArgument, IParameterSymbol? parameter, HintKind kind)> buffer, 68ArrayBuilder<(int position, string? identifierArgument, IParameterSymbol? parameter, HintKind kind)> buffer, 95protected override bool IsIndexer(SyntaxNode node, IParameterSymbol parameter)
InlineHints\CSharpInlineTypeHintsService.cs (1)
81var parameter = semanticModel.GetDeclaredSymbol(parameterNode, cancellationToken);
IntroduceParameter\CSharpIntroduceParameterCodeRefactoringProvider.cs (1)
28protected override SyntaxNode GenerateExpressionFromOptionalParameter(IParameterSymbol parameterSymbol)
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (2)
89if (symbol is IParameterSymbol parameter) 152IParameterSymbol symbol)
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
115case IParameterSymbol:
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (3)
283private static TNode ReplaceReferencesToParameterWithValue<TNode>(SemanticModel semanticModel, IParameterSymbol parameter, TNode node) 290private sealed class Rewriter(SemanticModel semanticModel, IParameterSymbol parameter) : CSharpSyntaxRewriter 293private readonly IParameterSymbol _parameter = parameter;
SignatureHelp\AbstractCSharpSignatureHelpProvider.cs (1)
45IParameterSymbol parameter,
SignatureHelp\AttributeSignatureHelpProvider.cs (1)
166foreach (var parameter in constructor.Parameters)
SignatureHelp\GenericNameSignatureHelpProvider_Method.cs (1)
83foreach (var parameter in method.Parameters)
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_DelegateAndFunctionPointerInvoke.cs (1)
84foreach (var parameter in invokeMethod.Parameters)
SignatureHelp\LightweightOverloadResolution.cs (2)
83var parameter = parameters[parameterIndex]; 110private bool IsCompatibleArgument(ArgumentSyntax argument, IParameterSymbol parameter)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider_DelegateType.cs (1)
56foreach (var parameter in invokeMethod.Parameters)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (2)
164var lambdaParameter = lambdaMethod.Parameters[i]; 165var invokedParameter = invokedMethod.Parameters[i];
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
137if (exprSymbol is not IParameterSymbol and not ILocalSymbol)
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
73var firstParameter = constructor.Parameters[0];
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (2)
114private static bool IsSliceFirstParameter(IParameterSymbol parameter) 118private static bool IsSliceSecondParameter(IParameterSymbol parameter)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (9)
144PooledDictionary<ISymbol, IParameterSymbol> candidateMembersToRemove, 153private readonly PooledDictionary<ISymbol, IParameterSymbol> _candidateMembersToRemove = candidateMembersToRemove; 323var candidateMembersToRemove = PooledDictionary<ISymbol, IParameterSymbol>.GetInstance(); 387Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove) 409Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove) 416using var _2 = ArrayBuilder<(IParameterSymbol parameter, SyntaxNode assignedMemberDeclaration, bool parameterIsWrittenTo)>.GetInstance(out var orderedParameterAssignments); 466Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove, 467ArrayBuilder<(IParameterSymbol parameter, SyntaxNode assignedMemberDeclaration, bool parameterIsWrittenTo)>? orderedParameterAssignments, 533semanticModel.GetSymbolInfo(assignmentExpression.Right, cancellationToken).GetAnySymbol() is IParameterSymbol parameter &&
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (5)
95private static async Task<MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol>)>> GetUnassignedParametersAsync( 105var result = new MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol>)>(); 151MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol> unassignedParameters)>.ValueSet values, 155SyntaxGenerator generator, ImmutableArray<IParameterSymbol> unassignedParameters) 159foreach (var parameter in unassignedParameters)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAboveReturnCodeFixProvider.cs (1)
33MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol> unassignedParameters)>.ValueSet values,
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAtStartCodeFixProvider.cs (1)
57MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol> unassignedParameters)>.ValueSet values,
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (16)
49} && arg.WalkDownConversion() is IParameterReferenceOperation { Parameter: IParameterSymbol param } 167var left = GetParamFromArgument(leftOperand); 168var right = GetParamFromArgument(rightOperand); 185ImmutableArray<IParameterSymbol> parameters, 229IParameterSymbol parameter) 242Instance: IParameterReferenceOperation { Parameter: IParameterSymbol referencedParameter }, 248Instance: IParameterReferenceOperation { Parameter: IParameterSymbol referencedParameter }, 305if (arg is { Parameter: IParameterSymbol param, Value.Syntax: ExpressionSyntax captured }) 505var parameter = methodSymbol.Parameters.First(); 569IParameterSymbol parameter, 587Parameter: IParameterSymbol referencedParameter1 607private static IParameterSymbol? GetParamFromArgument(IOperation operation) 640var invokedOn = GetParamFromArgument(instance); 641var param = GetParamFromArgument(arg); 958IParameterSymbol parameter, 992IParameterSymbol? referencedParameter = null;
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
40public override ImmutableArray<IParameterSymbol> TryMakeParameters(SemanticModel semanticModel, SyntaxNode target, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (3)
87var thisParameter = (IParameterSymbol?)captures.FirstOrDefault(c => c.IsThisParameter()); 208private static ImmutableArray<(IParameterSymbol symbol, ISymbol capture)> CreateParameterSymbols(ImmutableArray<ISymbol> captures)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (5)
180else if (symbol is IParameterSymbol parameter) 225var parameter = method.Parameters.Where(p => p.Name == identifier.Text).FirstOrDefault(); 232var parameter = method.Parameters[index]; 256var parameterSymbol = model.GetDeclaredSymbol(optionalParameter, cancellationToken); 302static TypeSyntax? TryGetParameterTypeSyntax(IParameterSymbol? parameterSymbol, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (2)
250static ParameterSyntax PromoteParameter(SyntaxGenerator generator, ParameterSyntax parameterNode, IParameterSymbol delegateParameter) 315private static EqualsValueClauseSyntax GetDefaultValue(SyntaxGenerator generator, IParameterSymbol parameter)
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (2)
32protected sealed override bool IsLegalToAddNamedArguments(ImmutableArray<IParameterSymbol> parameters, int argumentCount) 38protected override bool IsImplicitIndexOrRangeIndexer(ImmutableArray<IParameterSymbol> parameters, TSyntax argument, SemanticModel semanticModel)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (23)
Semantics\LambdaDiscardParametersTests.cs (4)
113var symbol1 = model.GetDeclaredSymbol(underscore); 395static ImmutableArray<string> getParameterAttributes(IParameterSymbol parameter) => parameter.GetAttributes().SelectAsArray(a => a.ToString()); 569var parameterSymbol1 = model.GetDeclaredSymbol(underscoreParameters[0]); 573var parameterSymbol2 = model.GetDeclaredSymbol(underscoreParameters[1]);
Semantics\LambdaTests.cs (7)
2667var parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[0]); 2670parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[1]); 2673parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[3]); 2680parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[0]); 2683parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[2]); 8089var newParam = newLambdaSymbol.Parameters.Single();
Semantics\LocalFunctionTests.cs (2)
854var paramSymbol = model.GetDeclaredSymbol(parameter); 5118var parameterSymbol = model.GetDeclaredSymbol(parameter);
Semantics\RecordStructTests.cs (1)
5850var parameter = model.GetDeclaredSymbol(parameterSyntax)!;
Semantics\RefExtensionMethodsTests.cs (8)
2147var symbol = (IParameterSymbol)model.GetDeclaredSymbolForNode(parameter.AsNode()); 2166var symbol = (IParameterSymbol)model.GetDeclaredSymbolForNode(parameter.AsNode()); 2185var symbol = (IParameterSymbol)model.GetDeclaredSymbolForNode(parameter.AsNode()); 2204var symbol = (IParameterSymbol)model.GetDeclaredSymbolForNode(parameter.AsNode());
Semantics\RefFieldTests.cs (1)
12005private static void VerifyParameterSymbol(IParameterSymbol parameter, string expectedDisplayString, RefKind expectedRefKind, ScopedKind expectedScope)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (80)
Compilation\GetSemanticInfoTests.cs (8)
1169var parameterSymbol = (IParameterSymbol)bindInfo.Symbol; 1198var parameterSymbol = (IParameterSymbol)bindInfo.Symbol; 2357var parameterSymbol = model.GetDeclaredSymbol(lambdaSyntax.Parameter); 2567var declaredSymbol = model.GetDeclaredSymbol(expr); 4402var symbol = model.GetDeclaredSymbol(syntax); // Doesn't assert. 5485var parameterSymbol = model.GetDeclaredSymbol(parameterSyntax);
Compilation\SemanticModelAPITests.cs (12)
354var symbol1 = model1.GetDeclaredSymbol(paramdecl); 355var symbol2 = model2.GetDeclaredSymbol(paramdecl); 376var symbol1 = model1.GetDeclaredSymbol(paramdecl1); 378var symbol2 = model2.GetDeclaredSymbol(paramdecl2); 968var sym1 = model1.GetDeclaredSymbol(para1); 969var sym2 = model2.GetDeclaredSymbol(para2); 1197var parasym = model.GetDeclaredSymbol(paras.First()); 1964var parameterSymbol = speculativeModel.GetDeclaredSymbol(lambdaParam); 2613var paramSymbol = (IParameterSymbol)param; 2685var parameterSymbol = speculativeModel.GetDeclaredSymbol(lambdaParam); 3134Assert.Equal(TypeKind.Error, ((IParameterSymbol)symbol).Type.TypeKind);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (21)
824var symbol = model.GetDeclaredSymbol(methodDecl.ParameterList.Parameters[0]); 840var symbol = model.GetDeclaredSymbol(delegateDecl.ParameterList.Parameters[0]); 860var symbol = model.GetDeclaredSymbol(methodDecl.ParameterList.Parameters[0]); 987var psym = model.GetDeclaredSymbol(memDecl.ParameterList.Parameters[0]); 1334var paramSymbol = model.GetDeclaredSymbol(parameterDecl); 1437var paramSymbol = model.GetDeclaredSymbol(parameterDecl); 1877var typeA = ((IParameterSymbol)symbols[0]).Type; 1881var typeB = ((IParameterSymbol)symbols[0]).Type; 2014var type = ((IParameterSymbol)symbols[0]).Type; 3672var parameter = (IParameterSymbol)info.Symbol; 3902var symbol = model.GetDeclaredSymbol(param); 5223var symbol1 = VerifyParameter(model, decls[0], 0, "[System.Int32 x = 2]", "System.Int32", 2); 5224var symbol2 = VerifyParameter(model, decls[1], 1, "[? = null]", "System.Int32", 3); 5244var symbol1 = VerifyParameter(model, decls[0], 0, "System.Int32 x", null, null); 5245var symbol2 = VerifyParameter(model, decls[1], 1, "[? = null]", "System.Int32", 3); 5265var symbol1 = VerifyParameter(model, decls[0], 0, "[System.Int32 x = 2]", "System.Int32", 2); 5266var symbol2 = VerifyParameter(model, decls[1], 1, "[? = null]", "System.Int32", 3); 5642private static IParameterSymbol VerifyParameter( 5650var symbol = (IParameterSymbol)model.GetDeclaredSymbol(decl);
Compilation\SemanticModelGetSemanticInfoTests.cs (2)
6343var param = (IParameterSymbol)semanticInfo.Symbol;
Compilation\SymbolVisitorTests.cs (3)
144public override void VisitParameter(IParameterSymbol symbol) 326public override string VisitParameter(IParameterSymbol symbol) 465public override int VisitParameter(IParameterSymbol symbol, StringBuilder argument)
DocumentationComments\CrefTests.cs (2)
6708var parameterSymbol = ((IMethodSymbol)model.GetSymbolInfo(cref).Symbol).Parameters.Single(); 6751var parameterSymbol = ((IMethodSymbol)model.GetSymbolInfo(cref).Symbol).Parameters.Single();
Symbols\Source\DeclaringSyntaxNodeTests.cs (3)
61foreach (IParameterSymbol p in meth.Parameters) 68foreach (IParameterSymbol p in prop.Parameters) 164foreach (IParameterSymbol p in sym.Parameters)
Symbols\Source\EventTests.cs (2)
442var parameterSymbol = model.GetDeclaredSymbol(parameterSyntax); 488var parameterSymbol = model.GetDeclaredSymbol(parameterSyntax);
Symbols\Source\MethodTests.cs (1)
121var x = m.Parameters[0];
Symbols\Source\NullablePublicAPITests.cs (24)
2633IParameterSymbol symbol = (IParameterSymbol)info.Symbol; 3502var parameterSymbol = (IParameterSymbol)model.GetSymbolInfo(o1Ref).Symbol; 3556var o1Symbol = (IParameterSymbol)model.GetSymbolInfo(o1Ref).Symbol; 3567var o2Symbol = (IParameterSymbol)model.GetSymbolInfo(o2Ref).Symbol; 3617var o1Symbol = (IParameterSymbol)model.GetSymbolInfo(o1Ref).Symbol; 3628var o2Symbol = (IParameterSymbol)model.GetSymbolInfo(o2Ref).Symbol; 3776var parameterSymbol = (IParameterSymbol)model.GetSymbolInfo(o1Ref).Symbol; 3811var paramSymbol = model.GetDeclaredSymbol(parameter); 3916var o1Symbol = (IParameterSymbol)model.GetSymbolInfo(o1Reference).Symbol; 3930var o3Symbol = (IParameterSymbol)model.GetSymbolInfo(o3Reference).Symbol; 4049var o1Symbol = model.GetDeclaredSymbol(o1Decl); 4129var o1Result = lookupResults.OfType<IParameterSymbol>().First(p => p.Name == "o1"); 4130var oResult = lookupResults.OfType<IParameterSymbol>().First(p => p.Name == "o");
Symbols\SymbolEqualityTests.cs (2)
940var p1 = lambdaSymbol.Parameters.Single(); 942var p2 = semanticModel2.GetDeclaredSymbol(lambdaSyntax.Parameter);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
Extensions.cs (3)
751public static ImmutableArray<IParameterSymbol> GetParameters(this ISymbol member) 760return ImmutableArray<IParameterSymbol>.Empty; 825return ((IParameterSymbol)symbol).Type;
Microsoft.CodeAnalysis.CSharp.Workspaces (39)
Classification\SyntaxClassification\DiscardSyntaxClassifier.cs (1)
37var symbol = semanticModel.GetDeclaredSymbol(parameter, cancellationToken);
Classification\SyntaxClassification\NameSyntaxClassifier.cs (2)
159symbol is IParameterSymbol { ContainingSymbol: IMethodSymbol { Name: WellKnownMemberNames.TopLevelStatementsEntryPointMethodName } }) 211case IParameterSymbol parameterSymbol:
Recommendations\CSharpRecommendationServiceRunner.cs (3)
408if (symbol is not IParameterSymbol parameterSymbol) 755if (symbol is IParameterSymbol parameter) 790var useBaseReferenceAccessibility = symbol is IParameterSymbol { IsThis: true } p && !p.Type.Equals(containerType);
Rename\CSharpRenameRewriterLanguageService.cs (3)
776(matchingLocal.IsKind(SymbolKind.Parameter) && ((IParameterSymbol)matchingLocal).Type.IsDelegateType()); 826if (renamedSymbol is IParameterSymbol renamedParameterSymbol && 830var matchingParameterSymbol = methodSymbol.PartialImplementationPart.Parameters[renamedParameterSymbol.Ordinal];
Simplification\CSharpSimplificationService.Expander.cs (1)
223var parameterSymbol = _semanticModel.GetDeclaredSymbol(node.Parameter);
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
53var oldSymbol = semanticModel.GetDeclaredSymbol(parameterSyntax, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
39public static IParameterSymbol? DetermineParameter(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
22public static IParameterSymbol? DetermineParameter(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
441var parameter = member.Parameters[index]; 474public static IParameterSymbol GetRequiredDeclaredSymbol(this SemanticModel semanticModel, ParameterSyntax syntax, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (2)
268public IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 271public IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (4)
669if (castedSymbol is not IFieldSymbol and not ILocalSymbol and not IParameterSymbol and not IParameterSymbol { RefKind: RefKind.Ref }) 1421var originalParameter = originalParameters[i]; 1422var rewrittenParameter = rewrittenParameters[i];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
283IEnumerable<IParameterSymbol> parameters, 294foreach (var parameter in parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (9)
22ImmutableArray<IParameterSymbol> parameterDefinitions, 32ImmutableArray<IParameterSymbol> parameterDefinitions, 44ImmutableArray<IParameterSymbol> parameterDefinitions, 52foreach (var p in parameterDefinitions) 63internal static ParameterSyntax GetParameter(IParameterSymbol parameter, CSharpCodeGenerationContextInfo info, bool isExplicit, bool isFirstParam, bool seenOptional) 77IParameterSymbol parameter, bool isFirstParam) 98IParameterSymbol parameter, 118private static ExpressionSyntax GenerateEqualsValueClauseWorker(SyntaxGenerator generator, IParameterSymbol parameter, object? value) 122IParameterSymbol parameter, bool isExplicit, CSharpCodeGenerationContextInfo info)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (7)
704ImmutableArray<ImmutableArray<IParameterSymbol>> parameterizedSymbols, 720ImmutableArray<ImmutableArray<IParameterSymbol>> parameterizedSymbols, 724using var _1 = ArrayBuilder<ImmutableArray<IParameterSymbol>>.GetInstance(out var parameterListsWithMatchingCount); 725using var _2 = ArrayBuilder<ImmutableArray<IParameterSymbol>>.GetInstance(out var parameterListsWithoutMatchingCount); 755ImmutableArray<ImmutableArray<IParameterSymbol>> parameterizedSymbols, 777var parameter = parameterSet[index]; 1205SemanticModel.GetDeclaredSymbol(equalsValue.Parent, CancellationToken) is IParameterSymbol parameter)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Completion\AbstractArgumentProviderTests`1.cs (4)
66var parameter = GetParameterSymbolInfo(workspace, semanticModel, root, position, CancellationToken.None); 75private IParameterSymbol GetParameterSymbolInfo(Workspace workspace, SemanticModel semanticModel, SyntaxNode root, int position, CancellationToken cancellationToken) 112static int GetMinimumArgumentCount(ImmutableArray<IParameterSymbol> parameters) 115static int GetMaximumArgumentCount(ImmutableArray<IParameterSymbol> parameters)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (15)
CodeGeneration\CodeGenerationTests.cs (15)
105ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 141ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 184ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 224ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 266Func<SemanticModel, IParameterSymbol> fromType, 322ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters, 343ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 374ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 418ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters = default, 655internal static Func<SemanticModel, IParameterSymbol> Parameter(Type type, string name, bool hasDefaultValue = false, object defaultValue = null, bool isParams = false) 662internal static Func<SemanticModel, IParameterSymbol> Parameter(string typeFullName, string parameterName, bool hasDefaultValue = false, object defaultValue = null, bool isParams = false, int typeArrayRank = 0) 678internal static ImmutableArray<Func<SemanticModel, IParameterSymbol>> Parameters(params Func<SemanticModel, IParameterSymbol>[] p) 687private static ImmutableArray<IParameterSymbol> GetParameterSymbols(ImmutableArray<Func<SemanticModel, IParameterSymbol>> parameters, TestContext context)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (6)
AbstractTypeParameterChecker.cs (4)
27public abstract IParameterSymbol GetThisParameter(IMethodSymbol method); 59public sealed override void VisitParameter(IParameterSymbol symbol) 101foreach (var parameter in symbol.Parameters) 113foreach (var parameter in symbol.Parameters)
InstructionDecoder.cs (2)
41internal virtual void AppendParameterTypeName(StringBuilder builder, IParameterSymbol parameter) 78var parameter = parameters[i];
Microsoft.CodeAnalysis.Features (246)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (2)
28ImmutableArray<IParameterSymbol> missingParameters, 35private readonly ImmutableArray<IParameterSymbol> _missingParameters = missingParameters;
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.ConstructorCandidate.cs (2)
11private readonly struct ConstructorCandidate(IMethodSymbol constructor, ImmutableArray<ISymbol> missingMembers, ImmutableArray<IParameterSymbol> missingParameters) 15public readonly ImmutableArray<IParameterSymbol> MissingParameters = missingParameters;
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.cs (1)
143static bool CanHaveRequiredParameters(ImmutableArray<IParameterSymbol> parameters)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (4)
79ImmutableArray<IParameterSymbol> parametersForSelectedMembers, 116private static bool SelectedMembersAlreadyExistAsParameters(ImmutableArray<string> parameterNamesForSelectedMembers, ImmutableArray<IParameterSymbol> constructorParams) 120private static ConstructorCandidate CreateConstructorCandidate(ImmutableArray<IParameterSymbol> parametersForSelectedMembers, ImmutableArray<ISymbol> selectedMembers, IMethodSymbol constructor) 122using var _0 = ArrayBuilder<IParameterSymbol>.GetInstance(out var missingParametersBuilder);
ChangeSignature\AbstractChangeSignatureService.cs (11)
70protected abstract TArgumentSyntax CreateExplicitParamsArrayFromIndividualArguments<TArgumentSyntax>(SeparatedSyntaxList<TArgumentSyntax> newArguments, int startingIndex, IParameterSymbol parameterSymbol) 88protected abstract ImmutableArray<IParameterSymbol> GetParameters(ISymbol declarationSymbol); 480var argumentToParameterMap = new Dictionary<IUnifiedArgumentSyntax, IParameterSymbol>(); 481var parameterToIndexMap = new Dictionary<IParameterSymbol, int>(); 485var decl = declarationParametersToPermute[i]; 511var param = argumentToParameterMap[argument]; 544var param = argumentToParameterMap[paramsArrayArgument]; 600private static ImmutableArray<IParameterSymbol> GetParametersToPermute( 602ImmutableArray<IParameterSymbol> originalParameters, 606var parametersToPermute = ArrayBuilder<IParameterSymbol>.GetInstance(); 615var match = originalParameters.FirstOrDefault(p => p.Name == name);
ChangeSignature\Parameter.cs (2)
19internal sealed class ExistingParameter(IParameterSymbol param) : Parameter 21public IParameterSymbol Symbol { get; } = param;
Completion\ArgumentContext.cs (2)
17IParameterSymbol parameter, 36public IParameterSymbol Parameter { get; } = parameter ?? throw new ArgumentNullException(nameof(parameter));
Completion\Providers\AbstractContextVariableArgumentProvider.cs (1)
41if (symbol.IsKind(SymbolKind.Parameter, out IParameterSymbol? parameter))
Completion\Providers\AbstractDocCommentCompletionProvider.cs (1)
102protected abstract ImmutableArray<IParameterSymbol> GetParameters(ISymbol symbol);
Completion\Providers\ImportCompletionProvider\AbstractExtensionMethodImportCompletionProvider.cs (1)
109IParameterSymbol parameterSymbol => parameterSymbol.Type,
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
385var parameter = CodeGenerationSymbolFactory.CreateParameterSymbol(
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (2)
274var param1 = invocationSymbol.Parameters.FirstOrDefault(p => syntaxFacts.StringComparer.Equals(p.Name, arg1Name)); 275var param2 = invocationSymbol.Parameters.FirstOrDefault(p => syntaxFacts.StringComparer.Equals(p.Name, arg2Name));
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
932var parameter = CodeGenerationSymbolFactory.CreateParameterSymbol(
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (5)
303return (symbol is IParameterSymbol { ContainingType: not { TypeKind: TypeKind.Delegate } }) 2367protected static bool ParameterTypesEquivalent(ImmutableArray<IParameterSymbol> oldParameters, ImmutableArray<IParameterSymbol> newParameters, bool exact) 2405protected static bool ParameterTypesEquivalent(IParameterSymbol oldParameter, IParameterSymbol newParameter, bool exact)
EditAndContinue\Utilities\Extensions.cs (3)
148=> symbol is IParameterSymbol parameter && parameter.IsSynthesizedParameter(); 163public static bool IsSynthesizedParameter(this IParameterSymbol parameter) 186public static IFieldSymbol? GetPrimaryParameterBackingField(this IParameterSymbol parameter)
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (1)
171var parameter = argIndex < parameters.Length ? parameters[argIndex.Value] : null;
ExtractMethod\MethodExtractor.Analyzer.cs (8)
157var thisParameterBeingRead = (IParameterSymbol?)dataFlowAnalysisData.ReadInside.FirstOrDefault(IsThisParameter); 522if (symbol is IParameterSymbol && variableDeclared) 654IParameterSymbol parameter => parameter.Type, 686if (localOrParameter is not IParameterSymbol parameter) 696if (localOrParameter is not IParameterSymbol parameter) 747case IParameterSymbol parameter: 950IParameterSymbol parameter => new VariableInfo(new ParameterVariableSymbol(compilation, parameter, type), style),
ExtractMethod\MethodExtractor.CodeGenerator.cs (2)
352protected ImmutableArray<IParameterSymbol> CreateMethodParameters() 354var parameters = ArrayBuilder<IParameterSymbol>.GetInstance();
ExtractMethod\MethodExtractor.TypeParameterCollector.cs (1)
37foreach (var param in symbol.Signature.Parameters)
ExtractMethod\MethodExtractor.VariableSymbol.cs (2)
116private readonly IParameterSymbol _parameterSymbol; 118public ParameterVariableSymbol(Compilation compilation, IParameterSymbol parameterSymbol, ITypeSymbol type)
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
59protected abstract string ToDisplayString(IParameterSymbol parameter, SymbolDisplayFormat format);
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.State.cs (4)
29public ImmutableArray<IParameterSymbol> Parameters { get; private set; } 99ImmutableArray<IParameterSymbol> parameters) 114private static IMethodSymbol? GetMatchingConstructorBasedOnParameterTypes(INamedTypeSymbol containingType, ImmutableArray<IParameterSymbol> parameters) 117private static bool MatchesConstructorBasedOnParameterTypes(IMethodSymbol constructor, ImmutableArray<IParameterSymbol> parameters)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (2)
145ImmutableArray<IParameterSymbol> parameters) 170private static IMethodSymbol CreateInequalityOperator(Compilation compilation, SyntaxGenerator generator, ImmutableArray<IParameterSymbol> parameters)
GenerateFromMembers\AbstractGenerateFromMembersCodeRefactoringProvider.cs (2)
90protected static ImmutableArray<IParameterSymbol> DetermineParameters( 93using var _ = ArrayBuilder<IParameterSymbol>.GetInstance(out var parameters);
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (2)
94private ImmutableArray<IParameterSymbol> DetermineParameters() 193using var _ = ArrayBuilder<IParameterSymbol>.GetInstance(out var parameters);
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (21)
66var parameter = (IParameterSymbol)semanticModel.GetRequiredDeclaredSymbol(parameterNode, cancellationToken); 85IParameterSymbol parameter, 174private static (TParameterSyntax?, IParameterSymbol?) GetParameterAtOrdinal(int index, IReadOnlyList<TParameterSyntax> parameterNodes, SemanticModel semanticModel, CancellationToken cancellationToken) 178var parameter = (IParameterSymbol)semanticModel.GetRequiredDeclaredSymbol(parameterNode, cancellationToken); 188IOperation statement, IParameterSymbol parameter, 211private static bool IsIfNullCheck(IOperation statement, IParameterSymbol parameter) 244protected bool ParameterValidForNullCheck(Document document, IParameterSymbol parameter, SemanticModel semanticModel, 294private static bool IsStringCheck(IOperation condition, IParameterSymbol parameter) 308private static bool IsNullCheck(IOperation operand1, IOperation operand2, IParameterSymbol parameter) 313IParameterSymbol parameter, 336IParameterSymbol parameter, 352IParameterSymbol parameter, 383private TStatementSyntax CreateNullCheckStatement(SemanticModel semanticModel, SyntaxGenerator generator, IParameterSymbol parameter, TSimplifierOptions options) 390Compilation compilation, SyntaxGenerator generator, IParameterSymbol parameter, string methodName, TSimplifierOptions options) 407IParameterSymbol parameter, 453IParameterSymbol parameterSymbol, 484IParameterSymbol parameter, 553Compilation compilation, SyntaxGenerator generator, IParameterSymbol parameter) 561Compilation compilation, SyntaxGenerator generator, IParameterSymbol parameter, string methodName)
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (23)
50protected abstract bool TryUpdateTupleAssignment(IBlockOperation? blockStatement, IParameterSymbol parameter, ISymbol fieldOrProperty, SyntaxEditor editor); 63IParameterSymbol parameter, 108IParameterSymbol parameter, 193IParameterSymbol parameter, 217private static ImmutableArray<IParameterSymbol> GetParametersWithoutAssociatedMembers( 222using var _ = ArrayBuilder<IParameterSymbol>.GetInstance(out var result); 224foreach (var parameter in method.Parameters) 242IParameterSymbol parameter, 265IParameterSymbol parameter, IBlockOperation? blockStatement) 278IParameterSymbol parameter, 314IParameterSymbol parameter, 364ImmutableArray<IParameterSymbol> parameters, 385var parameter = parameters[i]; 405var currentParameter = (IParameterSymbol?)parameter.GetSymbolKey(cancellationToken).Resolve(currentCompilation, cancellationToken: cancellationToken).GetAnySymbol(); 428IParameterSymbol parameter, 515IParameterSymbol parameter, 543IParameterSymbol parameter, IBlockOperation? blockStatement, 578IParameterSymbol parameter, IBlockOperation? blockStatement) 606private static IOperation? TryFindFieldOrPropertyAssignmentStatement(IParameterSymbol parameter, IBlockOperation? blockStatement) 635IParameterSymbol parameter, IBlockOperation? blockStatement, out ISymbol? fieldOrProperty) 672IAssignmentOperation assignmentExpression, IParameterSymbol parameter) 676Document document, IParameterSymbol parameter, IBlockOperation? blockStatement, ImmutableArray<NamingRule> rules, ImmutableArray<string> parameterWords, CancellationToken cancellationToken)
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (5)
50IParameterSymbol parameter, 82if (!TryGetParameterSymbol(selectedParameter, semanticModel, out var parameter, cancellationToken)) 135[NotNullWhen(true)] out IParameterSymbol? parameter, 138parameter = (IParameterSymbol?)semanticModel.GetDeclaredSymbol(parameterNode, cancellationToken); 187IParameterSymbol parameter,
InitializeParameter\InitializeParameterHelpersCore.cs (6)
15public static ImmutableArray<(IParameterSymbol parameter, bool before)> GetSiblingParameters(IParameterSymbol parameter) 17using var _ = ArrayBuilder<(IParameterSymbol, bool before)>.GetInstance(out var siblings); 37public static bool IsParameterReference(IOperation? operation, IParameterSymbol parameter) 42IOperation? value, IParameterSymbol parameter) 62public static string GenerateUniqueName(IParameterSymbol parameter, ImmutableArray<string> parameterNameParts, NamingRule rule)
InlineHints\AbstractInlineParameterNameHintsService.cs (10)
30ArrayBuilder<(int position, string? identifierArgument, IParameterSymbol? parameter, HintKind kind)> buffer, 33protected abstract bool IsIndexer(SyntaxNode node, IParameterSymbol parameter); 64using var _2 = ArrayBuilder<(int position, string? identifierArgument, IParameterSymbol? parameter, HintKind kind)>.GetInstance(out var buffer); 122ArrayBuilder<(int position, string? identifierArgument, IParameterSymbol? parameter, HintKind kind)> parameterHints) 132ArrayBuilder<(int position, string? identifierArgument, IParameterSymbol? parameter, HintKind kind)> parameterHints) 150ArrayBuilder<(int position, string? identifierArgument, IParameterSymbol? parameter, HintKind kind)> parameterHints) 167static bool HasAlphaSuffix(IParameterSymbol? parameter, out ReadOnlyMemory<char> prefix) 185static bool HasNumericSuffix(IParameterSymbol? parameter, out ReadOnlyMemory<char> prefix) 219protected static bool MatchesMethodIntent(IParameterSymbol? parameter) 276private static bool ParameterMatchesArgumentName(string? identifierArgument, IParameterSymbol parameter, ISyntaxFactsService syntaxFacts)
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (7)
162? ImmutableArray<(IParameterSymbol, string)>.Empty 249ImmutableArray<(IParameterSymbol parameterSymbol, TExpressionSyntax expression)> parametersToGenerateFreshVariablesFor, 250ImmutableArray<(IParameterSymbol parameterSymbol, string identifierName)> parametersWithVariableDeclarationArgument, 278(IParameterSymbol parameterSymbol, TExpressionSyntax expression) parameterAndExpression) 324ImmutableArray<(IParameterSymbol parameter, string identifierName)> parametersWithVariableDeclarationArgument, 325ImmutableDictionary<IParameterSymbol, TExpressionSyntax> parametersToReplace, 357ImmutableArray<IParameterSymbol> parametersNeedGenerateFreshVariableFor,
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (9)
26ImmutableArray<(IParameterSymbol parameterSymbol, string name)> parametersWithVariableDeclarationArgument, 27ImmutableArray<(IParameterSymbol parameterSymbol, TExpressionSyntax initExpression)> parametersToGenerateFreshVariablesFor, 28ImmutableDictionary<IParameterSymbol, TExpressionSyntax> parametersToReplace, 48public ImmutableArray<(IParameterSymbol parameterSymbol, string name)> ParametersWithVariableDeclarationArgument { get; } = parametersWithVariableDeclarationArgument; 76public ImmutableArray<(IParameterSymbol parameterSymbol, TExpressionSyntax initExpression)> ParametersToGenerateFreshVariablesFor { get; } = parametersToGenerateFreshVariablesFor; 124public ImmutableDictionary<IParameterSymbol, TExpressionSyntax> ParametersToReplace { get; } = parametersToReplace; 439var parameterSymbol = argument.Parameter; 483ImmutableArray<(IParameterSymbol parameterSymbol, string name)> parametersWithVariableDeclarationArgument, 499var parameterSymbol = argumentOperation.Parameter;
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (3)
44protected abstract SyntaxNode GenerateExpressionFromOptionalParameter(IParameterSymbol parameterSymbol); 79if (expressionSymbol is IParameterSymbol parameterSymbol && parameterSymbol.ContainingSymbol.Equals(containingSymbol)) 211if (symbol is IParameterSymbol parameter)
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (17)
62private async Task<Dictionary<TIdentifierNameSyntax, IParameterSymbol>> MapExpressionToParametersAsync(CancellationToken cancellationToken) 64var nameToParameterDict = new Dictionary<TIdentifierNameSyntax, IParameterSymbol>(); 71if (symbol is IParameterSymbol parameterSymbol) 141foreach (var parameterSymbol in _methodSymbol.Parameters) 235var parameterToArgumentMap = new Dictionary<IParameterSymbol, int>(); 305Dictionary<IParameterSymbol, int> parameterToArgumentMap, SyntaxNode currentArgumentListSyntax, 306SyntaxNode argumentListSyntax, SyntaxNode invocation, ImmutableArray<IParameterSymbol> validParameters, 315foreach (var parameterSymbol in validParameters) 388private async Task<SyntaxNode> ExtractMethodAsync(ImmutableArray<IParameterSymbol> validParameters, string newMethodIdentifier, SyntaxGenerator generator, CancellationToken cancellationToken) 441private async Task<SyntaxNode> CreateMethodDeclarationAsync(SyntaxNode newStatement, ImmutableArray<IParameterSymbol>? validParameters, 487var parameterToArgumentMap = new Dictionary<IParameterSymbol, int>(); 542Dictionary<TIdentifierNameSyntax, IParameterSymbol> mappingDictionary, 543Dictionary<IParameterSymbol, int> parameterToArgumentMap, 588var argumentParameter = _semanticFacts.FindParameterForArgument(semanticModel, invocationArgument, cancellationToken); 602private static bool ShouldParameterBeSkipped(Compilation compilation, IParameterSymbol parameter) 608Dictionary<IParameterSymbol, int> mapping, SeparatedSyntaxList<SyntaxNode> arguments, 613var argumentParameter = _semanticFacts.FindParameterForArgument(invocationSemanticModel, arguments[i], cancellationToken);
IntroduceVariable\AbstractIntroduceVariableService.cs (3)
187!state.GetSemanticMap(cancellationToken).AllReferencedSymbols.OfType<IParameterSymbol>().Any()) 436protected static IEnumerable<IParameterSymbol> GetAnonymousMethodParameters( 443.OfType<IParameterSymbol>()
IntroduceVariable\AbstractIntroduceVariableService.State_ConstructorInitializer.cs (1)
31if (bindingMap.AllReferencedSymbols.OfType<IParameterSymbol>().Any())
IntroduceVariable\AbstractIntroduceVariableService.State_Field.cs (1)
38if (bindingMap.AllReferencedSymbols.OfType<IParameterSymbol>().Any())
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (3)
57foreach (var parameter in symbol.Parameters) 113public override void VisitParameter(IParameterSymbol symbol) 123foreach (var parameter in symbol.Parameters)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (2)
343else if (symbol is IParameterSymbol parameter) 646private async Task AddDescriptionForParameterAsync(IParameterSymbol symbol)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedMethodSymbol.cs (1)
62public ImmutableArray<IParameterSymbol> Parameters => _symbol.Parameters;
MetadataAsSource\AbstractMetadataAsSourceService.WrappedPropertySymbol.cs (1)
48public ImmutableArray<IParameterSymbol> Parameters => _symbol.Parameters;
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
120var symbolToFind = symbol is IParameterSymbol parameterSymbol ? parameterSymbol.ContainingSymbol : symbol;
QuickInfo\CommonSemanticQuickInfoProvider.ErrorVisitor.cs (2)
40foreach (var parameter in symbol.Parameters) 72public override bool VisitParameter(IParameterSymbol symbol)
RQName\RQNodeBuilder.cs (2)
139private static IList<RQParameter>? BuildParameterList(ImmutableArray<IParameterSymbol> parameters) 143foreach (var parameter in parameters)
Shared\Extensions\ISymbolExtensions_2.cs (2)
193IParameterSymbol parameter => GetParameterDocumentation(parameter, compilation, cancellationToken) ?? DocumentationComment.Empty, 201private static DocumentationComment? GetParameterDocumentation(IParameterSymbol parameter, Compilation compilation, CancellationToken cancellationToken)
Shared\Extensions\ISymbolExtensions_Sorting.cs (5)
52ImmutableArray<IParameterSymbol> xParameters, string[] xTypeNames, 53ImmutableArray<IParameterSymbol> yParameters, string[] yTypeNames) 75var xParam = xParameters[i]; 76var yParam = yParameters[i]; 140private static ImmutableArray<IParameterSymbol> GetMethodOrIndexerOrEventParameters(ISymbol symbol)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (5)
58private readonly ConcurrentDictionary<IParameterSymbol, bool> _referencedParameters; 535var unusedParameter = (IParameterSymbol)symbol; 722foreach (var parameter in method.Parameters) 743foreach (var parameter in method.Parameters)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (4)
45private readonly ConcurrentDictionary<IParameterSymbol, bool> _unusedParameters = []; 120IParameterSymbol parameter, 196private bool IsUnusedParameterCandidate(IParameterSymbol parameter, INamedTypeSymbol? interpolatedStringHandlerAttributeType, CancellationToken cancellationToken) 290IParameterSymbol parameter,
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
243var parameter = method.Parameters.Single();
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (8)
183ImmutableArray<IParameterSymbol> parameters, 193ImmutableArray<IParameterSymbol> parameters, 210ImmutableArray<IParameterSymbol> parameters) 221var parameterWithMatchingName = GetParameterWithMatchingName(parameters, searchArgumentName); 244private static IParameterSymbol? GetParameterWithMatchingName(ImmutableArray<IParameterSymbol> parameters, string searchArgumentName) 246foreach (var p in parameters) 259ImmutableArray<IParameterSymbol> parameters,
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (1)
198string argumentName, ImmutableArray<IParameterSymbol> parameters, ref int parameterIndex)
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
113ImmutableArray<IParameterSymbol> parameters,
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
493var parameter = method.Parameters[i]; 518Compilation compilation, TypeInfo argumentTypeInfo, IParameterSymbol parameter,
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (3)
120var parameterSymbol = CreateParameterSymbol( 159private static IParameterSymbol CreateParameterSymbol( 167var newParameterSymbol = CodeGenerationSymbolFactory.CreateParameterSymbol(
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (5)
56private ImmutableArray<IParameterSymbol> _parameters; 185ImmutableArray<IParameterSymbol> allParameters, 206ImmutableArray<IParameterSymbol> parameters, 258var ctorParameter = ctor.Parameters[i]; 418using var _ = ArrayBuilder<IParameterSymbol>.GetInstance(out var parameters);
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (2)
19ImmutableArray<IParameterSymbol> parameters, 105var constructorParameter = constructorInCompilation.Parameters[i];
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
22public abstract ImmutableArray<IParameterSymbol> TryMakeParameters(SemanticModel semanticModel, SyntaxNode target, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
231private static ImmutableArray<string> GenerateParameterNamesBasedOnParameterTypes(ImmutableArray<IParameterSymbol> parameters) 236foreach (var parameter in parameters)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
207private async ValueTask<ImmutableArray<IParameterSymbol>> DetermineParametersAsync(CancellationToken cancellationToken) 214var result = new FixedSizeArrayBuilder<IParameterSymbol>(modifiers.Length);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
222var parameter = containingMethod.Parameters[i];
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
36public ImmutableArray<IParameterSymbol> Parameters { get; private set; }
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (7)
42ImmutableArray<IParameterSymbol> GetNonCapturedPrimaryConstructorParameters( 46using var _2 = ArrayBuilder<IParameterSymbol>.GetInstance(out var result); 65bool IsAssignedToFieldOrProperty(ImmutableArray<IFieldSymbol> fields, ImmutableArray<IPropertySymbol> properties, IParameterSymbol parameter) 68bool IsAssignedToField(IFieldSymbol field, IParameterSymbol parameter) 84bool IsAssignedToProperty(IPropertySymbol property, IParameterSymbol parameter) 100bool InitializerReferencesParameter(SyntaxNode? initializer, IParameterSymbol parameter) 151foreach (var parameter in methodSymbol.Parameters)
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (2)
775private bool AllParametersMatch(ImmutableArray<IParameterSymbol> symbolParameters, ParameterInfo[] expectedParameters) 793private bool ParameterMatches(IParameterSymbol symbol, ParameterInfo parameterInfo)
StackTraceExplorer\AbstractStackTraceSymbolResolver.cs (2)
83protected static bool MatchParameters(ImmutableArray<IParameterSymbol> parameters, StackFrameParameterList stackFrameParameters) 93var paramSymbol = parameters[i];
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (4)
140ImmutableArray<IParameterSymbol> parameters, 151ImmutableArray<IParameterSymbol> parameters, TArgumentListSyntax argumentList, 178protected abstract bool IsLegalToAddNamedArguments(ImmutableArray<IParameterSymbol> parameters, int argumentCount); 184protected abstract bool IsImplicitIndexOrRangeIndexer(ImmutableArray<IParameterSymbol> parameters, TBaseArgumentSyntax argument, SemanticModel semanticModel);
ValueTracking\ValueTracker.cs (3)
32or IParameterSymbol) 96case IParameterSymbol parameterSymbol: 175IParameterSymbol parameterSymbol,
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\TestOperationVisitor.cs (1)
580var parameter = operation.Parameter;
Microsoft.CodeAnalysis.VisualBasic (34)
Binding\MemberSemanticModel.vb (1)
509Public Overloads Overrides Function GetDeclaredSymbol(parameter As ParameterSyntax, Optional cancellationToken As CancellationToken = Nothing) As IParameterSymbol
Compilation\SemanticModel.vb (1)
2609Public MustOverride Overloads Function GetDeclaredSymbol(parameter As ParameterSyntax, Optional cancellationToken As CancellationToken = Nothing) As IParameterSymbol
Compilation\SpeculativeSemanticModelWithMemberModel.vb (1)
169Public Overloads Overrides Function GetDeclaredSymbol(parameter As ParameterSyntax, Optional cancellationToken As CancellationToken = Nothing) As IParameterSymbol
Compilation\SyntaxTreeSemanticModel.vb (1)
1051Public Overloads Overrides Function GetDeclaredSymbol(parameter As ParameterSyntax, Optional cancellationToken As CancellationToken = Nothing) As IParameterSymbol
Operations\VisualBasicOperationFactory.vb (2)
948Dim parameter As IParameterSymbol = boundParameter.ParameterSymbol 1007Dim parameter As IParameterSymbol = boundParameterEqualsValue.Parameter
Operations\VisualBasicOperationFactory_Methods.vb (1)
249parameter As IParameterSymbol,
SymbolDisplay\SymbolDisplayVisitor.Members.vb (4)
146AddParametersIfRequired(isExtensionMethod:=False, parameters:=StaticCast(Of IParameterSymbol).From(sourceSymbol.DelegateParameters)) 518Public Overrides Sub VisitParameter(symbol As IParameterSymbol) 658Private Sub AddParametersIfRequired(isExtensionMethod As Boolean, parameters As ImmutableArray(Of IParameterSymbol)) 690Private Function IsExplicitByRefParameter(parameter As IParameterSymbol) As Boolean
Symbols\MethodSymbol.vb (2)
971Private ReadOnly Property IMethodSymbol_Parameters As ImmutableArray(Of IParameterSymbol) Implements IMethodSymbol.Parameters 973Return ImmutableArray(Of IParameterSymbol).CastUp(Me.Parameters)
Symbols\ParameterSymbol.vb (17)
127Public MustOverride ReadOnly Property IsParamArray As Boolean Implements IParameterSymbol.IsParams, IParameterSymbol.IsParamsArray 129Private ReadOnly Property IsParamsCollection As Boolean Implements IParameterSymbol.IsParamsCollection 152Public MustOverride ReadOnly Property HasExplicitDefaultValue As Boolean Implements IParameterSymbol.HasExplicitDefaultValue 298Private ReadOnly Property IParameterSymbol_IsDiscard As Boolean Implements IParameterSymbol.IsDiscard 304Private ReadOnly Property IParameterSymbol_RefKind As RefKind Implements IParameterSymbol.RefKind, IParameterSymbolInternal.RefKind 312Private ReadOnly Property IParameterSymbol_ScopedKind As ScopedKind Implements IParameterSymbol.ScopedKind 318Private ReadOnly Property IParameterSymbol_Type As ITypeSymbol Implements IParameterSymbol.Type 330Private ReadOnly Property IParameterSymbol_NullableAnnotation As NullableAnnotation Implements IParameterSymbol.NullableAnnotation 336Private ReadOnly Property IParameterSymbol_IsOptional As Boolean Implements IParameterSymbol.IsOptional 342Private ReadOnly Property IParameterSymbol_IsThis As Boolean Implements IParameterSymbol.IsThis 348Private ReadOnly Property IParameterSymbol_RefCustomModifiers As ImmutableArray(Of CustomModifier) Implements IParameterSymbol.RefCustomModifiers 354Private ReadOnly Property IParameterSymbol_CustomModifiers As ImmutableArray(Of CustomModifier) Implements IParameterSymbol.CustomModifiers 360Private ReadOnly Property IParameterSymbol_Ordinal As Integer Implements IParameterSymbol.Ordinal 366Private ReadOnly Property IParameterSymbol_DefaultValue As Object Implements IParameterSymbol.ExplicitDefaultValue 372Private ReadOnly Property IParameterSymbol_OriginalDefinition As IParameterSymbol Implements IParameterSymbol.OriginalDefinition
Symbols\PropertySymbol.vb (2)
562Private ReadOnly Property IPropertySymbol_Parameters As ImmutableArray(Of IParameterSymbol) Implements IPropertySymbol.Parameters 564Return StaticCast(Of IParameterSymbol).From(Me.Parameters)
VisualBasicExtensions.vb (2)
548Public Function IsMe(parameterSymbol As IParameterSymbol) As Boolean 1045Public Function GetDeclaredSymbol(semanticModel As SemanticModel, parameter As ParameterSyntax, Optional cancellationToken As CancellationToken = Nothing) As IParameterSymbol
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (5)
src\Analyzers\VisualBasic\Analyzers\UseAutoProperty\VisualBasicUseAutoPropertyAnalyzer.vb (1)
137If setMethod.Parameters.Contains(TryCast(symbol, IParameterSymbol)) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ArgumentSyntaxExtensions.vb (1)
28) As IParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
286Dim parameter = TryCast(info.GetAnySymbol(), IParameterSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (2)
233Public Function FindParameterForArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForArgument 237Public Function FindParameterForAttributeArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForAttributeArgument
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (14)
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (1)
111parameters As ImmutableArray(Of IParameterSymbol),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (2)
190Private Function RemoveOptionalOrParamArray(parameter As IParameterSymbol) As IParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (6)
14Public Shared Function GenerateParameterList(parameterDefinitions As ImmutableArray(Of IParameterSymbol), options As CodeGenerationContextInfo) As ParameterListSyntax 15Return GenerateParameterList(DirectCast(parameterDefinitions, IList(Of IParameterSymbol)), options) 18Public Shared Function GenerateParameterList(parameterDefinitions As IEnumerable(Of IParameterSymbol), options As CodeGenerationContextInfo) As ParameterListSyntax 31Friend Shared Function GenerateParameter(parameter As IParameterSymbol, seenOptional As Boolean, options As CodeGenerationContextInfo) As ParameterSyntax 73Private Shared Function GenerateModifiers(parameter As IParameterSymbol, seenOptional As Boolean) As SyntaxTokenList 91Private Shared Function GenerateEqualsValue(generator As SyntaxGenerator, parameter As IParameterSymbol, seenOptional As Boolean) As EqualsValueSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (4)
210parameters As IEnumerable(Of IParameterSymbol), 252parameters As IEnumerable(Of IParameterSymbol), 286parameters As IEnumerable(Of IParameterSymbol), 297parameters As IEnumerable(Of IParameterSymbol),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
386parameterizedSymbols As IEnumerable(Of ImmutableArray(Of IParameterSymbol))) As IEnumerable(Of TypeInferenceInfo)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (2)
139parameters:=ImmutableArray(Of IParameterSymbol).Empty, 237parameters:=ImmutableArray(Of IParameterSymbol).Empty,
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
TypeParameterChecker.vb (1)
29Public Overrides Function GetThisParameter(method As IMethodSymbol) As IParameterSymbol
Microsoft.CodeAnalysis.VisualBasic.Features (20)
ChangeSignature\VisualBasicChangeSignatureService.vb (2)
760Protected Overrides Function CreateExplicitParamsArrayFromIndividualArguments(Of TArgumentSyntax As SyntaxNode)(newArguments As SeparatedSyntaxList(Of TArgumentSyntax), indexInExistingList As Integer, parameterSymbol As IParameterSymbol) As TArgumentSyntax 792Protected Overrides Function GetParameters(declarationSymbol As ISymbol) As ImmutableArray(Of IParameterSymbol)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
289ImmutableArray(Of IParameterSymbol).Empty)
Completion\CompletionProviders\EnumCompletionProvider.vb (1)
93If(TryCast(symbol, IParameterSymbol)?.Type,
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (1)
353Protected Overrides Function GetParameters(symbol As ISymbol) As ImmutableArray(Of IParameterSymbol)
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (2)
115Debug.Assert(TypeOf localOrParameter Is IParameterSymbol OrElse TypeOf localOrParameter Is ILocalSymbol OrElse TypeOf localOrParameter Is IRangeVariableSymbol) 795newSymbol = matchingNewContainingMemberOrType.GetParameters()(DirectCast(oldSymbol, IParameterSymbol).Ordinal)
GenerateConstructorFromMembers\VisualBasicGenerateConstructorFromMembersCodeRefactoringProvider.vb (1)
38Protected Overrides Function ToDisplayString(parameter As IParameterSymbol, format As SymbolDisplayFormat) As String
InitializeParameter\VisualBasicInitializeMemberFromParameterCodeRefactoringProvider.vb (1)
85Protected Overrides Function TryUpdateTupleAssignment(blockStatement As IBlockOperation, parameter As IParameterSymbol, fieldOrProperty As ISymbol, editor As SyntaxEditor) As Boolean
InlineHints\VisualBasicInlineParameterNameHintsService.vb (2)
28buffer As ArrayBuilder(Of (position As Integer, identifierArgument As String, parameter As IParameterSymbol, kind As HintKind)), 94Protected Overrides Function IsIndexer(node As SyntaxNode, parameter As IParameterSymbol) As Boolean
IntroduceParameter\VisualBasicIntroduceParameterCodeRefactoringProvider.vb (1)
22Protected Overrides Function GenerateExpressionFromOptionalParameter(parameterSymbol As IParameterSymbol) As SyntaxNode
LanguageServices\VisualBasicSymbolDisplayService.SymbolDescriptionBuilder.vb (3)
78If TypeOf symbol Is IParameterSymbol Then 79Return GetInitializerSourcePartsAsync(DirectCast(symbol, IParameterSymbol)) 122Private Overloads Async Function GetInitializerSourcePartsAsync(symbol As IParameterSymbol) As Task(Of ImmutableArray(Of SymbolDisplayPart))
SignatureHelp\AbstractVisualBasicSignatureHelpProvider.vb (1)
41Protected Shared Function Convert(parameter As IParameterSymbol,
src\Analyzers\VisualBasic\Analyzers\UseAutoProperty\VisualBasicUseAutoPropertyAnalyzer.vb (1)
137If setMethod.Parameters.Contains(TryCast(symbol, IParameterSymbol)) Then
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (1)
111parameters As ImmutableArray(Of IParameterSymbol),
UseNamedArguments\VisualBasicUseNamedArgumentsCodeRefactoringProvider.vb (2)
45Protected Overrides Function IsLegalToAddNamedArguments(parameters As ImmutableArray(Of IParameterSymbol), argumentCount As Integer) As Boolean 53Protected Overrides Function IsImplicitIndexOrRangeIndexer(parameters As ImmutableArray(Of IParameterSymbol), argument As ArgumentSyntax, semanticModel As SemanticModel) As Boolean
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (2)
1090Dim parameterSymbol As IParameterSymbol 1163ByRef syntax As ParameterSyntax) As IParameterSymbol
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\ParamsCollectionTests.vb (1)
140Dim iParameter = DirectCast(parameter, IParameterSymbol)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
Extensions.vb (1)
342Return DirectCast(this, IParameterSymbol).RefKind
Microsoft.CodeAnalysis.VisualBasic.Workspaces (19)
Recommendations\VisualBasicRecommendationServiceRunner.vb (1)
251Dim parameter = DirectCast(firstSymbol, IParameterSymbol)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
718Dim matchingParameterSymbol = methodSymbol.PartialImplementationPart.Parameters((DirectCast(renamedSymbol, IParameterSymbol)).Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ArgumentSyntaxExtensions.vb (1)
28) As IParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
286Dim parameter = TryCast(info.GetAnySymbol(), IParameterSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (2)
233Public Function FindParameterForArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForArgument 237Public Function FindParameterForAttributeArgument(semanticModel As SemanticModel, argument As SyntaxNode, allowUncertainCandidates As Boolean, allowParams As Boolean, cancellationToken As CancellationToken) As IParameterSymbol Implements ISemanticFacts.FindParameterForAttributeArgument
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (2)
190Private Function RemoveOptionalOrParamArray(parameter As IParameterSymbol) As IParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (6)
14Public Shared Function GenerateParameterList(parameterDefinitions As ImmutableArray(Of IParameterSymbol), options As CodeGenerationContextInfo) As ParameterListSyntax 15Return GenerateParameterList(DirectCast(parameterDefinitions, IList(Of IParameterSymbol)), options) 18Public Shared Function GenerateParameterList(parameterDefinitions As IEnumerable(Of IParameterSymbol), options As CodeGenerationContextInfo) As ParameterListSyntax 31Friend Shared Function GenerateParameter(parameter As IParameterSymbol, seenOptional As Boolean, options As CodeGenerationContextInfo) As ParameterSyntax 73Private Shared Function GenerateModifiers(parameter As IParameterSymbol, seenOptional As Boolean) As SyntaxTokenList 91Private Shared Function GenerateEqualsValue(generator As SyntaxGenerator, parameter As IParameterSymbol, seenOptional As Boolean) As EqualsValueSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (4)
210parameters As IEnumerable(Of IParameterSymbol), 252parameters As IEnumerable(Of IParameterSymbol), 286parameters As IEnumerable(Of IParameterSymbol), 297parameters As IEnumerable(Of IParameterSymbol),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
386parameterizedSymbols As IEnumerable(Of ImmutableArray(Of IParameterSymbol))) As IEnumerable(Of TypeInferenceInfo)
Microsoft.CodeAnalysis.Workspaces (174)
Editing\SyntaxGenerator.cs (2)
321public SyntaxNode ParameterDeclaration(IParameterSymbol symbol, SyntaxNode? initializer = null) 754return ParameterDeclaration((IParameterSymbol)symbol);
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (14)
19internal sealed class ParameterSymbolReferenceFinder : AbstractReferenceFinder<IParameterSymbol> 21protected override bool CanFind(IParameterSymbol symbol) 25IParameterSymbol symbol, 43IParameterSymbol symbol, 54IParameterSymbol parameter, 74private static void CascadeBetweenAnonymousDelegateParameters(IParameterSymbol parameter, ArrayBuilder<ISymbol> symbols) 84IParameterSymbol parameter, ArrayBuilder<ISymbol> symbols, CancellationToken cancellationToken) 91IParameterSymbol parameter, 132IParameterSymbol parameter, 143if (symbol is IParameterSymbol && 183IParameterSymbol parameter, 204IParameterSymbol parameter, 234ImmutableArray<IParameterSymbol>? parameters) 241IParameterSymbol parameter,
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (1)
93foreach (var parameter in constructor.Parameters)
ReassignedVariable\AbstractReassignedVariableService.cs (12)
136var parameter = semanticModel.GetDeclaredSymbol(parameterSyntax, cancellationToken) as IParameterSymbol; 158if (symbol is not IParameterSymbol and not ILocalSymbol) 165IParameterSymbol parameter => ComputeParameterIsAssigned(semanticModel, parameter), 176bool ComputeParameterIsAssigned(SemanticModel semanticModel, IParameterSymbol parameter) 240bool TryGetParameterLocation(SemanticModel semanticModel, IParameterSymbol parameter, out TextSpan location) 363if (localOrParameter is IParameterSymbol { ContainingSymbol: IPropertySymbol property } parameter) 365var getParameter = property.GetMethod?.Parameters[parameter.Ordinal]; 366var setParameter = property.SetMethod?.Parameters[parameter.Ordinal]; 386if (localOrParameter is IParameterSymbol { ContainingSymbol: IPropertySymbol property } parameter) 388var getParameter = property.GetMethod?.Parameters[parameter.Ordinal]; 389var setParameter = property.SetMethod?.Parameters[parameter.Ordinal];
Recommendations\AbstractRecommendationServiceRunner.cs (3)
49private ImmutableArray<ISymbol> GetMemberSymbolsForParameter(IParameterSymbol parameter, int position, bool useBaseReferenceAccessibility, bool unwrapNullable, bool isForDereference) 58IParameterSymbol parameter, 367if (container is IParameterSymbol parameter)
Rename\ConflictEngine\DeclarationConflictHelpers.cs (2)
95private static ImmutableArray<ImmutableArray<ITypeSymbol>> GetAllSignatures(ImmutableArray<IParameterSymbol> parameters, bool trimOptionalParameters) 101foreach (var parameter in parameters)
Rename\IRenameRewriterLanguageService.cs (1)
143var conflictingParameter = prop.Parameters.FirstOrDefault(
Rename\RenameUtilities.cs (1)
344var ordinal = containingMethod.Parameters.IndexOf((IParameterSymbol)symbol);
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
133=> parameterSymbol is IParameterSymbol parameter && propertySymbol.Equals(parameter.GetAssociatedSynthesizedRecordProperty(cancellationToken));
Shared\Extensions\IParameterSymbolExtensions.cs (2)
13public static IParameterSymbol WithAttributes(this IParameterSymbol parameter, ImmutableArray<AttributeData> attributes)
Shared\Extensions\ISymbolExtensions_2.cs (1)
13if (symbol is IParameterSymbol && symbol.IsImplicitlyDeclared)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IParameterSymbolExtensions.cs (3)
11public static bool IsRefOrOut(this IParameterSymbol symbol) 23public static IPropertySymbol? GetAssociatedSynthesizedRecordProperty(this IParameterSymbol parameter, CancellationToken cancellationToken) 56public static bool IsPrimaryConstructor(this IParameterSymbol parameter, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (6)
282IParameterSymbol parameterSymbol => parameterSymbol.Type, 326if (symbol is IParameterSymbol parameter) 342=> symbol is IParameterSymbol { IsThis: true }; 349return ((IParameterSymbol)symbol).Type; 358public static ImmutableArray<IParameterSymbol> GetParameters(this ISymbol? symbol) 567IParameterSymbol parameterSymbol => parameterSymbol.Type,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (1)
119public override bool VisitParameter(IParameterSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
111foreach (var param in funcPtrSignature.Parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.CollectTypeParameterSymbolsVisitor.cs (1)
44foreach (var parameter in symbol.Signature.Parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (1)
33foreach (var parameter in symbol.Signature.Parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (3)
144ImmutableArray<IParameterSymbol> parameters) 152ImmutableArray<IParameterSymbol> parameters) 156foreach (var parameter in parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (4)
26private readonly ImmutableArray<IParameterSymbol> _parameters; 74ImmutableArray<IParameterSymbol> parameters, 418foreach (var parameter in _parameters) 439foreach (var parameter in _parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (1)
55public bool IsInitialParameterValueUsed(IParameterSymbol parameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFacts.cs (2)
94IParameterSymbol? FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken); 95IParameterSymbol? FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argument, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
121public static IParameterSymbol? FindParameterForArgument(this ISemanticFacts semanticFacts, SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken) 124public static IParameterSymbol? FindParameterForAttributeArgument(this ISemanticFacts semanticFacts, SemanticModel semanticModel, SyntaxNode argument, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (6)
37/// the "same" <see cref="IParameterSymbol.Type"/>s and 38/// equal <see cref="IParameterSymbol.RefKind"/>s.</item> 53/// <item>Two <see cref="IParameterSymbol"/>s are the "same" if they have 61/// the "same" <see cref="IParameterSymbol.Type"/>s and 62/// the "same" <see cref="IParameterSymbol.RefKind"/>s.</item> 272ImmutableArray<IParameterSymbol> parameters,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ParameterSymbolKey.cs (7)
12private sealed class ParameterSymbolKey : AbstractSymbolKey<IParameterSymbol> 16public sealed override void Create(IParameterSymbol symbol, SymbolKeyWriter visitor) 24SymbolKeyReader reader, IParameterSymbol? contextualSymbol, out string? failureReason) 41using var result = PooledArrayBuilder<IParameterSymbol>.GetInstance(); 80PooledArrayBuilder<IParameterSymbol> result, SymbolKeyReader reader, 81string metadataName, int ordinal, ImmutableArray<IParameterSymbol> parameters) 85foreach (var parameter in parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
384ImmutableArray<IParameterSymbol> parameters)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (5)
61private readonly Action<IParameterSymbol> _writeParameterType; 62private readonly Action<IParameterSymbol> _writeRefKind; 278internal void WriteParameterTypesArray(ImmutableArray<IParameterSymbol> symbols) 297internal void WriteRefKindArray(ImmutableArray<IParameterSymbol> values) 443public override void VisitParameter(IParameterSymbol parameterSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (10)
467if (symbol is IParameterSymbol parameterSymbol && 468newSymbol is IParameterSymbol newParameterSymbol && 1082ImmutableArray<IParameterSymbol> signature1Parameters, 1083ImmutableArray<IParameterSymbol> signature2Parameters) 1112var specifiedParameters1 = new List<IParameterSymbol>(); 1113var specifiedParameters2 = new List<IParameterSymbol>(); 1124var parameter1 = signature1Parameters.FirstOrDefault(p => p.Name == name); 1127var parameter2 = signature2Parameters.FirstOrDefault(p => p.Name == name); 1162var parameter1 = signature1Parameters[i]; 1168var parameter2 = signature2Parameters[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (5)
23private IEqualityComparer<IParameterSymbol> ParameterEquivalenceComparer => _symbolEquivalenceComparer.ParameterEquivalenceComparer; 106IList<IParameterSymbol> parameters1, 107IList<IParameterSymbol> parameters2) 118IList<IParameterSymbol> parameters1, 119IList<IParameterSymbol> parameters2,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (6)
128SymbolKind.Parameter => ParametersAreEquivalent((IParameterSymbol)x, (IParameterSymbol)y, equivalentTypesWithDifferingAssemblies), 461ImmutableArray<IParameterSymbol> xParameters, 462ImmutableArray<IParameterSymbol> yParameters, 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
20private readonly Func<int, IParameterSymbol, int> _parameterAggregator; 69SymbolKind.Parameter => CombineHashCodes((IParameterSymbol)x, currentHash), 223private int CombineHashCodes(IParameterSymbol x, int currentHash)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (8)
16bool distinguishRefFromOut) : IEqualityComparer<IParameterSymbol?> 19IParameterSymbol? x, 20IParameterSymbol? y, 53public bool Equals(IParameterSymbol? x, IParameterSymbol? y) 56public bool Equals(IParameterSymbol? x, IParameterSymbol? y, bool compareParameterName, bool isCaseSensitive) 59public int GetHashCode(IParameterSymbol? x)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
95public TDeclarationNode AddParameters<TDeclarationNode>(TDeclarationNode destination, IEnumerable<IParameterSymbol> parameters, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode 132public abstract TDeclarationNode AddParameters<TDeclarationNode>(TDeclarationNode destinationMember, IEnumerable<IParameterSymbol> parameters, TCodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (16)
56ImmutableArray<IParameterSymbol> parameters, 85ImmutableArray<IParameterSymbol> parameters, IMethodSymbol? getMethod, IMethodSymbol? setMethod, 128ImmutableArray<IParameterSymbol> parameters, 161ImmutableArray<IParameterSymbol> parameters, 182ImmutableArray<IParameterSymbol> parameters, 201ImmutableArray<IParameterSymbol> parameters, 225IParameterSymbol fromType, 253IParameterSymbol fromType, 268public static IParameterSymbol CreateParameterSymbol(ITypeSymbol type, string name) 271public static IParameterSymbol CreateParameterSymbol(RefKind refKind, ITypeSymbol type, string name) 280public static IParameterSymbol CreateParameterSymbol( 289internal static IParameterSymbol CreateParameterSymbol( 290IParameterSymbol parameter, 471ImmutableArray<IParameterSymbol> parameters = default, 521ImmutableArray<IParameterSymbol>? parameters = null, 547ImmutableArray<IParameterSymbol>? parameters = null,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\ICodeGenerationService.cs (1)
89TDeclarationNode AddParameters<TDeclarationNode>(TDeclarationNode destination, IEnumerable<IParameterSymbol> parameters, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
49public abstract ImmutableArray<IParameterSymbol> Parameters { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
60public override ImmutableArray<IParameterSymbol> Parameters
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorSymbol.cs (1)
22ImmutableArray<IParameterSymbol> parameters) : CodeGenerationMethodSymbol(containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConversionSymbol.cs (1)
23IParameterSymbol fromType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorSymbol.cs (1)
22parameters: ImmutableArray<IParameterSymbol>.Empty,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (2)
23public override ImmutableArray<IParameterSymbol> Parameters { get; } 37ImmutableArray<IParameterSymbol> parameters,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationOperatorSymbol.cs (1)
25ImmutableArray<IParameterSymbol> parameters,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (4)
26object defaultValue) : CodeGenerationSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, new DeclarationModifiers(), name), IParameterSymbol 30bool IParameterSymbol.IsParamsArray => IsParams; 31bool IParameterSymbol.IsParamsCollection => false; 48public new IParameterSymbol OriginalDefinition => this;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertySymbol.cs (2)
27ImmutableArray<IParameterSymbol> parametersOpt, 35public ImmutableArray<IParameterSymbol> Parameters { get; } = parametersOpt.NullToEmpty();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (5)
13public static ImmutableArray<IParameterSymbol> RenameParameters(this IList<IParameterSymbol> parameters, ImmutableArray<string> parameterNames) 15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count); 22public static IParameterSymbol RenameParameter(this IParameterSymbol parameter, string parameterName)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (15)
61ImmutableArray<IParameterSymbol> parameters) 68IParameterSymbol parameter) 124: throughMember is IParameterSymbol 264ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewFieldMap, bool isContainedInUnsafeType) 267foreach (var parameter in parameters) 286ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewPropertyMap, bool isContainedInUnsafeType) 289foreach (var parameter in parameters) 319ImmutableArray<IParameterSymbol> parameters, 328foreach (var parameter in parameters) 370IParameterSymbol parameter, 407this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter, SyntaxNode fieldAccess) 416public static SyntaxNode CreateThrowArgumentNullExpression(this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter) 419private static SyntaxNode CreateNewArgumentNullException(SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter) 432IParameterSymbol parameter) 451public static SyntaxNode CreateThrowArgumentNullExceptionStatement(this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
82var originalParameter = methodSymbol.Parameters.First(); 462ImmutableArray<IParameterSymbol> parameters,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
230public IParameterSymbol FindParameterForArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken) 233public IParameterSymbol FindParameterForAttributeArgument(SemanticModel semanticModel, SyntaxNode argumentNode, bool allowUncertainCandidates, bool allowParams, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
89protected static IEnumerable<ITypeSymbol> ExpandParamsParameter(IParameterSymbol parameterSymbol)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SymbolKeyTests.cs (2)
419var b = ((IMethodSymbol)compilation1.GlobalNamespace.GetTypeMembers("C").Single().GetMembers("M").Single()).Parameters[1]; 443var b = ((IMethodSymbol)compilation1.GlobalNamespace.GetTypeMembers("C").Single().GetMembers("M").Single()).Parameters[1];
Microsoft.Extensions.Logging.Generators (2)
LoggerMessageGenerator.Parser.cs (2)
336foreach (IParameterSymbol paramSymbol in logMethodSymbol.Parameters) 692foreach (IParameterSymbol parameter in primaryConstructor.Parameters)
Microsoft.Extensions.Options.SourceGeneration (6)
Parser.cs (6)
501ImmutableArray<IParameterSymbol> parameters = attribute.AttributeConstructor?.Parameters ?? ImmutableArray<IParameterSymbol>.Empty; 621ImmutableArray<IParameterSymbol> constructorParameters = attribute.AttributeConstructor?.Parameters ?? ImmutableArray<IParameterSymbol>.Empty; 632ImmutableArray<IParameterSymbol> constructorParameters = attribute.AttributeConstructor?.Parameters ?? ImmutableArray<IParameterSymbol>.Empty;
Microsoft.Gen.ComplianceReports (2)
Parser.cs (2)
112var ps = sm.GetDeclaredSymbol(parameter); 217foreach (var p in method.Parameters)
Microsoft.Gen.Logging (9)
Parsing\Parser.cs (5)
48var parameterSymbols = new Dictionary<LoggingMethodParameter, IParameterSymbol>(); 93foreach (var paramSymbol in methodSymbol.Parameters) 479private void CheckTagNamesAreUnique(LoggingMethod lm, Dictionary<LoggingMethodParameter, IParameterSymbol> parameterSymbols) 514IParameterSymbol paramSymbol, 714foreach (IParameterSymbol parameter in primaryConstructor.Parameters)
Parsing\Parser.LogProperties.cs (2)
26IParameterSymbol paramSymbol, 112foreach (var parameter in ctor.Parameters)
Parsing\Parser.Records.cs (1)
79foreach (var param in ctorMethod.Parameters)
Parsing\Parser.TagProvider.cs (1)
16IParameterSymbol paramSymbol,
Microsoft.Gen.Logging.Unit.Tests (1)
LogParserUtilitiesTests.cs (1)
171var paramSymbolMock = new Mock<IParameterSymbol>();
Microsoft.Gen.Metrics (1)
Parser.cs (1)
521foreach (var paramSymbol in methodSymbol.Parameters)
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
521foreach (var paramSymbol in methodSymbol.Parameters)
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
242foreach (IParameterSymbol parameter in methodSymbol.Parameters)
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\ConvertToLibraryImportFixer.cs (1)
681foreach (IParameterSymbol param in method.Parameters)
Analyzers\NativeMarshallingAttributeAnalyzer.cs (1)
170IParameterSymbol param => param.Type,
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
242foreach (IParameterSymbol parameter in methodSymbol.Parameters)
Microsoft.Interop.SourceGeneration (4)
MethodSignatureElementInfoProvider.cs (2)
44IParameterSymbol param = _method.Parameters[i]; 67IParameterSymbol param = _method.Parameters[paramIndex];
SignatureContext.cs (1)
111IParameterSymbol param = method.Parameters[i];
TypePositionInfo.cs (1)
88public static TypePositionInfo CreateForParameter(IParameterSymbol paramSymbol, MarshallingInfo marshallingInfo, Compilation compilation)
Microsoft.ML.InternalCodeAnalyzer (2)
ContractsCheckAnalyzer.cs (2)
104ImmutableArray<IParameterSymbol> parameters, 223var parameter = parameters[i];
Microsoft.VisualStudio.LanguageServices (11)
ChangeSignature\ChangeSignatureDialogViewModel.ParameterViewModels.cs (1)
157public IParameterSymbol ParameterSymbol => _existingParameter.Symbol;
Progression\GraphBuilder.cs (2)
292node = await GetOrCreateNodeForParameterAsync(graph, (IParameterSymbol)symbol, solution, cancellationToken).ConfigureAwait(false); 310private static async Task<GraphNode> GetOrCreateNodeForParameterAsync(Graph graph, IParameterSymbol parameterSymbol, Solution solution, CancellationToken cancellationToken)
Progression\GraphNodeCreation.cs (1)
51return await GraphNodeIdCreation.GetIdForParameterAsync((IParameterSymbol)symbol, solution, cancellationToken).ConfigureAwait(false);
Progression\GraphNodeIdCreation.cs (1)
459internal static async Task<GraphNodeId> GetIdForParameterAsync(IParameterSymbol symbol, Solution solution, CancellationToken cancellationToken)
ProjectSystem\AbstractEntryPointFinder.cs (1)
56var parameter = symbol.Parameters.Single();
Snippets\SnippetExpansionClient.cs (5)
554var snippet = CreateMethodCallSnippet(methodName, includeMethod: true, ImmutableArray<IParameterSymbol>.Empty, ImmutableDictionary<string, string>.Empty); 632private static XDocument CreateMethodCallSnippet(string methodName, bool includeMethod, ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string> parameterValues) 644foreach (var parameter in parameters) 885foreach (var previousParameter in _state._method.Parameters) 898foreach (var parameter in method.Parameters)
Microsoft.VisualStudio.LanguageServices.CSharp (5)
CodeModel\CSharpCodeModelService_Prototype.cs (3)
507private void AppendParametersPrototype(StringBuilder builder, ImmutableArray<IParameterSymbol> parameters, PrototypeFlags flags) 510foreach (var parameter in parameters) 523private void AppendParameterPrototype(StringBuilder builder, PrototypeFlags flags, IParameterSymbol parameter)
ObjectBrowser\DescriptionBuilder.cs (2)
414private void BuildParameterList(ImmutableArray<IParameterSymbol> parameters) 429var current = parameters[i];
Microsoft.VisualStudio.LanguageServices.UnitTests (3)
ChangeSignature\ChangeSignatureViewModelTests.vb (1)
395Private Shared Sub AssertPermuted(permutation As Integer(), actualParameterList As List(Of ChangeSignatureDialogViewModel.ParameterViewModel), originalParameterList As ImmutableArray(Of IParameterSymbol))
ChangeSignature\ChangeSignatureViewModelTestState.vb (2)
11Public ReadOnly OriginalParameterList As ImmutableArray(Of IParameterSymbol) 14Public Sub New(viewModel As ChangeSignatureDialogViewModel, originalParameterList As ImmutableArray(Of IParameterSymbol))
Microsoft.VisualStudio.LanguageServices.VisualBasic (5)
CodeModel\VisualBasicCodeModelService_Prototype.vb (4)
53ImmutableArray.Create(Of IParameterSymbol)()) 62Private Shared Function GetEventPrototype(symbol As IEventSymbol, parameters As ImmutableArray(Of IParameterSymbol), flags As PrototypeFlags) As String 80Private Shared Function GetFunctionPrototype(symbol As ISymbol, parameters As ImmutableArray(Of IParameterSymbol), flags As PrototypeFlags) As String 170Private Shared Sub AppendParameters(builder As StringBuilder, parameters As ImmutableArray(Of IParameterSymbol), flags As PrototypeFlags)
ObjectBrowser\DescriptionBuilder.vb (1)
372Private Sub BuildParameterList(parameters As ImmutableArray(Of IParameterSymbol))
Mvc.Analyzers.Test (8)
TopLevelParameterNameAnalyzerTest.cs (8)
413var parameter = method.Parameters[0]; 439var parameter = method.Parameters[0]; 464var parameter = method.Parameters[0]; 488var parameter = method.Parameters[0]; 512var parameter = method.Parameters[0]; 536var parameter = method.Parameters[0]; 559var parameter = method.Parameters[0]; 582var parameter = method.Parameters[0];
Mvc.Api.Analyzers.Test (3)
SymbolApiConventionMatcherTest.cs (3)
506var parameter = method.Parameters[0]; 525var parameter = method.Parameters[0]; 544var parameter = method.Parameters[0];
System.Text.Json.SourceGeneration (2)
Helpers\RoslynExtensions.cs (1)
320public static bool IsNullable(this IParameterSymbol parameter)
JsonSourceGenerator.Parser.cs (1)
1468IParameterSymbol parameterInfo = constructor.Parameters[i];
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (1)
43IParameterSymbol funcParameter = methodSymbol.Parameters[0];
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.vb (1)
48Dim funcParameter As IParameterSymbol = methodSymbol.Parameters(0)