103 references to LockStatementSyntax
Microsoft.CodeAnalysis.CSharp (16)
Binder\Binder_Statements.cs (2)
140result = BindLockStatement((LockStatementSyntax)node, diagnostics); 295private BoundStatement BindLockStatement(LockStatementSyntax node, BindingDiagnosticBag diagnostics)
Binder\ExpressionVariableFinder.cs (1)
198public override void VisitLockStatement(LockStatementSyntax node)
Binder\LocalBinderFactory.cs (1)
713public override void VisitLockStatement(LockStatementSyntax node)
Binder\LockBinder.cs (2)
18private readonly LockStatementSyntax _syntax; 20public LockBinder(Binder enclosing, LockStatementSyntax syntax)
Lowering\Instrumentation\DebugInfoInjector.cs (2)
396LockStatementSyntax lockSyntax = (LockStatementSyntax)original.Syntax;
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (2)
24LockStatementSyntax lockSyntax = (LockStatementSyntax)node.Syntax;
Parser\LanguageParser.cs (1)
9602private LockStatementSyntax ParseLockStatement(SyntaxList<AttributeListSyntax> attributes)
Syntax\LockStatementSyntax.cs (2)
11public LockStatementSyntax Update(SyntaxToken lockKeyword, SyntaxToken openParenToken, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement) 20public static LockStatementSyntax LockStatement(SyntaxToken lockKeyword, SyntaxToken openParenToken, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement)
Syntax\LookupPosition.cs (2)
347return ((LockStatementSyntax)statement).LockKeyword; 410return GetFirstExcludedToken(((LockStatementSyntax)statement).Statement);
Syntax\SyntaxBindingUtilities.cs (1)
25or LockStatementSyntax;
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
145(nodeParent is LockStatementSyntax lockStatement && lockStatement.Expression == node) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (3)
123LockStatementSyntax or 138LockStatementSyntax n => n.Statement, 713LockStatementSyntax n => (n.OpenParenToken, n.CloseParenToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (2)
297LockStatementSyntax lockStatement => lockStatement.CloseParenToken.Equals(token), 370LockStatementSyntax;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
343if (node is LockStatementSyntax lockStatement && lockStatement.Statement != null && !(lockStatement.Statement is BlockSyntax))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
515if (node is LockStatementSyntax lockStatement)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
165LockStatementSyntax lockStatement => InferTypeInLockStatement(lockStatement), 232LockStatementSyntax lockStatement => InferTypeInLockStatement(lockStatement, token), 1579private IEnumerable<TypeInferenceInfo> InferTypeInLockStatement(LockStatementSyntax lockStatement, SyntaxToken? previousToken = null)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (5)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
334or LockStatementSyntax
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (4)
151WhileStatementSyntax or ForEachStatementSyntax or ForStatementSyntax or LockStatementSyntax or UsingStatementSyntax 481LockStatementSyntax lockStatementNode => ShouldAddBraceForLockStatement(lockStatementNode, caretPosition), 715private static bool ShouldAddBraceForLockStatement(LockStatementSyntax lockStatementNode, int caretPosition) 951LockStatementSyntax lockStatementNode => lockStatementNode.WithStatement(block),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Semantics\LockTests.cs (1)
188var lockStatement = tree.GetRoot().DescendantNodes().OfType<LockStatementSyntax>().Single();
Semantics\OutVarTests.cs (2)
10856var statement = (LockStatementSyntax)SyntaxFactory.ParseStatement(@"
Semantics\PatternMatchingTests_Scope.cs (2)
9636var statement = (LockStatementSyntax)SyntaxFactory.ParseStatement(@"
Microsoft.CodeAnalysis.CSharp.Features (25)
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
41public override void VisitLockStatement(LockStatementSyntax node)
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
268AddLastStatementOfConstruct((statement as LockStatementSyntax).Statement);
EditAndContinue\BreakpointSpans.cs (2)
721var lockStatement = (LockStatementSyntax)statement;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (7)
830return AreEquivalentActiveStatements((LockStatementSyntax)oldStatement, (LockStatementSyntax)newStatement); 880private static bool AreEquivalentActiveStatements(LockStatementSyntax oldNode, LockStatementSyntax newNode) 1775var lockStatement = (LockStatementSyntax)node; 2997ReportUnmatchedStatements<LockStatementSyntax>(
EditAndContinue\SyntaxComparer.cs (4)
851var leftLock = (LockStatementSyntax)leftNode; 852var rightLock = (LockStatementSyntax)rightNode;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
181public override SyntaxNode VisitLockStatement(LockStatementSyntax node)
ExtractMethod\CSharpSelectionValidator.Validator.cs (2)
37LockStatementSyntax or 66LockStatementSyntax or
Highlighting\KeywordHighlighters\LockStatementHighlighter.cs (2)
19internal class LockStatementHighlighter : AbstractKeywordHighlighter<LockStatementSyntax> 27protected override void AddHighlights(LockStatementSyntax lockStatement, List<TextSpan> highlights, CancellationToken cancellationToken)
Snippets\CSharpLockSnippetProvider.cs (4)
22internal sealed class CSharpLockSnippetProvider() : AbstractLockSnippetProvider<LockStatementSyntax> 28protected override ImmutableArray<SnippetPlaceholder> GetPlaceHolderLocationsList(LockStatementSyntax node, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken) 34protected override int GetTargetCaretPosition(LockStatementSyntax lockStatement, SourceText sourceText) 40protected override Task<Document> AddIndentationToDocumentAsync(Document document, LockStatementSyntax lockStatement, CancellationToken cancellationToken)
src\Compilers\CSharp\Portable\Syntax\SyntaxBindingUtilities.cs (1)
25or LockStatementSyntax;
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (15)
IOperation\IOperationTests_ILockStatement.cs (15)
59VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 87VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 114VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 146VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 178VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 212VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 248VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 279VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 314VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 350VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 393VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 419VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>([source, LockTypeDefinition], expectedOperationTree, expectedDiagnostics); 455VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 496VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 540VerifyOperationTreeAndDiagnosticsForTest<LockStatementSyntax>(source, expectedOperationTree, expectedDiagnostics);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\LockTests.cs (5)
50var lockStatement = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LockStatementSyntax>().Single(); 489var lockStatements = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LockStatementSyntax>().ToList(); 575var lockStatements = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LockStatementSyntax>().ToList(); 699var lockStatements = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LockStatementSyntax>().ToList();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Generated\Syntax.Test.xml.Generated.cs (5)
10634private static LockStatementSyntax GenerateLockStatement() 12609var node = GenerateLockStatement(); 12617var newNode = node.WithAttributeLists(node.AttributeLists).WithLockKeyword(node.LockKeyword).WithOpenParenToken(node.OpenParenToken).WithExpression(node.Expression).WithCloseParenToken(node.CloseParenToken).WithStatement(node.Statement); 17609var oldNode = GenerateLockStatement(); 17625var oldNode = GenerateLockStatement();
Parsing\StatementParsingTests.cs (2)
2105var ls = (LockStatementSyntax)statement;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
LocalVariableDeclaratorsCollector.cs (1)
38public sealed override void VisitLockStatement(LockStatementSyntax node)
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
145(nodeParent is LockStatementSyntax lockStatement && lockStatement.Expression == node) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (3)
123LockStatementSyntax or 138LockStatementSyntax n => n.Statement, 713LockStatementSyntax n => (n.OpenParenToken, n.CloseParenToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (2)
297LockStatementSyntax lockStatement => lockStatement.CloseParenToken.Equals(token), 370LockStatementSyntax;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
343if (node is LockStatementSyntax lockStatement && lockStatement.Statement != null && !(lockStatement.Statement is BlockSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
515if (node is LockStatementSyntax lockStatement)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
165LockStatementSyntax lockStatement => InferTypeInLockStatement(lockStatement), 232LockStatementSyntax lockStatement => InferTypeInLockStatement(lockStatement, token), 1579private IEnumerable<TypeInferenceInfo> InferTypeInLockStatement(LockStatementSyntax lockStatement, SyntaxToken? previousToken = null)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
656VerifySyntax<LockStatementSyntax>(
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\ControlFlowGraphVerifier.cs (1)
1157if (((LockStatementSyntax)parent).Expression == syntax)