Base:
property
AttributeLists
Microsoft.CodeAnalysis.CSharp.Syntax.BaseParameterSyntax.AttributeLists
68 references to AttributeLists
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
360foreach (var attributeList in parameter.AttributeLists.OfType<AttributeListSyntax>())
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_Lambda.cs (2)
154checkAttributes(syntax, p.AttributeLists, diagnostics); 207attributesBuilder.Add(syntax.Kind() == SyntaxKind.ParenthesizedLambdaExpression ? p.AttributeLists : default);
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
397AddAttributes(parameter.AttributeLists, builder);
Symbols\Source\LocalFunctionSymbol.cs (1)
82ReportAttributesDisallowed(param.AttributeLists, diagnostics);
Symbols\Source\SourceComplexParameterSymbol.cs (2)
332var attributes = parameterSyntax.AttributeLists.Node; 514return (syntax != null) ? syntax.AttributeLists : default(SyntaxList<AttributeListSyntax>);
Symbols\Source\SourceParameterSymbol.cs (1)
81(syntax.AttributeLists.Count == 0) &&
Syntax.xml.Main.Generated.cs (1)
2101=> node.Update(VisitList(node.AttributeLists), VisitList(node.Modifiers), (TypeSyntax?)Visit(node.Type), VisitToken(node.Identifier), (EqualsValueClauseSyntax?)Visit(node.Default));
Syntax.xml.Syntax.Generated.cs (7)
3291public SimpleLambdaExpressionSyntax AddParameterAttributeLists(params AttributeListSyntax[] items) => WithParameter(this.Parameter.WithAttributeLists(this.Parameter.AttributeLists.AddRange(items))); 13821if (attributeLists != this.AttributeLists || modifiers != this.Modifiers || type != this.Type || identifier != this.Identifier || @default != this.Default) 13834public new ParameterSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.Type, this.Identifier, this.Default); 13836public new ParameterSyntax WithType(TypeSyntax? type) => Update(this.AttributeLists, this.Modifiers, type, this.Identifier, this.Default); 13837public ParameterSyntax WithIdentifier(SyntaxToken identifier) => Update(this.AttributeLists, this.Modifiers, this.Type, identifier, this.Default); 13838public ParameterSyntax WithDefault(EqualsValueClauseSyntax? @default) => Update(this.AttributeLists, this.Modifiers, this.Type, this.Identifier, @default); 13841public new ParameterSyntax AddAttributeLists(params AttributeListSyntax[] items) => WithAttributeLists(this.AttributeLists.AddRange(items));
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (1)
110if (implicitLambda.ParameterList.Parameters is not ([{ AttributeLists.Count: 0, Modifiers.Count: 0 } parameter]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
164ParameterSyntax parameter => parameter.AttributeLists,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
223if (parameterNode.AttributeLists is [var firstAttribute, ..])
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
425var newAttributeLists = RemoveAttributeFromAttributeLists(parameter.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (1)
110if (implicitLambda.ParameterList.Parameters is not ([{ AttributeLists.Count: 0, Modifiers.Count: 0 } parameter]))
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
397AddAttributes(parameter.AttributeLists, builder);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (32)
Generated\Syntax.Test.xml.Generated.cs (2)
13646Assert.Equal(default, node.AttributeLists); 13651var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithType(node.Type).WithIdentifier(node.Identifier).WithDefault(node.Default);
Parsing\DeclarationParsingTests.cs (29)
2162Assert.Equal(0, ds.ParameterList.Parameters[0].AttributeLists.Count); 2197Assert.Equal(0, ds.ParameterList.Parameters[0].AttributeLists.Count); 2232Assert.Equal(0, ds.ParameterList.Parameters[0].AttributeLists.Count); 2239Assert.Equal(0, ds.ParameterList.Parameters[1].AttributeLists.Count); 2274Assert.Equal(0, ds.ParameterList.Parameters[0].AttributeLists.Count); 2310Assert.Equal(0, ds.ParameterList.Parameters[0].AttributeLists.Count); 2346Assert.Equal(0, ds.ParameterList.Parameters[0].AttributeLists.Count); 2383Assert.Equal(0, ds.ParameterList.Parameters[0].AttributeLists.Count); 2416Assert.Equal(1, ds.ParameterList.Parameters[0].AttributeLists.Count); 2417Assert.Equal("[attr]", ds.ParameterList.Parameters[0].AttributeLists[0].ToString()); 3018Assert.Equal(0, ms.ParameterList.Parameters[0].AttributeLists.Count); 3072Assert.Equal(0, ms.ParameterList.Parameters[0].AttributeLists.Count); 3079Assert.Equal(0, ms.ParameterList.Parameters[1].AttributeLists.Count); 3133Assert.Equal(0, ms.ParameterList.Parameters[0].AttributeLists.Count); 3198Assert.Equal(0, ms.ParameterList.Parameters[0].AttributeLists.Count); 3335Assert.Equal(0, ms.ParameterList.Parameters[0].AttributeLists.Count); 4964Assert.Equal(0, ps.ParameterList.Parameters[0].AttributeLists.Count); 5031Assert.Equal(0, ps.ParameterList.Parameters[0].AttributeLists.Count); 5099Assert.Equal(0, ps.ParameterList.Parameters[0].AttributeLists.Count); 5168Assert.Equal(0, ps.ParameterList.Parameters[0].AttributeLists.Count); 5175Assert.Equal(0, ps.ParameterList.Parameters[1].AttributeLists.Count); 5244Assert.Equal(0, ps.ParameterList.Parameters[0].AttributeLists.Count); 5311Assert.Equal(0, ps.ParameterList.Parameters[0].AttributeLists.Count); 5318Assert.Equal(0, ps.ParameterList.Parameters[1].AttributeLists.Count); 5391Assert.Equal(0, ps.ParameterList.Parameters[0].AttributeLists.Count); 5398Assert.Equal(0, ps.ParameterList.Parameters[1].AttributeLists.Count); 5505Assert.Equal(0, ps.ParameterList.Parameters[0].AttributeLists.Count); 5566Assert.Equal(0, ms.ParameterList.Parameters[0].AttributeLists.Count); 5614Assert.Equal(0, ms.ParameterList.Parameters[0].AttributeLists.Count);
Syntax\SyntaxNodeTests.cs (1)
4051var newParameter = parameter.Update(parameter.AttributeLists, parameter.Modifiers, parameter.Type, parameter.Identifier, parameter.Default);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
1207ParameterSyntax parameter => parameter.AttributeLists,
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (1)
448parameter.AttributeLists.Any(),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
164ParameterSyntax parameter => parameter.AttributeLists,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
223if (parameterNode.AttributeLists is [var firstAttribute, ..])
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
425var newAttributeLists = RemoveAttributeFromAttributeLists(parameter.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
Microsoft.VisualStudio.LanguageServices.CSharp (6)
CodeModel\CSharpCodeModelService.cs (2)
333return GetAttributeNodes(parameter.AttributeLists); 3446var newAttributeLists = parameter.AttributeLists.Insert(index, (AttributeListSyntax)list);
CodeModel\CSharpCodeModelService.NodeLocator.cs (3)
774if (node.AttributeLists.Count == 0) 1315if (node.AttributeLists.Count == 0) 1320endPosition = node.AttributeLists.Last().GetLastToken().Span.End;
CodeModel\SyntaxNodeExtensions.cs (1)
53attributeLists = parameter.AttributeLists;
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
164ParameterSyntax parameter => parameter.AttributeLists,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
223if (parameterNode.AttributeLists is [var firstAttribute, ..])
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
425var newAttributeLists = RemoveAttributeFromAttributeLists(parameter.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);