81 references to Arguments
Microsoft.AspNetCore.App.Analyzers (3)
Mvc\MvcAnalyzer.cs (1)
180var attributeArgument = argumentList.Arguments[0];
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
301foreach (var attributeArgument in attribute.ArgumentList.Arguments)
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (1)
502var index = argumentList.Arguments.IndexOf(argument);
Microsoft.CodeAnalysis.CSharp (25)
_generated\0\Syntax.xml.Main.Generated.cs (1)
2009=> node.Update(VisitToken(node.OpenParenToken), VisitList(node.Arguments), VisitToken(node.CloseParenToken));
_generated\2\Syntax.xml.Syntax.Generated.cs (5)
10068return WithArgumentList(argumentList.WithArguments(argumentList.Arguments.AddRange(items))); 10113if (openParenToken != this.OpenParenToken || arguments != this.Arguments || closeParenToken != this.CloseParenToken) 10123public AttributeArgumentListSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(openParenToken, this.Arguments, this.CloseParenToken); 10125public AttributeArgumentListSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.OpenParenToken, this.Arguments, closeParenToken); 10127public AttributeArgumentListSyntax AddArguments(params AttributeArgumentSyntax[] items) => WithArguments(this.Arguments.AddRange(items));
Binder\Binder_Attributes.cs (1)
469foreach (var argument in attributeArgumentList.Arguments)
Binder\ExpressionVariableFinder.cs (1)
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)
91attributeSyntax.ArgumentList.Arguments.Count(static (arg) => arg.NameEquals == null) : 477if (argList == null || argList.Arguments.IsEmpty()) 484AttributeArgumentSyntax argSyntax = argList.Arguments[0];
Symbols\Attributes\SourceAttributeData.cs (4)
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 (1)
897diagnostics.Add(ErrorCode.ERR_InvalidNamedArgument, arguments.AttributeSyntaxOpt.ArgumentList.Arguments[position].Location, namedArg.Key);
Symbols\Source\SourcePropertySymbolBase.cs (3)
507if (node.ArgumentList?.Arguments is not [{ NameColon: null, NameEquals: null, Expression: LiteralExpressionSyntax { RawKind: (int)SyntaxKind.StringLiteralExpression } }]) 1787diagnostics.Add(ErrorCode.ERR_BadArgumentToAttribute, node.ArgumentList.Arguments[0].Location, node.GetErrorDisplayName()); 1793diagnostics.Add(ErrorCode.ERR_InsufficientStack, node.ArgumentList.Arguments[0].Location);
Symbols\Symbol_Attributes.cs (1)
483attributesToBind[i].ArgumentList?.Arguments[0].Expression.Location is { } location)
Syntax\AttributeSyntax.cs (1)
29foreach (var argSyntax in argumentList.Arguments)
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
76foreach (var argument in attribute.ArgumentList.Arguments)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
59var index = argumentList.Arguments.IndexOf(argument);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1124=> ((AttributeArgumentListSyntax)argumentList).Arguments;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\roslyn\src\Analyzers\CSharp\CodeFixes\AddExplicitCast\AttributeArgumentFixer.cs (1)
27=> argumentList.Arguments;
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
132arguments = GetArguments(attribute.ArgumentList.Arguments);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
105foreach (var existingArgument in existingSyntax.ArgumentList.Arguments)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
50argumentList.Arguments, reservedNames: null, cancellationToken: cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
385var index = attribute.ArgumentList.Arguments.IndexOf(argument); 944var tokenIndex = attributeArgumentList.Arguments.GetWithSeparators().IndexOf(previousToken);
Microsoft.CodeAnalysis.CSharp.Features (19)
ChangeSignature\CSharpChangeSignatureService.cs (6)
578argumentList.Arguments, 585argumentList.Arguments, 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\AttributeNamedParameterCompletionProvider.cs (4)
113foreach (var item in argumentList.Arguments.GetWithSeparators()) 135foreach (var item in argumentList.Arguments.GetWithSeparators()) 207argumentList.Arguments.Where(a => a.Span.End <= position) 211argumentList.Arguments.Where(a => a.Span.End <= position)
Completion\CompletionProviders\InternalsVisibleToCompletionProvider.cs (1)
50var arguments = ((AttributeSyntax)internalsVisibleToAttribute).ArgumentList!.Arguments;
InlineHints\CSharpInlineParameterNameHintsService.cs (1)
49foreach (var argument in argumentList.Arguments)
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (1)
95Arguments: var arguments,
SignatureHelp\SignatureHelpUtilities.cs (2)
36list => list.Arguments.GetWithSeparators(); 45list => list.Arguments.Select(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
76foreach (var argument in attribute.ArgumentList.Arguments)
src\roslyn\src\Analyzers\CSharp\CodeFixes\AddExplicitCast\AttributeArgumentFixer.cs (1)
27=> argumentList.Arguments;
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
132arguments = GetArguments(attribute.ArgumentList.Arguments);
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
87=> argumentList.Arguments;
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (3)
Microsoft.NetCore.Analyzers\Performance\CSharpConstantExpectedAnalyzer.cs (1)
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 (10)
CodeGeneration\CSharpSyntaxGenerator.cs (4)
1117return attr.ArgumentList.Arguments; 1141return WithAttributeArgumentList(declaration, existingArgumentList.WithArguments(existingArgumentList.Arguments.InsertRange(index, newArgumentList.Arguments))); 3163if (declaration.Parent != null && ((AttributeArgumentListSyntax)declaration.Parent).Arguments.Count == 1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
59var index = argumentList.Arguments.IndexOf(argument);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1124=> ((AttributeArgumentListSyntax)argumentList).Arguments;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
105foreach (var existingArgument in existingSyntax.ArgumentList.Arguments)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
50argumentList.Arguments, reservedNames: null, cancellationToken: cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
385var index = attribute.ArgumentList.Arguments.IndexOf(argument); 944var tokenIndex = attributeArgumentList.Arguments.GetWithSeparators().IndexOf(previousToken);
Microsoft.DotNet.GenFacades (1)
TypeParser.cs (1)
48var typeNameExpression = (TypeOfExpressionSyntax)item.ArgumentList.Arguments[0].Expression;
Microsoft.Extensions.Configuration.Binder.SourceGeneration (1)
ConfigurationBindingGenerator.Suppressor.cs (1)
136SeparatedSyntaxList<AttributeArgumentSyntax> args = argList.Arguments;
Microsoft.Gen.MetadataExtractor (1)
Parser_2.cs (1)
337foreach (var arg in syntax.ArgumentList.Arguments)
Microsoft.Gen.Metrics (1)
Parser.cs (1)
337foreach (var arg in syntax.ArgumentList.Arguments)
Microsoft.Gen.MetricsReports (1)
Parser.cs (1)
337foreach (var arg in syntax.ArgumentList.Arguments)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
577attribute.ArgumentList.Arguments.OrderBy(arg =>
Roslyn.Diagnostics.CSharp.Analyzers (6)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
59var index = argumentList.Arguments.IndexOf(argument);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1124=> ((AttributeArgumentListSyntax)argumentList).Arguments;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
105foreach (var existingArgument in existingSyntax.ArgumentList.Arguments)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
50argumentList.Arguments, reservedNames: null, cancellationToken: cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
385var index = attribute.ArgumentList.Arguments.IndexOf(argument); 944var tokenIndex = attributeArgumentList.Arguments.GetWithSeparators().IndexOf(previousToken);