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