Base:
property
AttributeLists
Microsoft.CodeAnalysis.CSharp.Syntax.BasePropertyDeclarationSyntax.AttributeLists
39 references to AttributeLists
Microsoft.CodeAnalysis.CSharp (13)
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
603
return SkipAttributes(syntax, propertySyntax.
AttributeLists
, propertySyntax.Modifiers, keyword: default, propertySyntax.Type);
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
251
AddAttributes(t.
AttributeLists
, codeBlocks);
Syntax.xml.Main.Generated.cs (1)
2077
=> node.Update(VisitList(node.
AttributeLists
), VisitList(node.Modifiers), (TypeSyntax?)Visit(node.Type) ?? throw new ArgumentNullException("type"), (ExplicitInterfaceSpecifierSyntax?)Visit(node.ExplicitInterfaceSpecifier), VisitToken(node.Identifier), (AccessorListSyntax?)Visit(node.AccessorList), (ArrowExpressionClauseSyntax?)Visit(node.ExpressionBody), (EqualsValueClauseSyntax?)Visit(node.Initializer), VisitToken(node.SemicolonToken));
Syntax.xml.Syntax.Generated.cs (10)
13124
if (attributeLists != this.
AttributeLists
|| modifiers != this.Modifiers || type != this.Type || explicitInterfaceSpecifier != this.ExplicitInterfaceSpecifier || identifier != this.Identifier || accessorList != this.AccessorList || expressionBody != this.ExpressionBody || initializer != this.Initializer || semicolonToken != this.SemicolonToken)
13137
public new PropertyDeclarationSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.
AttributeLists
, modifiers, this.Type, this.ExplicitInterfaceSpecifier, this.Identifier, this.AccessorList, this.ExpressionBody, this.Initializer, this.SemicolonToken);
13139
public new PropertyDeclarationSyntax WithType(TypeSyntax type) => Update(this.
AttributeLists
, this.Modifiers, type, this.ExplicitInterfaceSpecifier, this.Identifier, this.AccessorList, this.ExpressionBody, this.Initializer, this.SemicolonToken);
13141
public new PropertyDeclarationSyntax WithExplicitInterfaceSpecifier(ExplicitInterfaceSpecifierSyntax? explicitInterfaceSpecifier) => Update(this.
AttributeLists
, this.Modifiers, this.Type, explicitInterfaceSpecifier, this.Identifier, this.AccessorList, this.ExpressionBody, this.Initializer, this.SemicolonToken);
13142
public PropertyDeclarationSyntax WithIdentifier(SyntaxToken identifier) => Update(this.
AttributeLists
, this.Modifiers, this.Type, this.ExplicitInterfaceSpecifier, identifier, this.AccessorList, this.ExpressionBody, this.Initializer, this.SemicolonToken);
13144
public new PropertyDeclarationSyntax WithAccessorList(AccessorListSyntax? accessorList) => Update(this.
AttributeLists
, this.Modifiers, this.Type, this.ExplicitInterfaceSpecifier, this.Identifier, accessorList, this.ExpressionBody, this.Initializer, this.SemicolonToken);
13145
public PropertyDeclarationSyntax WithExpressionBody(ArrowExpressionClauseSyntax? expressionBody) => Update(this.
AttributeLists
, this.Modifiers, this.Type, this.ExplicitInterfaceSpecifier, this.Identifier, this.AccessorList, expressionBody, this.Initializer, this.SemicolonToken);
13146
public PropertyDeclarationSyntax WithInitializer(EqualsValueClauseSyntax? initializer) => Update(this.
AttributeLists
, this.Modifiers, this.Type, this.ExplicitInterfaceSpecifier, this.Identifier, this.AccessorList, this.ExpressionBody, initializer, this.SemicolonToken);
13147
public PropertyDeclarationSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.
AttributeLists
, this.Modifiers, this.Type, this.ExplicitInterfaceSpecifier, this.Identifier, this.AccessorList, this.ExpressionBody, this.Initializer, semicolonToken);
13150
public new PropertyDeclarationSyntax AddAttributeLists(params AttributeListSyntax[] items) => WithAttributeLists(this.
AttributeLists
.AddRange(items));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
458
return [.. result.Declaration.
AttributeLists
.SelectAsArray(attributeList =>
597
if (!p.
AttributeLists
.IsEmpty())
src\Analyzers\CSharp\CodeFixes\UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (2)
169
foreach (var attributeList in property.
AttributeLists
)
173
finalAttributes.Add(attributeList == property.
AttributeLists
[0]
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
1004
propertyDeclarationNode.
AttributeLists
,
Microsoft.CodeAnalysis.CSharp.Features (5)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
458
return [.. result.Declaration.
AttributeLists
.SelectAsArray(attributeList =>
597
if (!p.
AttributeLists
.IsEmpty())
src\Analyzers\CSharp\CodeFixes\UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (2)
169
foreach (var attributeList in property.
AttributeLists
)
173
finalAttributes.Add(attributeList == property.
AttributeLists
[0]
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
251
AddAttributes(t.
AttributeLists
, codeBlocks);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (13)
Generated\Syntax.Test.xml.Generated.cs (2)
13531
Assert.Equal(default, node.
AttributeLists
);
13540
var newNode = node.WithAttributeLists(node.
AttributeLists
).WithModifiers(node.Modifiers).WithType(node.Type).WithExplicitInterfaceSpecifier(node.ExplicitInterfaceSpecifier).WithIdentifier(node.Identifier).WithAccessorList(node.AccessorList).WithExpressionBody(node.ExpressionBody).WithInitializer(node.Initializer).WithSemicolonToken(node.SemicolonToken);
Parsing\DeclarationParsingTests.cs (11)
2907
Assert.Equal(0, propertySyntax.
AttributeLists
.Count);
2948
Assert.Equal(0, propertySyntax.
AttributeLists
.Count);
4131
Assert.Equal(0, ps.
AttributeLists
.Count);
4185
Assert.Equal(0, ps.
AttributeLists
.Count);
4240
Assert.Equal(0, ps.
AttributeLists
.Count);
4313
Assert.Equal(0, ps.
AttributeLists
.Count);
4367
Assert.Equal(0, ps.
AttributeLists
.Count);
4421
Assert.Equal(0, ps.
AttributeLists
.Count);
4505
Assert.Equal(0, ps.
AttributeLists
.Count);
4617
Assert.Equal(0, ps.
AttributeLists
.Count);
4701
Assert.Equal(0, ps.
AttributeLists
.Count);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (1)
375
property.
AttributeLists
.Any(),
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
3411
var newAttributeLists = property.
AttributeLists
.Insert(index, (AttributeListSyntax)list);
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
68
if (propertyDeclarationSyntax.
AttributeLists