64 references to GetOrCreateTypeByMetadataName
Microsoft.CodeAnalysis.Analyzers (64)
FixAnalyzers\FixerWithFixAllAnalyzer.cs (3)
84
INamedTypeSymbol? codeFixProviderSymbol = context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisCodeFixesCodeFixProvider);
96
INamedTypeSymbol? codeActionSymbol = context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisCodeActionsCodeAction);
108
INamedTypeSymbol? exportCodeFixProviderAttributeSymbol = context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisCodeFixesExportCodeFixProviderAttribute);
FixAnalyzers\FixerWithFixAllAnalyzer.Fixer.cs (1)
64
INamedTypeSymbol? codeFixProviderSymbol = model.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisCodeFixesCodeFixProvider);
MetaAnalyzers\ClassIsNotDiagnosticAnalyzer.cs (2)
38
var diagnosticAnalyzer = csac.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsDiagnosticAnalyzer);
39
var diagnosticAnalyzerAttribute = csac.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsDiagnosticAnalyzerAttribute);
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (7)
89
var symbolType = compilation.
GetOrCreateTypeByMetadataName
(s_symbolTypeFullName);
104
var systemHashCode = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemHashCode);
105
var iEqualityComparer = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCollectionsGenericIEqualityComparer1);
114
collectionTypesBuilder.AddIfNotNull(compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCollectionsGenericDictionary2));
115
collectionTypesBuilder.AddIfNotNull(compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCollectionsGenericHashSet1));
116
collectionTypesBuilder.AddIfNotNull(compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCollectionsConcurrentConcurrentDictionary2));
376
=> compilation.
GetOrCreateTypeByMetadataName
(SymbolEqualityComparerName) is object;
MetaAnalyzers\ConfigureGeneratedCodeAnalysisAnalyzer.cs (1)
47
var analysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsAnalysisContext);
MetaAnalyzers\DiagnosticAnalyzerAPIUsageAnalyzer.cs (2)
80
if (compilationStartContext.Compilation.
GetOrCreateTypeByMetadataName
(CodeActionMetadataName) == null)
86
INamedTypeSymbol? diagnosticAnalyzer = compilationStartContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsDiagnosticAnalyzer);
MetaAnalyzers\DiagnosticAnalyzerAttributeAnalyzer.cs (2)
56
var attributeUsageAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemAttributeUsageAttribute);
135
INamedTypeSymbol? compilationType = compilation.
GetOrCreateTypeByMetadataName
(compilationTypeNameToCheck);
MetaAnalyzers\DiagnosticAnalyzerCorrectnessAnalyzer.cs (2)
24
INamedTypeSymbol? diagnosticAnalyzer = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsDiagnosticAnalyzer);
25
INamedTypeSymbol? diagnosticAnalyzerAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsDiagnosticAnalyzerAttribute);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (2)
1107
var diagnosticSeverityType = compilation.
GetOrCreateTypeByMetadataName
(typeof(DiagnosticSeverity).FullName);
1108
var ruleLevelType = compilation.
GetOrCreateTypeByMetadataName
(typeof(RuleLevel).FullName);
MetaAnalyzers\DoNotUseFileTypesForAnalyzersOrGenerators.cs (4)
34
INamedTypeSymbol? diagnosticAnalyzer = context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsDiagnosticAnalyzer);
42
INamedTypeSymbol? codeFixProvider = context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisCodeFixesCodeFixProvider);
43
INamedTypeSymbol? isourceGenerator = context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisISourceGenerator);
44
INamedTypeSymbol? iincrementalGenerator = context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisIIncrementalGenerator);
MetaAnalyzers\EnableConcurrentExecutionAnalyzer.cs (1)
47
var analysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsAnalysisContext);
MetaAnalyzers\Fixers\ConfigureGeneratedCodeAnalysisFix.cs (1)
45
var generatedCodeAnalysisFlags = semanticModel.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsGeneratedCodeAnalysisFlags);
MetaAnalyzers\PreferIsKindAnalyzer.cs (4)
51
if (context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisCSharpCSharpExtensions) is { } csharpKindExtensions
52
&& context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisCSharpExtensions) is { } csharpIsKindExtensions)
57
if (context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisVisualBasicVisualBasicExtensions) is { } vbKindExtensions
58
&& context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisVisualBasicExtensions) is { } vbIsKindExtensions)
MetaAnalyzers\RegisterActionAnalyzer.cs (5)
120
INamedTypeSymbol? analysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsAnalysisContext);
126
INamedTypeSymbol? compilationStartAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsCompilationStartAnalysisContext);
132
INamedTypeSymbol? codeBlockStartAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsCodeBlockStartAnalysisContext1);
138
INamedTypeSymbol? operationBlockStartAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsOperationBlockStartAnalysisContext);
144
INamedTypeSymbol? symbolKind = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisSymbolKind);
MetaAnalyzers\ReportDiagnosticAnalyzer.cs (10)
44
INamedTypeSymbol? compilationEndAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsCompilationEndAnalysisContext);
50
INamedTypeSymbol? codeBlockAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsCodeBlockAnalysisContext);
56
INamedTypeSymbol? operationBlockAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsOperationBlockAnalysisContext);
62
INamedTypeSymbol? operationAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsOperationAnalysisContext);
68
INamedTypeSymbol? semanticModelAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsSemanticModelAnalysisContext);
74
INamedTypeSymbol? symbolAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsSymbolAnalysisContext);
80
INamedTypeSymbol? syntaxNodeAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsSyntaxNodeAnalysisContext);
86
INamedTypeSymbol? syntaxTreeAnalysisContext = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsSyntaxTreeAnalysisContext);
92
INamedTypeSymbol? diagnosticType = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnostic);
98
INamedTypeSymbol? diagnosticDescriptorType = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticDescriptor);
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (3)
98
return compilation.
GetOrCreateTypeByMetadataName
(_enablingMethodAttributeFullyQualifiedName);
106
compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemException),
107
compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemSystemException)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (9)
166
INamedTypeSymbol? iDisposable = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemIDisposable);
175
INamedTypeSymbol? iAsyncDisposable = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemIAsyncDisposable);
176
INamedTypeSymbol? valueTaskType = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemThreadingTasksValueTask);
322
INamedTypeSymbol? iDisposable = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemIDisposable);
323
INamedTypeSymbol? iAsyncDisposable = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemIAsyncDisposable);
324
INamedTypeSymbol? configuredAsyncDisposable = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemRuntimeCompilerServicesConfiguredAsyncDisposable);
325
INamedTypeSymbol? task = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemThreadingTasksTask);
326
INamedTypeSymbol? valueTask = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemThreadingTasksValueTask);
327
INamedTypeSymbol? configuredValueTaskAwaitable = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemRuntimeCompilerServicesConfiguredValueTaskAwaitable);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\OperationBlockAnalysisContextExtension.cs (3)
59
context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemNotImplementedException),
62
context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemNotSupportedException),
66
context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemPlatformNotSupportedException),
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
436
compilation.
GetOrCreateTypeByMetadataName
(SystemNotImplementedExceptionTypeName))));
UpgradeMSBuildWorkspaceAnalyzer.cs (1)
84
var msbuildWorkspace = context.Compilation.
GetOrCreateTypeByMetadataName
(MSBuildWorkspaceFullName);