48 references to GetOrCreateTypeByMetadataName
Roslyn.Diagnostics.Analyzers (48)
AbstractApplyTraitToClass`1.cs (1)
49
if (semanticModel.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.XunitTraitAttribute) is not { } traitAttribute)
AbstractDoNotCopyValue.cs (4)
1674
if (compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemThreadingSpinLock) is { } spinLock)
1677
if (compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemRuntimeInteropServicesGCHandle) is { } gcHandle)
1680
ValueTaskT = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemThreadingTasksValueTask1);
1681
ConfiguredValueTaskAwaitableT = compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemRuntimeCompilerServicesConfiguredValueTaskAwaitable1);
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (1)
46
var nonDefaultableAttribute = context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.RoslynUtilitiesNonDefaultableAttribute);
DoNotMixAttributesFromDifferentVersionsOfMEF.cs (3)
46
var mefV1ExportAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemComponentModelCompositionExportAttribute);
47
var mefV2ExportAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCompositionExportAttribute);
54
var attributeUsageAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemAttributeUsageAttribute);
ExportedPartsShouldHaveImportingConstructor.cs (5)
49
var exportAttributeV1 = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemComponentModelCompositionExportAttribute);
50
var importingConstructorAttributeV1 = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemComponentModelCompositionImportingConstructorAttribute);
51
var exportAttributeV2 = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCompositionExportAttribute);
52
var inheritedExportAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemComponentModelCompositionInheritedExportAttribute);
53
var importingConstructorAttributeV2 = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCompositionImportingConstructorAttribute);
ImportingConstructorShouldBeObsolete.cs (6)
51
var obsoleteAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemObsoleteAttribute);
52
var exportAttributeV1 = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemComponentModelCompositionExportAttribute);
53
var importingConstructorAttributeV1 = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemComponentModelCompositionImportingConstructorAttribute);
54
var exportAttributeV2 = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCompositionExportAttribute);
55
var inheritedExportAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemComponentModelCompositionInheritedExportAttribute);
56
var importingConstructorAttributeV2 = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCompositionImportingConstructorAttribute);
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (1)
91
var obsoleteAttributeSymbol = semanticModel.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemObsoleteAttribute);
PartsExportedWithMEFv2MustBeMarkedAsShared.cs (2)
44
var exportAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCompositionExportAttribute);
45
var attributeUsageAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemAttributeUsageAttribute);
SpecializedEnumerableCreationAnalyzer.cs (3)
61
INamedTypeSymbol? specializedCollectionsSymbol = context.Compilation.
GetOrCreateTypeByMetadataName
(SpecializedCollectionsMetadataName);
71
INamedTypeSymbol? genericEnumerableSymbol = context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCollectionsGenericIEnumerable1);
77
INamedTypeSymbol? linqEnumerableSymbol = context.Compilation.
GetOrCreateTypeByMetadataName
(LinqEnumerableMetadataName);
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))));
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (1)
51
INamedTypeSymbol? symbolType = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(s_fullNameOfSymbol);
TemporaryArrayAsRefAnalyzer.cs (1)
43
var temporaryArrayExtensions = context.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.MicrosoftCodeAnalysisSharedCollectionsTemporaryArrayExtensions);
TestExportsShouldNotBeDiscoverable.cs (4)
49
var exportAttributeV1 = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemComponentModelCompositionExportAttribute);
50
var exportAttributeV2 = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemCompositionExportAttribute);
51
var inheritedExportAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemComponentModelCompositionInheritedExportAttribute);
52
var attributeUsageAttribute = compilationContext.Compilation.
GetOrCreateTypeByMetadataName
(WellKnownTypeNames.SystemAttributeUsageAttribute);