1 write to Symbol
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (1)
913Symbol = symbol;
45 references to Symbol
Microsoft.AspNetCore.Analyzers (1)
StartupAnalyzer.cs (1)
43var type = (INamedTypeSymbol)context.Symbol;
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParameterAnalyzer.cs (1)
54var type = (INamedTypeSymbol)context.Symbol;
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentParameterAnalyzer.cs (1)
48var type = (INamedTypeSymbol)context.Symbol;
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (2)
880/// Indicates if the <see cref="Symbol"/> is generated code. 924/// A symbol end action reports <see cref="Diagnostic"/>s about the code within a <see cref="Symbol"/> and its members.
Microsoft.CodeAnalysis.CodeStyle (4)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
62if (!ShouldAnalyze(context, (INamedTypeSymbol)context.Symbol))
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
209if (!ShouldAnalyze(symbolStartContext, (INamedTypeSymbol)symbolStartContext.Symbol))
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
58if (HasSyntaxErrors((INamedTypeSymbol)symbolStartContext.Symbol, symbolStartContext.CancellationToken))
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
108var namedType = (INamedTypeSymbol)context.Symbol;
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
54var namedTypeSymbol = (INamedTypeSymbol)context.Symbol;
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
58if (context.Symbol is not INamedTypeSymbol
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
77var typeSymbol = (INamedTypeSymbol)context.Symbol;
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
209var startSymbol = (INamedTypeSymbol)context.Symbol;
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
79var namedType = (INamedTypeSymbol)context.Symbol;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Semantics\PrimaryConstructorTests.cs (2)
4173switch (context.Symbol.ToTestDisplayString()) 5577switch (context.Symbol.ToTestDisplayString())
Semantics\RecordTests.cs (1)
26665switch (context.Symbol.ToTestDisplayString())
Microsoft.CodeAnalysis.CSharp.Features (5)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
54var namedTypeSymbol = (INamedTypeSymbol)context.Symbol;
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
58if (context.Symbol is not INamedTypeSymbol
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
77var typeSymbol = (INamedTypeSymbol)context.Symbol;
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
209var startSymbol = (INamedTypeSymbol)context.Symbol;
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
79var namedType = (INamedTypeSymbol)context.Symbol;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\RecordStructTests.cs (1)
6287switch (context.Symbol.ToTestDisplayString())
Semantics\TopLevelStatementsTests.cs (4)
6611Assert.Equal("<top-level-statements-entry-point>", context.Symbol.ToTestDisplayString()); 6613switch (context.Symbol.DeclaringSyntaxReferences.Single().GetSyntax().ToString()) 6631Assert.Equal(WellKnownMemberNames.TopLevelStatementsEntryPointTypeName, context.Symbol.ToTestDisplayString()); 6635foreach (var syntaxReference in context.Symbol.DeclaringSyntaxReferences)
Microsoft.CodeAnalysis.Features (4)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
62if (!ShouldAnalyze(context, (INamedTypeSymbol)context.Symbol))
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
209if (!ShouldAnalyze(symbolStartContext, (INamedTypeSymbol)symbolStartContext.Symbol))
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
58if (HasSyntaxErrors((INamedTypeSymbol)symbolStartContext.Symbol, symbolStartContext.CancellationToken))
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
108var namedType = (INamedTypeSymbol)context.Symbol;
Microsoft.CodeAnalysis.Test.Utilities (11)
Diagnostics\CommonDiagnosticAnalyzers.cs (11)
1569sortedCallbackSymbolStartNames.Add($"{context.Symbol.Name}(IsGeneratedCode:{context.IsGeneratedCode})"); 2047if (!SymbolsStarted.Add(symbolStartContext.Symbol)) 2049diagnostics.Add(Diagnostic.Create(DuplicateStartActionRule, Location.None, symbolStartContext.Symbol.Name, _analyzerId)); 2055Assert.Equal(symbolStartContext.Symbol, symbolEndContext.Symbol); 2064symbolEndContext.ReportDiagnostic(Diagnostic.Create(rule, Location.None, symbolStartContext.Symbol.Name, _analyzerId)); 2071Assert.Contains(symbolStartContext.Symbol, containingSymbols); 2074operationContext.ReportDiagnostic(Diagnostic.Create(OperationRule, Location.None, symbolStartContext.Symbol.Name, operationContext.ContainingSymbol.Name, operationContext.Operation.Syntax.ToString(), _analyzerId)); 2089ISymbol symbolStarted = symbolStartContext.Symbol; 2146if (containers.Contains(symbolStartContext.Symbol)) 2149diagnostics.Add(Diagnostic.Create(OperationOrderingRule, Location.None, symbolStartContext.Symbol, operationContext.Operation.Syntax.ToString(), _analyzerId)); 3034AnalyzedSymbolStartSymbols.Add(symbolStartContext.Symbol);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Analyzers\VisualBasic\Analyzers\RemoveUnusedMembers\VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb (1)
27For Each method In DirectCast(context.Symbol, INamedTypeSymbol).GetMembers().OfType(Of IMethodSymbol)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
src\Analyzers\VisualBasic\Analyzers\RemoveUnusedMembers\VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb (1)
27For Each method In DirectCast(context.Symbol, INamedTypeSymbol).GetMembers().OfType(Of IMethodSymbol)
System.Private.CoreLib.Generators (1)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (1)
167var methodSymbol = (IMethodSymbol)context.Symbol;