83 references to ArgumentList
Microsoft.AspNetCore.App.Analyzers (3)
Mvc\MvcAnalyzer.cs (1)
178attributeSyntax.ArgumentList is { } argumentList)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (2)
299if (attribute.ArgumentList != null) 301foreach (var attributeArgument in attribute.ArgumentList.Arguments)
Microsoft.CodeAnalysis.CSharp (25)
_generated\0\Syntax.xml.Main.Generated.cs (1)
1990=> node.Update((NameSyntax?)Visit(node.Name) ?? throw new ArgumentNullException("name"), (AttributeArgumentListSyntax?)Visit(node.ArgumentList));
_generated\2\Syntax.xml.Syntax.Generated.cs (3)
9966if (name != this.Name || argumentList != this.ArgumentList) 9976public AttributeSyntax WithName(NameSyntax name) => Update(name, this.ArgumentList); 9981var argumentList = this.ArgumentList ?? SyntaxFactory.AttributeArgumentList();
Binder\Binder_Attributes.cs (1)
181var argumentListOpt = node.ArgumentList;
Binder\ExpressionVariableFinder.cs (2)
169if (node.ArgumentList != null) 171foreach (AttributeArgumentSyntax argument in node.ArgumentList.Arguments)
Binder\LocalBinderFactory.cs (2)
484if (node.ArgumentList?.Arguments.Count > 0) 486foreach (AttributeArgumentSyntax argument in node.ArgumentList.Arguments)
Errors\MessageProvider.cs (2)
271diagnostics.Add(ErrorCode.ERR_InvalidNamedArgument, node.ArgumentList.Arguments[namedArgumentIndex].Location, parameterName); 277diagnostics.Add(ErrorCode.ERR_ParameterNotValidForType, node.ArgumentList.Arguments[namedArgumentIndex].Location);
Symbols\Attributes\AttributeData.cs (3)
90int argumentCount = (attributeSyntax.ArgumentList != null) ? 91attributeSyntax.ArgumentList.Arguments.Count(static (arg) => arg.NameEquals == null) : 476var argList = nodeOpt.ArgumentList;
Symbols\Attributes\SourceAttributeData.cs (5)
139Debug.Assert(attributeSyntax.ArgumentList != null); 140Debug.Assert(this.AttributeConstructor.ParameterCount <= attributeSyntax.ArgumentList.Arguments.Count); 142return attributeSyntax.ArgumentList.Arguments[parameterIndex]; 159Debug.Assert(sourceArgIndex < attributeSyntax.ArgumentList!.Arguments.Count); 160return attributeSyntax.ArgumentList.Arguments[sourceArgIndex];
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
834RoslynDebug.Assert(arguments.AttributeSyntaxOpt?.ArgumentList is object); 897diagnostics.Add(ErrorCode.ERR_InvalidNamedArgument, arguments.AttributeSyntaxOpt.ArgumentList.Arguments[position].Location, namedArg.Key);
Symbols\Source\SourcePropertySymbolBase.cs (3)
506if (node.ArgumentList?.Arguments is not [{ NameColon: null, NameEquals: null, Expression: LiteralExpressionSyntax { RawKind: (int)SyntaxKind.StringLiteralExpression } }]) 1755diagnostics.Add(ErrorCode.ERR_BadArgumentToAttribute, node.ArgumentList.Arguments[0].Location, node.GetErrorDisplayName()); 1761diagnostics.Add(ErrorCode.ERR_InsufficientStack, node.ArgumentList.Arguments[0].Location);
Symbols\Symbol_Attributes.cs (1)
483attributesToBind[i].ArgumentList?.Arguments[0].Expression.Location is { } location)
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (2)
55if (attribute.ArgumentList is null) 76foreach (var argument in attribute.ArgumentList.Arguments)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1517argumentList = attribute.ArgumentList;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (3)
125if (attribute.ArgumentList != null && 126!attribute.ArgumentList.CloseParenToken.IsMissing) 132arguments = GetArguments(attribute.ArgumentList.Arguments);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
103if (existingSyntax?.ArgumentList != null && constant is { Kind: not TypedConstantKind.Array, Value: string stringValue }) 105foreach (var existingArgument in existingSyntax.ArgumentList.Arguments)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
385var index = attribute.ArgumentList.Arguments.IndexOf(argument);
Microsoft.CodeAnalysis.CSharp.Features (20)
ChangeSignature\CSharpChangeSignatureService.cs (7)
492if (attribute.ArgumentList == null) 502attribute.ArgumentList, 611if (attribute.ArgumentList == null) 616argumentCount = attribute.ArgumentList.Arguments.Count; 617lastArgumentIsNamed = attribute.ArgumentList.Arguments.LastOrDefault()?.NameColon != null || 618attribute.ArgumentList.Arguments.LastOrDefault()?.NameEquals != null; 620var lastArgument = attribute.ArgumentList.Arguments.LastOrDefault();
Completion\CompletionProviders\InternalsVisibleToCompletionProvider.cs (1)
50var arguments = ((AttributeSyntax)internalsVisibleToAttribute).ArgumentList!.Arguments;
SignatureHelp\AttributeSignatureHelpProvider.cs (7)
53return attribute.ArgumentList != null; 67return expression.ArgumentList != null && 68expression.ArgumentList.Span.Contains(token.SpanStart) && 69token != expression.ArgumentList.CloseParenToken; 104var textSpan = SignatureHelpUtilities.GetSignatureHelpSpan(attribute.ArgumentList!); 118currentSpan.Start == SignatureHelpUtilities.GetSignatureHelpSpan(expression.ArgumentList!).Start) 120return SignatureHelpUtilities.GetSignatureHelpState(expression.ArgumentList!, position);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (2)
55if (attribute.ArgumentList is null) 76foreach (var argument in attribute.ArgumentList.Arguments)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (3)
125if (attribute.ArgumentList != null && 126!attribute.ArgumentList.CloseParenToken.IsMissing) 132arguments = GetArguments(attribute.ArgumentList.Arguments);
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (4)
Microsoft.NetCore.Analyzers\Performance\CSharpConstantExpectedAnalyzer.cs (2)
55if (attributeSyntax.ArgumentList is null) 60var targetArg = attributeSyntax.ArgumentList.Arguments.FirstOrDefault(arg => arg.NameEquals?.Name.IsEquivalentTo(targetNameSyntax, true) == true);
Microsoft.NetCore.Analyzers\Resources\CSharpMarkAssembliesWithNeutralResourcesLanguage.cs (2)
34if (!CheckResxGeneratedFile(context.SemanticModel, attributeSyntax, attributeSyntax.ArgumentList?.Arguments[0].Expression, generatedCode, context.CancellationToken)) 46attribute.ArgumentList?.Arguments.Count > 0;
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
CodeGeneration\CSharpSyntaxGenerator.cs (4)
1115if (attr.ArgumentList != null) 1117return attr.ArgumentList.Arguments; 1157return list.Attributes[0].ArgumentList; 1163return attr.ArgumentList;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1517argumentList = attribute.ArgumentList;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
103if (existingSyntax?.ArgumentList != null && constant is { Kind: not TypedConstantKind.Array, Value: string stringValue }) 105foreach (var existingArgument in existingSyntax.ArgumentList.Arguments)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
385var index = attribute.ArgumentList.Arguments.IndexOf(argument);
Microsoft.DotNet.GenFacades (1)
TypeParser.cs (1)
48var typeNameExpression = (TypeOfExpressionSyntax)item.ArgumentList.Arguments[0].Expression;
Microsoft.Gen.MetadataExtractor (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
335syntax.ArgumentList != null) 337foreach (var arg in syntax.ArgumentList.Arguments)
Microsoft.Gen.Metrics (2)
Parser.cs (2)
335syntax.ArgumentList != null) 337foreach (var arg in syntax.ArgumentList.Arguments)
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
335syntax.ArgumentList != null) 337foreach (var arg in syntax.ArgumentList.Arguments)
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\ConvertToLibraryImportFixer.cs (3)
566AttributeArgumentListSyntax updatedArgList = attribute.ArgumentList.WithArguments( 568attribute.ArgumentList.Arguments.OrderBy(arg => 579return generator.ReplaceNode(attribute, attribute.ArgumentList, updatedArgList);
Roslyn.Diagnostics.CSharp.Analyzers (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1517argumentList = attribute.ArgumentList;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
103if (existingSyntax?.ArgumentList != null && constant is { Kind: not TypedConstantKind.Array, Value: string stringValue }) 105foreach (var existingArgument in existingSyntax.ArgumentList.Arguments)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
385var index = attribute.ArgumentList.Arguments.IndexOf(argument);