47 references to OwningSymbol
ILLink.RoslynAnalyzer (3)
DataFlow\LocalDataFlowAnalysis.cs (3)
77 AnalyzeAttribute (Context.OwningSymbol, attribute); 81 Debug.Assert (Context.OwningSymbol is not IMethodSymbol methodSymbol || 83 var startMethod = new MethodBodyValue (Context.OwningSymbol, Context.GetControlFlowGraph (OperationBlock));
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (1)
1387/// This includes all blocks associated with the <see cref="OwningSymbol"/>,
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (6)
456var isComputingUnusedParams = _options.IsComputingUnusedParams(context.OwningSymbol); 492if (!ShouldAnalyze(operationBlock, context.OwningSymbol, ref hasUnknownOperationNoneDescendant)) 505var resultFromOperationBlockAnalysis = SymbolUsageAnalysis.Run(operationBlock, context.OwningSymbol, context.CancellationToken); 509Debug.Assert(!SymbolUsageAnalysis.Run(context.GetControlFlowGraph(operationBlock), context.OwningSymbol, context.CancellationToken) 519var symbolUsageResult = SymbolUsageAnalysis.Run(controlFlowGraph, context.OwningSymbol, context.CancellationToken); 714if (context.OwningSymbol is not IMethodSymbol method)
src\Analyzers\Core\Analyzers\UseSystemHashCode\UseSystemHashCodeDiagnosticAnalyzer.cs (2)
45var owningSymbol = context.OwningSymbol; 78var declarationLocation = context.OwningSymbol.DeclaringSyntaxReferences[0].GetSyntax(cancellationToken).GetLocation();
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
139if (context.OwningSymbol is not IMethodSymbol owningMethod)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Semantics\PrimaryConstructorTests.cs (3)
4509switch (context.OwningSymbol.ToTestDisplayString()) 4717switch (context.OwningSymbol.ToTestDisplayString()) 5784switch (context.OwningSymbol.ToTestDisplayString())
Semantics\RecordTests.cs (2)
26972switch (context.OwningSymbol.ToTestDisplayString()) 27180switch (context.OwningSymbol.ToTestDisplayString())
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
139if (context.OwningSymbol is not IMethodSymbol owningMethod)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\RecordStructTests.cs (1)
6510switch (context.OwningSymbol.ToTestDisplayString())
Semantics\TopLevelStatementsTests.cs (2)
6800Assert.Equal("<top-level-statements-entry-point>", context.OwningSymbol.ToTestDisplayString()); 7352Assert.Equal("<top-level-statements-entry-point>", context.OwningSymbol.ToTestDisplayString());
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Diagnostics\DiagnosticServiceTests.vb (2)
2524context.RegisterOperationBlockAction(Sub(operationBlockContext) AnalyzedOperationBlockSymbols.Add(operationBlockContext.OwningSymbol)) 2528operationBlockStartContext.RegisterOperationBlockEndAction(Sub(operationBlockEndContext) AnalyzedOperationBlockEndSymbols.Add(operationBlockEndContext.OwningSymbol))
Microsoft.CodeAnalysis.Features (8)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (6)
456var isComputingUnusedParams = _options.IsComputingUnusedParams(context.OwningSymbol); 492if (!ShouldAnalyze(operationBlock, context.OwningSymbol, ref hasUnknownOperationNoneDescendant)) 505var resultFromOperationBlockAnalysis = SymbolUsageAnalysis.Run(operationBlock, context.OwningSymbol, context.CancellationToken); 509Debug.Assert(!SymbolUsageAnalysis.Run(context.GetControlFlowGraph(operationBlock), context.OwningSymbol, context.CancellationToken) 519var symbolUsageResult = SymbolUsageAnalysis.Run(controlFlowGraph, context.OwningSymbol, context.CancellationToken); 714if (context.OwningSymbol is not IMethodSymbol method)
src\Analyzers\Core\Analyzers\UseSystemHashCode\UseSystemHashCodeDiagnosticAnalyzer.cs (2)
45var owningSymbol = context.OwningSymbol; 78var declarationLocation = context.OwningSymbol.DeclaringSyntaxReferences[0].GetSyntax(cancellationToken).GetLocation();
Microsoft.CodeAnalysis.Test.Utilities (14)
Diagnostics\CommonDiagnosticAnalyzers.cs (14)
1335blockStartContext.RegisterOperationBlockEndAction(c => ReportDiagnostic(c.ReportDiagnostic, c.OwningSymbol.Locations[0])); 1344ReportDiagnostic(blockContext.ReportDiagnostic, blockContext.OwningSymbol.Locations[0]); 1345CacheAndVerifyControlFlowGraph(blockContext.OperationBlocks, op => (blockContext.GetControlFlowGraph(op), blockContext.OwningSymbol)); 1392var diagnostic = Diagnostic.Create(Descriptor, c.OwningSymbol.Locations[0], c.OwningSymbol.Name, operationRoot.Kind); 1586sortedCallbackOperationBlockEndNames.Add($"{context.OwningSymbol.ContainingType.Name}(IsGeneratedCode:{context.IsGeneratedCode})")); 1591if (context.OwningSymbol.Kind != SymbolKind.Method || 1597sortedCallbackOperationBlockNames.Add($"{context.OwningSymbol.ContainingType.Name}(IsGeneratedCode:{context.IsGeneratedCode})"); 2778ReportDiagnostics("RegisterOperationBlockAction", operationBlockContext.OwningSymbol.DeclaringSyntaxReferences[0].SyntaxTree, operationBlockContext.OwningSymbol, operationBlockContext.ReportDiagnostic)); 2789ReportDiagnostics("RegisterOperationBlockEndAction", operationBlockEndContext.OwningSymbol.DeclaringSyntaxReferences[0].SyntaxTree, operationBlockEndContext.OwningSymbol, operationBlockEndContext.ReportDiagnostic)); 3041context.RegisterOperationBlockAction(operationBlockContext => AnalyzedOperationBlockSymbols.Add(operationBlockContext.OwningSymbol)); 3046operationBlockStartContext.RegisterOperationBlockEndAction(operationBlockEndContext => AnalyzedOperationBlockEndSymbols.Add(operationBlockEndContext.OwningSymbol));
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\AnalysisContextInfoTests.cs (1)
77c.RegisterOperationBlockAction(b => ThrowIfMatch(nameof(c.RegisterOperationBlockAction), new AnalysisContextInfo(b.Compilation, b.OwningSymbol)));