132 references to BasePropertyDeclarationSyntax
Microsoft.CodeAnalysis.CSharp (35)
Binder\BinderFactory.BinderFactoryVisitor.cs (6)
289
var propertySymbol = GetPropertySymbol((
BasePropertyDeclarationSyntax
)propertyOrEventDecl, resultBinder);
408
private Binder VisitPropertyOrIndexerExpressionBody(
BasePropertyDeclarationSyntax
parent)
486
private static string GetPropertyOrEventName(
BasePropertyDeclarationSyntax
basePropertyDeclarationSyntax, Binder outerBinder)
524
private SourcePropertySymbol GetPropertySymbol(
BasePropertyDeclarationSyntax
basePropertyDeclarationSyntax, Binder outerBinder)
1267
BasePropertyDeclarationSyntax
propertyDeclSyntax = (
BasePropertyDeclarationSyntax
)memberSyntax;
Compilation\CSharpSemanticModel.cs (1)
3016
public abstract ISymbol GetDeclaredSymbol(
BasePropertyDeclarationSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
Compilation\MemberSemanticModel.cs (1)
644
public override ISymbol GetDeclaredSymbol(
BasePropertyDeclarationSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
300
public override ISymbol GetDeclaredSymbol(
BasePropertyDeclarationSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (2)
1186
if (node.Parent is
BasePropertyDeclarationSyntax
)
1519
public override ISymbol GetDeclaredSymbol(
BasePropertyDeclarationSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compiler\UnprocessedDocumentationCommentFinder.cs (1)
67
node is
BasePropertyDeclarationSyntax
|| //includes EventDeclarationSyntax
CSharpExtensions.cs (1)
1418
public static ISymbol? GetDeclaredSymbol(this SemanticModel? semanticModel,
BasePropertyDeclarationSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (2)
201
if (node.Parent is
BasePropertyDeclarationSyntax
parentProperty)
359
BasePropertyDeclarationSyntax
declarationWithExpressionBody,
Symbols\Source\ModifierUtils.cs (1)
29
if (readonlyToken.Parent is MethodDeclarationSyntax or AccessorDeclarationSyntax or
BasePropertyDeclarationSyntax
or EventDeclarationSyntax)
Symbols\Source\SourcePropertySymbol.cs (15)
35
BasePropertyDeclarationSyntax
syntax,
103
BasePropertyDeclarationSyntax
syntax,
172
private TypeSyntax GetTypeSyntax(SyntaxNode syntax) => ((
BasePropertyDeclarationSyntax
)syntax).Type;
178
=> ((
BasePropertyDeclarationSyntax
)syntax).Modifiers;
202
((
BasePropertyDeclarationSyntax
)CSharpSyntaxNode).AttributeLists,
203
((
BasePropertyDeclarationSyntax
)implementationPart.CSharpSyntaxNode).AttributeLists);
207
return OneOrMany.Create(((
BasePropertyDeclarationSyntax
)CSharpSyntaxNode).AttributeLists);
226
var
syntax = (
BasePropertyDeclarationSyntax
)syntaxNode;
329
private static AccessorDeclarationSyntax GetGetAccessorDeclaration(
BasePropertyDeclarationSyntax
syntax)
343
private static AccessorDeclarationSyntax GetSetAccessorDeclaration(
BasePropertyDeclarationSyntax
syntax)
492
var
syntax = (
BasePropertyDeclarationSyntax
)CSharpSyntaxNode;
509
var
syntax = (
BasePropertyDeclarationSyntax
)CSharpSyntaxNode;
Symbols\Source\SourcePropertySymbolBase.cs (1)
1869
=> (syntax as
BasePropertyDeclarationSyntax
)?.ExplicitInterfaceSpecifier;
Symbols\VarianceSafety.cs (2)
203
var
syntax = p.GetDeclaringSyntax<
BasePropertyDeclarationSyntax
>();
Syntax\SyntaxNodeExtensions.cs (1)
269
(current.Parent is
BasePropertyDeclarationSyntax
property && property.Type == current) ||
Microsoft.CodeAnalysis.CSharp.CodeStyle (11)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
150
BasePropertyDeclarationSyntax
declaration,
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (2)
109
BasePropertyDeclarationSyntax
property => property.Type,
110
AccessorDeclarationSyntax(SyntaxKind.GetAccessorDeclaration) { Parent: AccessorListSyntax { Parent:
BasePropertyDeclarationSyntax
baseProperty } } => baseProperty.Type,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (4)
43
if (node is
BasePropertyDeclarationSyntax
basePropertyDeclaration && basePropertyDeclaration.AccessorList != null &&
224
if (previousMember is
BasePropertyDeclarationSyntax
previousProperty)
226
var
nextProperty = (
BasePropertyDeclarationSyntax
)nextMember;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
170
var option = currentTokenParentParent is
BasePropertyDeclarationSyntax
371
var option = currentTokenParentParent is
BasePropertyDeclarationSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
744
BasePropertyDeclarationSyntax
or
990
case
BasePropertyDeclarationSyntax
property:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
src\Analyzers\CSharp\CodeFixes\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyCodeFixProvider.cs (4)
47
if (declaration is MethodDeclarationSyntax or
BasePropertyDeclarationSyntax
)
53
else if (declaration is AccessorDeclarationSyntax { Parent: AccessorListSyntax { Parent:
BasePropertyDeclarationSyntax
property } accessorList } accessor)
71
var
currentProperty = (
BasePropertyDeclarationSyntax
)current;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
746
BasePropertyDeclarationSyntax
propertyDeclaration => Cast<TDeclarationNode>(propertyDeclaration.WithModifiers(computeNewModifiersList(propertyDeclaration.Modifiers))),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (1)
177
BasePropertyDeclarationSyntax
baseProperty, LanguageVersion languageVersion, ExpressionBodyPreference preference, CancellationToken cancellationToken,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BasePropertyDeclarationSyntaxExtensions.cs (5)
15
public static SyntaxToken TryGetSemicolonToken(this
BasePropertyDeclarationSyntax
? node)
33
public static
BasePropertyDeclarationSyntax
? TryWithSemicolonToken(this
BasePropertyDeclarationSyntax
? node, SyntaxToken semicolonToken)
51
public static
BasePropertyDeclarationSyntax
? TryWithExpressionBody(this
BasePropertyDeclarationSyntax
? node, ArrowExpressionClauseSyntax expressionBody)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
178
BasePropertyDeclarationSyntax
=> SyntaxFactory.ParseCompilationUnit(WrapInType(textToParse), options: (CSharpParseOptions)tree.Options),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Diagnostics\GetDiagnosticsTests.cs (2)
973
if (blockEndContext.CodeBlock is
BasePropertyDeclarationSyntax
)
1014
if (node.FirstAncestorOrSelf<
BasePropertyDeclarationSyntax
>() is { } basePropertyDecl)
Microsoft.CodeAnalysis.CSharp.Features (16)
BraceCompletion\CurlyBraceCompletionService.cs (1)
185
return currentTokenParentParent is
BasePropertyDeclarationSyntax
Completion\CompletionProviders\CompletionUtilities.cs (1)
202
case
BasePropertyDeclarationSyntax
propertyDeclaration:
EditAndContinue\DeclarationBody\PropertyOrIndexerWithExplicitBodyDeclarationBody.cs (1)
16
internal sealed class PropertyOrIndexerWithExplicitBodyDeclarationBody(
BasePropertyDeclarationSyntax
propertyOrIndexer) : PropertyOrIndexerAccessorDeclarationBody
EditAndContinue\SyntaxUtilities.cs (1)
40
=> new PropertyOrIndexerWithExplicitBodyDeclarationBody((
BasePropertyDeclarationSyntax
)arrowExpression.Parent!),
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
250
BasePropertyDeclarationSyntax
baseProperty => baseProperty
LineSeparators\CSharpLineSeparatorService.cs (1)
151
private static bool IsBadAccessorList(
BasePropertyDeclarationSyntax
? baseProperty)
NavigationBar\CSharpNavigationBarItemService.cs (1)
152
BasePropertyDeclarationSyntax
or
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
150
BasePropertyDeclarationSyntax
declaration,
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (2)
109
BasePropertyDeclarationSyntax
property => property.Type,
110
AccessorDeclarationSyntax(SyntaxKind.GetAccessorDeclaration) { Parent: AccessorListSyntax { Parent:
BasePropertyDeclarationSyntax
baseProperty } } => baseProperty.Type,
src\Analyzers\CSharp\CodeFixes\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyCodeFixProvider.cs (4)
47
if (declaration is MethodDeclarationSyntax or
BasePropertyDeclarationSyntax
)
53
else if (declaration is AccessorDeclarationSyntax { Parent: AccessorListSyntax { Parent:
BasePropertyDeclarationSyntax
property } accessorList } accessor)
71
var
currentProperty = (
BasePropertyDeclarationSyntax
)current;
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (2)
201
if (node.Parent is
BasePropertyDeclarationSyntax
parentProperty)
359
BasePropertyDeclarationSyntax
declarationWithExpressionBody,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (6)
429
var
node = root.FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("public event D Iter3", StringComparison.Ordinal)).Parent as
BasePropertyDeclarationSyntax
;
452
var
node = (
BasePropertyDeclarationSyntax
)typeDecl.Members[0];
474
var
node = (
BasePropertyDeclarationSyntax
)typeDecl.Members[0];
Microsoft.CodeAnalysis.CSharp.Workspaces (23)
CodeGeneration\CSharpSyntaxGenerator.cs (3)
1773
BasePropertyDeclarationSyntax
member
2530
=> (declaration as
BasePropertyDeclarationSyntax
)?.AccessorList;
2544
BasePropertyDeclarationSyntax
baseProperty => baseProperty.WithAccessorList(accessorList),
SemanticModelReuse\CSharpSemanticModelReuseLanguageService.cs (5)
19
BasePropertyDeclarationSyntax
,
30
protected override
BasePropertyDeclarationSyntax
GetBasePropertyDeclaration(AccessorDeclarationSyntax accessor)
33
Contract.ThrowIfFalse(accessor.Parent.Parent is
BasePropertyDeclarationSyntax
);
34
return (
BasePropertyDeclarationSyntax
)accessor.Parent.Parent;
37
protected override SyntaxList<AccessorDeclarationSyntax> GetAccessors(
BasePropertyDeclarationSyntax
baseProperty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (4)
43
if (node is
BasePropertyDeclarationSyntax
basePropertyDeclaration && basePropertyDeclaration.AccessorList != null &&
224
if (previousMember is
BasePropertyDeclarationSyntax
previousProperty)
226
var
nextProperty = (
BasePropertyDeclarationSyntax
)nextMember;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
170
var option = currentTokenParentParent is
BasePropertyDeclarationSyntax
371
var option = currentTokenParentParent is
BasePropertyDeclarationSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
744
BasePropertyDeclarationSyntax
or
990
case
BasePropertyDeclarationSyntax
property:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
746
BasePropertyDeclarationSyntax
propertyDeclaration => Cast<TDeclarationNode>(propertyDeclaration.WithModifiers(computeNewModifiersList(propertyDeclaration.Modifiers))),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (1)
177
BasePropertyDeclarationSyntax
baseProperty, LanguageVersion languageVersion, ExpressionBodyPreference preference, CancellationToken cancellationToken,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BasePropertyDeclarationSyntaxExtensions.cs (5)
15
public static SyntaxToken TryGetSemicolonToken(this
BasePropertyDeclarationSyntax
? node)
33
public static
BasePropertyDeclarationSyntax
? TryWithSemicolonToken(this
BasePropertyDeclarationSyntax
? node, SyntaxToken semicolonToken)
51
public static
BasePropertyDeclarationSyntax
? TryWithExpressionBody(this
BasePropertyDeclarationSyntax
? node, ArrowExpressionClauseSyntax expressionBody)
Microsoft.VisualStudio.LanguageServices.CSharp (27)
CodeModel\CSharpCodeModelService.CodeModelEventCollector.cs (4)
258
else if (oldMember is
BasePropertyDeclarationSyntax
baseProperty)
260
return ComparePropertyDeclarations(baseProperty, (
BasePropertyDeclarationSyntax
)newMember, newNodeParent, eventQueue);
298
BasePropertyDeclarationSyntax
oldProperty,
299
BasePropertyDeclarationSyntax
newProperty,
CodeModel\CSharpCodeModelService.cs (15)
315
else if (parent is
BasePropertyDeclarationSyntax
baseProperty)
1115
BasePropertyDeclarationSyntax
)
1148
return GetAccess(node.GetAncestors<
BasePropertyDeclarationSyntax
>().First());
1513
Debug.Assert(parentNode is
BasePropertyDeclarationSyntax
);
1515
var
basePropertyDeclaration = (
BasePropertyDeclarationSyntax
)parentNode;
2267
BasePropertyDeclarationSyntax
or
2314
if (member is
BasePropertyDeclarationSyntax
property && property.AccessorList != null)
2354
if (member is
BasePropertyDeclarationSyntax
property && property.AccessorList != null)
2417
BasePropertyDeclarationSyntax
or
2458
BasePropertyDeclarationSyntax
or
2604
Debug.Assert(propertyNode is
BasePropertyDeclarationSyntax
);
2606
if (propertyNode is not
BasePropertyDeclarationSyntax
property)
2678
Debug.Assert(memberNode is
BasePropertyDeclarationSyntax
);
2680
if (memberNode is not
BasePropertyDeclarationSyntax
property)
CodeModel\CSharpCodeModelService.NodeLocator.cs (5)
59
return GetStartPoint(text, options, (
BasePropertyDeclarationSyntax
)node, part);
110
return GetEndPoint(text, (
BasePropertyDeclarationSyntax
)node, part);
432
private static AccessorDeclarationSyntax FindFirstAccessorNode(
BasePropertyDeclarationSyntax
node)
442
private static VirtualTreePoint GetStartPoint(SourceText text, LineFormattingOptions options,
BasePropertyDeclarationSyntax
node, EnvDTE.vsCMPart part)
995
private static VirtualTreePoint GetEndPoint(SourceText text,
BasePropertyDeclarationSyntax
node, EnvDTE.vsCMPart part)
CodeModel\CSharpCodeModelService_Prototype.cs (2)
57
case
BasePropertyDeclarationSyntax
propertyDeclaration:
202
private string GetPropertyPrototype(
BasePropertyDeclarationSyntax
node, IPropertySymbol symbol, PrototypeFlags flags)
CodeModel\SyntaxNodeExtensions.cs (1)
31
else if (node is
BasePropertyDeclarationSyntax
baseProperty)