111 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)
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)
893diagnostics.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 } }]) 1737diagnostics.Add(ErrorCode.ERR_BadArgumentToAttribute, node.ArgumentList.Arguments[0].Location, node.GetErrorDisplayName()); 1743diagnostics.Add(ErrorCode.ERR_InsufficientStack, node.ArgumentList.Arguments[0].Location);
Symbols\Symbol_Attributes.cs (1)
482attributesToBind[i].ArgumentList?.Arguments[0].Expression.Location is { } location)
Syntax.xml.Main.Generated.cs (1)
1990=> node.Update(VisitToken(node.OpenParenToken), VisitList(node.Arguments), VisitToken(node.CloseParenToken));
Syntax.xml.Syntax.Generated.cs (5)
9981return WithArgumentList(argumentList.WithArguments(argumentList.Arguments.AddRange(items))); 10026if (openParenToken != this.OpenParenToken || arguments != this.Arguments || closeParenToken != this.CloseParenToken) 10036public AttributeArgumentListSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(openParenToken, this.Arguments, this.CloseParenToken); 10038public AttributeArgumentListSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.OpenParenToken, this.Arguments, closeParenToken); 10040public AttributeArgumentListSyntax AddArguments(params AttributeArgumentSyntax[] items) => WithArguments(this.Arguments.AddRange(items));
Syntax\AttributeSyntax.cs (1)
29foreach (var argSyntax in argumentList.Arguments)
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
76foreach (var argument in attribute.ArgumentList.Arguments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
59var index = argumentList.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1124=> ((AttributeArgumentListSyntax)argumentList).Arguments;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\AttributeArgumentFixer.cs (1)
27=> argumentList.Arguments;
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
132arguments = GetArguments(attribute.ArgumentList.Arguments);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
105foreach (var existingArgument in existingSyntax.ArgumentList.Arguments)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
50argumentList.Arguments, reservedNames: null, cancellationToken: cancellationToken);
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.Emit3.UnitTests (4)
Attributes\AttributeTests.cs (4)
776Assert.Empty(result.Arguments); 786Assert.Empty(result.Arguments); 3125Assert.Equal(2, syntax.ArgumentList.Arguments.Count()); 3127Assert.Equal(0, syntax.ArgumentList.Arguments.Count());
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)
104Arguments: var arguments,
SignatureHelp\SignatureHelpUtilities.cs (2)
36list => list.Arguments.GetWithSeparators(); 45list => list.Arguments.Select(
src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
76foreach (var argument in attribute.ArgumentList.Arguments)
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\AttributeArgumentFixer.cs (1)
27=> argumentList.Arguments;
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
132arguments = GetArguments(attribute.ArgumentList.Arguments);
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
87=> argumentList.Arguments;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\LocalFunctionTests.cs (1)
446var attrArgs = attributeSyntax.ArgumentList.Arguments;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (5)
4275var constantInfo = speculativeModel.GetConstantValue(attr2.ArgumentList.Arguments.First().Expression); 4290constantInfo = speculativeModel.GetConstantValue(attr3.ArgumentList.Arguments.First().Expression); 4336constantInfo = speculativeModel.GetConstantValue(attr6.ArgumentList.Arguments.First().Expression); 4359constantInfo = speculativeModel.GetConstantValue(attr7.ArgumentList.Arguments.First().Expression); 4381constantInfo = speculativeModel.GetConstantValue(attr8.ArgumentList.Arguments.First().Expression);
Symbols\Source\NullablePublicAPITests.cs (1)
4214var symbolInfo = specModel.GetSymbolInfo(newAttributeUsage.ArgumentList.Arguments[0].Expression);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (14)
Generated\Syntax.Test.xml.Generated.cs (2)
13120Assert.Equal(default, node.Arguments); 13122var newNode = node.WithOpenParenToken(node.OpenParenToken).WithArguments(node.Arguments).WithCloseParenToken(node.CloseParenToken);
Parsing\DeclarationParsingTests.cs (12)
418Assert.Equal(0, ad.Attributes[0].ArgumentList.Arguments.Count); 447Assert.Equal(2, ad.Attributes[0].ArgumentList.Arguments.Count); 448Assert.Equal("b", ad.Attributes[0].ArgumentList.Arguments[0].ToString()); 449Assert.Equal("c", ad.Attributes[0].ArgumentList.Arguments[1].ToString()); 478Assert.Equal(1, ad.Attributes[0].ArgumentList.Arguments.Count); 479Assert.Equal("b = c", ad.Attributes[0].ArgumentList.Arguments[0].ToString()); 480Assert.NotNull(ad.Attributes[0].ArgumentList.Arguments[0].NameEquals); 481Assert.NotNull(ad.Attributes[0].ArgumentList.Arguments[0].NameEquals.Name); 482Assert.Equal("b", ad.Attributes[0].ArgumentList.Arguments[0].NameEquals.Name.ToString()); 483Assert.NotEqual(default, ad.Attributes[0].ArgumentList.Arguments[0].NameEquals.EqualsToken); 484Assert.NotNull(ad.Attributes[0].ArgumentList.Arguments[0].Expression); 485Assert.Equal("c", ad.Attributes[0].ArgumentList.Arguments[0].Expression.ToString());
Microsoft.CodeAnalysis.CSharp.Workspaces (10)
CodeGeneration\CSharpSyntaxGenerator.cs (4)
1117return attr.ArgumentList.Arguments; 1141return WithAttributeArgumentList(declaration, existingArgumentList.WithArguments(existingArgumentList.Arguments.InsertRange(index, newArgumentList.Arguments))); 3155if (declaration.Parent != null && ((AttributeArgumentListSyntax)declaration.Parent).Arguments.Count == 1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
59var index = argumentList.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1124=> ((AttributeArgumentListSyntax)argumentList).Arguments;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
105foreach (var existingArgument in existingSyntax.ArgumentList.Arguments)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
50argumentList.Arguments, reservedNames: null, cancellationToken: cancellationToken);
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.Gen.MetadataExtractor (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
333foreach (var arg in syntax.ArgumentList.Arguments)
Microsoft.Gen.Metrics (1)
Parser.cs (1)
333foreach (var arg in syntax.ArgumentList.Arguments)
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
333foreach (var arg in syntax.ArgumentList.Arguments)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
556attribute.ArgumentList.Arguments.OrderBy(arg =>
Microsoft.VisualStudio.LanguageServices.CSharp (9)
CodeModel\CSharpCodeModelService.CodeModelEventCollector.cs (2)
106var oldArguments = oldAttributeArguments.Arguments; 107var newArguments = newAttributeArguments.Arguments;
CodeModel\CSharpCodeModelService.cs (7)
356return attribute.ArgumentList.Arguments; 1609attribute.ArgumentList.Arguments.Count > index) 1611attributeArgumentNode = attribute.ArgumentList.Arguments[index]; 1666index = attribute.ArgumentList!.Arguments.IndexOf((AttributeArgumentSyntax)attributeArgumentNode); 1716return argumentList.Arguments.ToString(); 1734? argumentList.WithArguments(parsedArgumentList.Arguments) 3334var newArguments = argumentList.Arguments.Insert(index, (AttributeArgumentSyntax)attributeArgument);
Roslyn.Diagnostics.CSharp.Analyzers (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
59var index = argumentList.Arguments.IndexOf(argument);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1124=> ((AttributeArgumentListSyntax)argumentList).Arguments;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
105foreach (var existingArgument in existingSyntax.ArgumentList.Arguments)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
50argumentList.Arguments, reservedNames: null, cancellationToken: cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
385var index = attribute.ArgumentList.Arguments.IndexOf(argument); 944var tokenIndex = attributeArgumentList.Arguments.GetWithSeparators().IndexOf(previousToken);