30 references to OwningSymbol
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
Semantics\PrimaryConstructorTests.cs (4)
4823switch (context.OwningSymbol.ToTestDisplayString()) 5036switch (context.OwningSymbol.ToTestDisplayString()) 5842switch (context.OwningSymbol.ToTestDisplayString()) 5992switch (context.OwningSymbol.ToTestDisplayString())
Semantics\RecordTests.cs (2)
27331switch (context.OwningSymbol.ToTestDisplayString()) 27544switch (context.OwningSymbol.ToTestDisplayString())
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\RecordStructTests.cs (2)
6568switch (context.OwningSymbol.ToTestDisplayString()) 6718switch (context.OwningSymbol.ToTestDisplayString())
Semantics\TopLevelStatementsTests.cs (1)
6916Assert.Equal("<top-level-statements-entry-point>", context.OwningSymbol.ToTestDisplayString());
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Diagnostics\DiagnosticServiceTests.vb (3)
1701Assert.NotNull(context.OwningSymbol) 2531context.RegisterCodeBlockAction(Sub(codeBlockContext) AnalyzedCodeBlockSymbols.Add(codeBlockContext.OwningSymbol)) 2535codeBlockStartContext.RegisterCodeBlockEndAction(Sub(codeBlockEndContext) AnalyzedCodeBlockEndSymbols.Add(codeBlockEndContext.OwningSymbol))
Microsoft.CodeAnalysis.Test.Utilities (16)
Diagnostics\CommonDiagnosticAnalyzers.cs (11)
610codeBlockContext.ReportDiagnostic(Diagnostic.Create(CodeBlockTopLevelRule, codeBlockContext.OwningSymbol.Locations[0], codeBlockContext.OwningSymbol.Name)); 619codeBlockContext.ReportDiagnostic(Diagnostic.Create(CodeBlockPerCompilationRule, codeBlockContext.OwningSymbol.Locations[0], codeBlockContext.OwningSymbol.Name)); 1614sortedCallbackCodeBlockEndNames.Add($"{context.OwningSymbol.ContainingType.Name}(IsGeneratedCode:{context.IsGeneratedCode})")); 1619if (context.OwningSymbol.Kind != SymbolKind.Method) 1624sortedCallbackCodeBlockNames.Add($"{context.OwningSymbol.ContainingType.Name}(IsGeneratedCode:{context.IsGeneratedCode})"); 2801ReportDiagnostics("RegisterCodeBlockAction", codeBlockContext.CodeBlock.SyntaxTree, codeBlockContext.OwningSymbol, codeBlockContext.ReportDiagnostic)); 2812ReportDiagnostics("RegisterCodeBlockEndAction", codeBlockEndContext.CodeBlock.SyntaxTree, codeBlockEndContext.OwningSymbol, codeBlockEndContext.ReportDiagnostic)); 3048context.RegisterCodeBlockAction(codeBlockContext => AnalyzedCodeBlockSymbols.Add(codeBlockContext.OwningSymbol)); 3053codeBlockStartContext.RegisterCodeBlockEndAction(codeBlockEndContext => AnalyzedCodeBlockEndSymbols.Add(codeBlockEndContext.OwningSymbol));
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (4)
154context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.OwningSymbol.Locations.First(), messageArgs: context.OwningSymbol.Name + ":end")); 173context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.OwningSymbol.Locations.First(), messageArgs: context.OwningSymbol.Name + ":end"));
Diagnostics\TestDiagnosticAnalyzer.cs (1)
55OnAbstractMember("CodeBlock", context.CodeBlock, context.OwningSymbol);
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\AnalysisContextInfoTests.cs (1)
72c.RegisterCodeBlockAction(b => ThrowIfMatch(nameof(c.RegisterCodeBlockAction), new AnalysisContextInfo(b.SemanticModel.Compilation, b.OwningSymbol, b.CodeBlock)));
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.vb (1)
412context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_descriptor, context.OwningSymbol.DeclaringSyntaxReferences.First.GetLocation))