927 references to GetTypeByMetadataName
ConfigurationSchemaGenerator (1)
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (1)
41var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
GenerateDocumentationAndConfigFiles (81)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (77)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!); 82=> compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!); 85=> compilation.GetTypeByMetadataName(typeof(ArgumentOutOfRangeException).FullName!); 88=> compilation.GetTypeByMetadataName(typeof(Array).FullName!); 91=> compilation.GetTypeByMetadataName(typeof(Attribute).FullName!); 94=> compilation.GetTypeByMetadataName(typeof(BlockingCollection<>).FullName!); 97=> compilation.GetTypeByMetadataName(typeof(Collection<>).FullName!); 100=> compilation.GetTypeByMetadataName(typeof(Exception).FullName!); 103=> compilation.GetTypeByMetadataName(typeof(System.Diagnostics.DebuggerDisplayAttribute).FullName!); 106=> compilation.GetTypeByMetadataName(typeof(StructLayoutAttribute).FullName!); 109=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.InlineArrayAttribute"); 112=> compilation.GetTypeByMetadataName("System.ComponentModel.DesignerCategoryAttribute"); 115=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute"); 118=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.HideModuleNameAttribute"); 121=> compilation.GetTypeByMetadataName(typeof(ThreadStaticAttribute).FullName!); 124=> compilation.GetTypeByMetadataName(typeof(FormattableString).FullName!); 127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!); 130=> compilation.GetTypeByMetadataName(typeof(EventArgs).FullName!); 133=> compilation.GetTypeByMetadataName(typeof(NotImplementedException).FullName!); 136=> compilation.GetTypeByMetadataName(typeof(EqualityComparer<>).FullName!); 139=> compilation.GetTypeByMetadataName(typeof(Action).FullName!); 142=> compilation.GetTypeByMetadataName("System.Linq.Expressions.Expression`1"); 145=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableAttribute).FullName!); 148=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableState).FullName!); 151=> compilation.GetTypeByMetadataName(typeof(Task).FullName!); 154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!); 157=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask"); 160=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask`1"); 163=> compilation.GetTypeByMetadataName(typeof(ICollection<>).FullName!); 166=> compilation.GetTypeByMetadataName(typeof(System.Collections.IEnumerable).FullName!); 169=> compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!); 172=> compilation.GetTypeByMetadataName(typeof(IEnumerator<>).FullName!); 175=> compilation.GetTypeByMetadataName(typeof(IList<>).FullName!); 178=> compilation.GetTypeByMetadataName(typeof(IReadOnlyList<>).FullName!); 181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!); 184=> compilation.GetTypeByMetadataName(typeof(IReadOnlySet<>).FullName!); 187=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerable`1"); 190=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerator`1"); 193=> compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!); 196=> compilation.GetTypeByMetadataName(typeof(SerializableAttribute).FullName!); 199=> compilation.GetTypeByMetadataName(typeof(CoClassAttribute).FullName!); 202=> compilation.GetTypeByMetadataName(typeof(ComAliasNameAttribute).FullName!); 205=> compilation.GetTypeByMetadataName(typeof(SuppressMessageAttribute).FullName!); 208=> compilation.GetTypeByMetadataName(typeof(TupleElementNamesAttribute).FullName!); 211=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.NativeIntegerAttribute"); 214=> compilation.GetTypeByMetadataName(typeof(DynamicAttribute).FullName!); 217=> compilation.GetTypeByMetadataName(typeof(Lazy<>).FullName!); 220=> compilation.GetTypeByMetadataName(typeof(ISerializable).FullName!); 223=> compilation.GetTypeByMetadataName(typeof(SerializationInfo).FullName!); 226=> compilation.GetTypeByMetadataName(typeof(StreamingContext).FullName!); 229=> compilation.GetTypeByMetadataName(typeof(OnDeserializingAttribute).FullName!); 232=> compilation.GetTypeByMetadataName(typeof(OnDeserializedAttribute).FullName!); 235=> compilation.GetTypeByMetadataName(typeof(OnSerializingAttribute).FullName!); 238=> compilation.GetTypeByMetadataName(typeof(OnSerializedAttribute).FullName!); 241=> compilation.GetTypeByMetadataName(typeof(ComRegisterFunctionAttribute).FullName!); 244=> compilation.GetTypeByMetadataName(typeof(ComUnregisterFunctionAttribute).FullName!); 247=> compilation.GetTypeByMetadataName(typeof(ConditionalAttribute).FullName!); 250=> compilation.GetTypeByMetadataName(typeof(ObsoleteAttribute).FullName!); 253=> compilation.GetTypeByMetadataName("System.Composition.ImportingConstructorAttribute"); 256=> compilation.GetTypeByMetadataName("System.ComponentModel.Composition.ImportingConstructorAttribute"); 259=> compilation.GetTypeByMetadataName(typeof(IDisposable).FullName!); 262=> compilation.GetTypeByMetadataName(typeof(NotNullAttribute).FullName!); 265=> compilation.GetTypeByMetadataName(typeof(MaybeNullAttribute).FullName!); 268=> compilation.GetTypeByMetadataName(typeof(MaybeNullWhenAttribute).FullName!); 271=> compilation.GetTypeByMetadataName(typeof(AllowNullAttribute).FullName!); 274=> compilation.GetTypeByMetadataName(typeof(DisallowNullAttribute).FullName!); 277=> compilation.GetTypeByMetadataName(typeof(DataMemberAttribute).FullName!); 280=> compilation.GetTypeByMetadataName(typeof(DataContractAttribute).FullName!); 283=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"); 286=> compilation.GetTypeByMetadataName(typeof(CancellationToken).FullName!); 289=> compilation.GetTypeByMetadataName($"System.ValueTuple`{arity}"); 292=> compilation.GetTypeByMetadataName(typeof(List<>).FullName!); 295=> compilation.GetTypeByMetadataName(typeof(ReadOnlySpan<>).FullName!); 298=> compilation.GetTypeByMetadataName(typeof(Span<>).FullName!); 301=> compilation.GetTypeByMetadataName(typeof(InterpolatedStringHandlerAttribute).FullName!); 304=> compilation.GetTypeByMetadataName("System.DateOnly"); 307=> compilation.GetTypeByMetadataName("System.TimeOnly");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
506var delegateType = compilation.GetTypeByMetadataName(method.ReturnsVoid
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
25var exceptionType = compilation.GetTypeByMetadataName(exceptionMetadataName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
441var type = compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
243var iequatableType = compilation.GetTypeByMetadataName(typeof(IEquatable<>).FullName);
ILLink.RoslynAnalyzer (9)
CompilationExtensions.cs (3)
43var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName); 176=> compilation.GetTypeByMetadataName(typeof(Task).FullName!); 178=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
DataFlow\LocalDataFlowVisitor.cs (1)
179var assemblyType = Compilation.GetTypeByMetadataName("Microsoft.CSharp.RuntimeBinder.Binder");
RequiresAssemblyFilesAnalyzer.cs (3)
72var runtimeFeaturesType = compilation.GetTypeByMetadataName("ILLink.RoslynAnalyzer.TestFeatures"); 87var assemblyType = compilation.GetTypeByMetadataName("System.Reflection.Assembly"); 98var assemblyNameType = compilation.GetTypeByMetadataName("System.Reflection.AssemblyName");
RequiresDynamicCodeAnalyzer.cs (1)
168var runtimeFeaturesType = compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.RuntimeFeature");
RequiresUnreferencedCodeAnalyzer.cs (1)
62var runtimeFeaturesType = compilation.GetTypeByMetadataName("ILLink.RoslynAnalyzer.TestFeatures");
Microsoft.Analyzers.Extra (33)
AsyncCallInsideUsingBlockAnalyzer.cs (4)
28var taskType = compilationContext.Compilation.GetTypeByMetadataName("System.Threading.Tasks.Task"); 29var taskOfTType = compilationContext.Compilation.GetTypeByMetadataName("System.Threading.Tasks.Task`1"); 30var valueTaskType = compilationContext.Compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask"); 31var valueTaskOfTType = compilationContext.Compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask`1");
AsyncMethodWithoutCancellation.cs (8)
28var taskType = compilationContext.Compilation.GetTypeByMetadataName("System.Threading.Tasks.Task"); 29var taskOfTType = compilationContext.Compilation.GetTypeByMetadataName("System.Threading.Tasks.Task`1"); 30var valueTaskType = compilationContext.Compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask"); 31var valueTaskOfTType = compilationContext.Compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask`1"); 42var cancellationTokenType = compilationContext.Compilation.GetTypeByMetadataName("System.Threading.CancellationToken"); 43var httpContextType = compilationContext.Compilation.GetTypeByMetadataName("Microsoft.AspNetCore.Http.HttpContext"); 45compilationContext.Compilation.GetTypeByMetadataName("Microsoft.AspNetCore.Connections.ConnectionContext"); 47compilationContext.Compilation.GetTypeByMetadataName("System.ObsoleteAttribute");
CallAnalysis\Arrays.cs (3)
83var freezer = reg.Compilation.GetTypeByMetadataName("System.Collections.Frozen.FrozenDictionary"); 92freezer = reg.Compilation.GetTypeByMetadataName("System.Collections.Frozen.FrozenSet"); 114var flagsAttr = context.Compilation.GetTypeByMetadataName("System.FlagsAttribute");
CallAnalysis\CallAnalyzer.Registrar.cs (5)
70var type = Compilation.GetTypeByMetadataName(pair.Key); 113var type = Compilation.GetTypeByMetadataName(typeName); 148var type = Compilation.GetTypeByMetadataName(pair.Key); 204var type = Compilation.GetTypeByMetadataName(pair.Key); 225var type = Compilation.GetTypeByMetadataName(et);
CallAnalysis\Fixers\LegacyLoggingFixer.cs (4)
42internal Func<Compilation, string, INamedTypeSymbol?> GetTypeByMetadataName1 = (c, n) => c.GetTypeByMetadataName(n); 43internal Func<Compilation, string, INamedTypeSymbol?> GetTypeByMetadataName2 = (c, n) => c.GetTypeByMetadataName(n); 44internal Func<Compilation, string, INamedTypeSymbol?> GetTypeByMetadataName3 = (c, n) => c.GetTypeByMetadataName(n); 595gen.MemberAccessExpression(gen.TypeExpression(comp.GetTypeByMetadataName("Microsoft.Extensions.Logging.LogLevel")!), details.Level),
CallAnalysis\LegacyLogging.cs (1)
18var loggerExtensions = reg.Compilation.GetTypeByMetadataName("Microsoft.Extensions.Logging.LoggerExtensions");
CallAnalysis\Split.cs (1)
17var memExt = reg.Compilation.GetTypeByMetadataName("System.MemoryExtensions");
CallAnalysis\StartsEndsWith.cs (1)
20var stringCompType = reg.Compilation.GetTypeByMetadataName("System.StringComparison");
CallAnalysis\ValueTuple.cs (1)
29var type = reg.Compilation.GetTypeByMetadataName("System.Tuple");
ConditionalAccessAnalyzer.cs (1)
30var maybeNull = compilationStartContext.Compilation.GetTypeByMetadataName("System.Diagnostics.CodeAnalysis.MaybeNullAttribute");
MakeExeTypesInternalAnalyzer.cs (3)
62var type = compilationStartContext.Compilation.GetTypeByMetadataName(name); 72var type = compilationStartContext.Compilation.GetTypeByMetadataName(name); 82var type = compilationStartContext.Compilation.GetTypeByMetadataName(name);
Utilities\CompilationExtensions.cs (1)
12var type = compilation.GetTypeByMetadataName("System.Environment");
Microsoft.Analyzers.Local (9)
ApiLifecycle\ApiLifecycleAnalyzer.cs (2)
66var obsoleteAttribute = compilation.GetTypeByMetadataName(ObsoleteAttributeFullName); 148var obsoleteAttribute = context.Compilation.GetTypeByMetadataName(ObsoleteAttributeFullName);
CallAnalysis\CallAnalyzer.Registrar.cs (5)
70var type = Compilation.GetTypeByMetadataName(pair.Key); 113var type = Compilation.GetTypeByMetadataName(typeName); 148var type = Compilation.GetTypeByMetadataName(pair.Key); 204var type = Compilation.GetTypeByMetadataName(pair.Key); 225var type = Compilation.GetTypeByMetadataName(et);
CallAnalysis\ToInvariantString.cs (2)
26var formatProvider = reg.Compilation.GetTypeByMetadataName("System.IFormatProvider"); 46var cultureInfo = context.Compilation.GetTypeByMetadataName("System.Globalization.CultureInfo");
Microsoft.AspNetCore.Analyzers (3)
StartupSymbols.cs (3)
12IApplicationBuilder = compilation.GetTypeByMetadataName(SymbolNames.IApplicationBuilder.MetadataName); 13IServiceCollection = compilation.GetTypeByMetadataName(SymbolNames.IServiceCollection.MetadataName); 14MvcOptions = compilation.GetTypeByMetadataName(SymbolNames.MvcOptions.MetadataName);
Microsoft.AspNetCore.App.Analyzers (3)
src\aspnetcore\src\Shared\RoslynUtils\SymbolExtensions.cs (1)
199=> SymbolEqualityComparer.Default.Equals(type, semanticModel.Compilation.GetTypeByMetadataName(typeName));
src\aspnetcore\src\Shared\RoslynUtils\WellKnownTypes.cs (2)
55_missingTypeSymbol = compilation.GetTypeByMetadataName(typeof(MissingType).FullName!)!; 108result ??= _compilation.GetTypeByMetadataName(typeof(MissingType).FullName!)!;
Microsoft.AspNetCore.Components.Analyzers (17)
ComponentSymbols.cs (7)
18var parameterAttribute = compilation.GetTypeByMetadataName(ComponentsApi.ParameterAttribute.MetadataName); 25var cascadingParameterAttribute = compilation.GetTypeByMetadataName(ComponentsApi.CascadingParameterAttribute.MetadataName); 32var icomponentType = compilation.GetTypeByMetadataName(ComponentsApi.IComponent.MetadataName); 39var dictionary = compilation.GetTypeByMetadataName("System.Collections.Generic.Dictionary`2"); 51var supplyParameterFromFormAttribute = compilation.GetTypeByMetadataName(ComponentsApi.SupplyParameterFromFormAttribute.MetadataName); 52var persistentStateAttribute = compilation.GetTypeByMetadataName(ComponentsApi.PersistentStateAttribute.MetadataName); 53var componentBaseType = compilation.GetTypeByMetadataName(ComponentsApi.ComponentBase.MetadataName);
InvokeAsyncOfObjectAnalyzer.cs (8)
35var ijsRuntimeType = compilationContext.Compilation.GetTypeByMetadataName("Microsoft.JSInterop.IJSRuntime"); 36var ijsObjectReferenceType = compilationContext.Compilation.GetTypeByMetadataName("Microsoft.JSInterop.IJSObjectReference"); 37var ijsInProcessRuntimeType = compilationContext.Compilation.GetTypeByMetadataName("Microsoft.JSInterop.IJSInProcessRuntime"); 38var ijsInProcessObjectReferenceType = compilationContext.Compilation.GetTypeByMetadataName("Microsoft.JSInterop.IJSInProcessObjectReference"); 39var jsRuntimeExtensionsType = compilationContext.Compilation.GetTypeByMetadataName(JSRuntimeExtensionsTypeName); 40var jsObjectReferenceExtensionsType = compilationContext.Compilation.GetTypeByMetadataName(JSObjectReferenceExtensionsTypeName); 41var jsInProcessRuntimeExtensionsType = compilationContext.Compilation.GetTypeByMetadataName(JSInProcessRuntimeExtensionsTypeName); 42var jsInProcessObjectReferenceExtensionsType = compilationContext.Compilation.GetTypeByMetadataName(JSInProcessObjectReferenceExtensionsTypeName);
VirtualizeItemComparerAnalyzer.cs (2)
33var virtualizeType = compilationContext.Compilation.GetTypeByMetadataName(VirtualizeTypeName); 34var renderTreeBuilderType = compilationContext.Compilation.GetTypeByMetadataName(RenderTreeBuilderTypeName);
Microsoft.AspNetCore.Components.SdkAnalyzers (4)
ComponentSymbols.cs (4)
18var parameterAttribute = compilation.GetTypeByMetadataName(ComponentsApi.ParameterAttribute.MetadataName); 25var cascadingParameterAttribute = compilation.GetTypeByMetadataName(ComponentsApi.CascadingParameterAttribute.MetadataName); 32var icomponentType = compilation.GetTypeByMetadataName(ComponentsApi.IComponent.MetadataName); 39var dictionary = compilation.GetTypeByMetadataName("System.Collections.Generic.Dictionary`2");
Microsoft.AspNetCore.Mvc.Analyzers (8)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (5)
147PageModelAttribute = compilation.GetTypeByMetadataName(SymbolNames.PageModelAttributeType); 148IFilterMetadata = compilation.GetTypeByMetadataName(SymbolNames.IFilterMetadataType); 149AuthorizeAttribute = compilation.GetTypeByMetadataName(SymbolNames.AuthorizeAttribute); 150AllowAnonymousAttribute = compilation.GetTypeByMetadataName(SymbolNames.AllowAnonymousAttribute); 151IRouteTemplateProvider = compilation.GetTypeByMetadataName(SymbolNames.IRouteTemplateProvider);
TagHelpersInCodeBlocksAnalyzer.cs (1)
174typeSymbol = compilation.GetTypeByMetadataName(typeName);
TopLevelParameterNameAnalyzer.cs (1)
300typeSymbol = compilation.GetTypeByMetadataName(typeName);
ViewFeaturesAnalyzerContext.cs (1)
26private INamedTypeSymbol GetType(string name) => Context.Compilation.GetTypeByMetadataName(name);
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
AddResponseTypeAttributeCodeFixAction.cs (1)
135var statusCodesType = semanticModel.Compilation.GetTypeByMetadataName(ApiSymbolNames.HttpStatusCodes);
ApiControllerSymbolCache.cs (2)
90var statusCodeActionResult = compilation.GetTypeByMetadataName(ApiSymbolNames.IStatusCodeActionResult); 128typeSymbol = compilation.GetTypeByMetadataName(typeName);
Microsoft.CodeAnalysis (3)
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
426_lazyGeneratedCodeAttribute = analyzerExecutor.Compilation?.GetTypeByMetadataName("System.CodeDom.Compiler.GeneratedCodeAttribute");
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (2)
262new StrongBox<ISymbol?>(_compilation.GetTypeByMetadataName("System.Diagnostics.CodeAnalysis.SuppressMessageAttribute")), 278new StrongBox<ISymbol?>(_compilation.GetTypeByMetadataName("System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute")),
Microsoft.CodeAnalysis.Analyzers (81)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (77)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!); 82=> compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!); 85=> compilation.GetTypeByMetadataName(typeof(ArgumentOutOfRangeException).FullName!); 88=> compilation.GetTypeByMetadataName(typeof(Array).FullName!); 91=> compilation.GetTypeByMetadataName(typeof(Attribute).FullName!); 94=> compilation.GetTypeByMetadataName(typeof(BlockingCollection<>).FullName!); 97=> compilation.GetTypeByMetadataName(typeof(Collection<>).FullName!); 100=> compilation.GetTypeByMetadataName(typeof(Exception).FullName!); 103=> compilation.GetTypeByMetadataName(typeof(System.Diagnostics.DebuggerDisplayAttribute).FullName!); 106=> compilation.GetTypeByMetadataName(typeof(StructLayoutAttribute).FullName!); 109=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.InlineArrayAttribute"); 112=> compilation.GetTypeByMetadataName("System.ComponentModel.DesignerCategoryAttribute"); 115=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute"); 118=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.HideModuleNameAttribute"); 121=> compilation.GetTypeByMetadataName(typeof(ThreadStaticAttribute).FullName!); 124=> compilation.GetTypeByMetadataName(typeof(FormattableString).FullName!); 127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!); 130=> compilation.GetTypeByMetadataName(typeof(EventArgs).FullName!); 133=> compilation.GetTypeByMetadataName(typeof(NotImplementedException).FullName!); 136=> compilation.GetTypeByMetadataName(typeof(EqualityComparer<>).FullName!); 139=> compilation.GetTypeByMetadataName(typeof(Action).FullName!); 142=> compilation.GetTypeByMetadataName("System.Linq.Expressions.Expression`1"); 145=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableAttribute).FullName!); 148=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableState).FullName!); 151=> compilation.GetTypeByMetadataName(typeof(Task).FullName!); 154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!); 157=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask"); 160=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask`1"); 163=> compilation.GetTypeByMetadataName(typeof(ICollection<>).FullName!); 166=> compilation.GetTypeByMetadataName(typeof(System.Collections.IEnumerable).FullName!); 169=> compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!); 172=> compilation.GetTypeByMetadataName(typeof(IEnumerator<>).FullName!); 175=> compilation.GetTypeByMetadataName(typeof(IList<>).FullName!); 178=> compilation.GetTypeByMetadataName(typeof(IReadOnlyList<>).FullName!); 181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!); 184=> compilation.GetTypeByMetadataName(typeof(IReadOnlySet<>).FullName!); 187=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerable`1"); 190=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerator`1"); 193=> compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!); 196=> compilation.GetTypeByMetadataName(typeof(SerializableAttribute).FullName!); 199=> compilation.GetTypeByMetadataName(typeof(CoClassAttribute).FullName!); 202=> compilation.GetTypeByMetadataName(typeof(ComAliasNameAttribute).FullName!); 205=> compilation.GetTypeByMetadataName(typeof(SuppressMessageAttribute).FullName!); 208=> compilation.GetTypeByMetadataName(typeof(TupleElementNamesAttribute).FullName!); 211=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.NativeIntegerAttribute"); 214=> compilation.GetTypeByMetadataName(typeof(DynamicAttribute).FullName!); 217=> compilation.GetTypeByMetadataName(typeof(Lazy<>).FullName!); 220=> compilation.GetTypeByMetadataName(typeof(ISerializable).FullName!); 223=> compilation.GetTypeByMetadataName(typeof(SerializationInfo).FullName!); 226=> compilation.GetTypeByMetadataName(typeof(StreamingContext).FullName!); 229=> compilation.GetTypeByMetadataName(typeof(OnDeserializingAttribute).FullName!); 232=> compilation.GetTypeByMetadataName(typeof(OnDeserializedAttribute).FullName!); 235=> compilation.GetTypeByMetadataName(typeof(OnSerializingAttribute).FullName!); 238=> compilation.GetTypeByMetadataName(typeof(OnSerializedAttribute).FullName!); 241=> compilation.GetTypeByMetadataName(typeof(ComRegisterFunctionAttribute).FullName!); 244=> compilation.GetTypeByMetadataName(typeof(ComUnregisterFunctionAttribute).FullName!); 247=> compilation.GetTypeByMetadataName(typeof(ConditionalAttribute).FullName!); 250=> compilation.GetTypeByMetadataName(typeof(ObsoleteAttribute).FullName!); 253=> compilation.GetTypeByMetadataName("System.Composition.ImportingConstructorAttribute"); 256=> compilation.GetTypeByMetadataName("System.ComponentModel.Composition.ImportingConstructorAttribute"); 259=> compilation.GetTypeByMetadataName(typeof(IDisposable).FullName!); 262=> compilation.GetTypeByMetadataName(typeof(NotNullAttribute).FullName!); 265=> compilation.GetTypeByMetadataName(typeof(MaybeNullAttribute).FullName!); 268=> compilation.GetTypeByMetadataName(typeof(MaybeNullWhenAttribute).FullName!); 271=> compilation.GetTypeByMetadataName(typeof(AllowNullAttribute).FullName!); 274=> compilation.GetTypeByMetadataName(typeof(DisallowNullAttribute).FullName!); 277=> compilation.GetTypeByMetadataName(typeof(DataMemberAttribute).FullName!); 280=> compilation.GetTypeByMetadataName(typeof(DataContractAttribute).FullName!); 283=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"); 286=> compilation.GetTypeByMetadataName(typeof(CancellationToken).FullName!); 289=> compilation.GetTypeByMetadataName($"System.ValueTuple`{arity}"); 292=> compilation.GetTypeByMetadataName(typeof(List<>).FullName!); 295=> compilation.GetTypeByMetadataName(typeof(ReadOnlySpan<>).FullName!); 298=> compilation.GetTypeByMetadataName(typeof(Span<>).FullName!); 301=> compilation.GetTypeByMetadataName(typeof(InterpolatedStringHandlerAttribute).FullName!); 304=> compilation.GetTypeByMetadataName("System.DateOnly"); 307=> compilation.GetTypeByMetadataName("System.TimeOnly");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
506var delegateType = compilation.GetTypeByMetadataName(method.ReturnsVoid
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
25var exceptionType = compilation.GetTypeByMetadataName(exceptionMetadataName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
441var type = compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
243var iequatableType = compilation.GetTypeByMetadataName(typeof(IEquatable<>).FullName);
Microsoft.CodeAnalysis.AnalyzerUtilities (78)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (77)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!); 82=> compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!); 85=> compilation.GetTypeByMetadataName(typeof(ArgumentOutOfRangeException).FullName!); 88=> compilation.GetTypeByMetadataName(typeof(Array).FullName!); 91=> compilation.GetTypeByMetadataName(typeof(Attribute).FullName!); 94=> compilation.GetTypeByMetadataName(typeof(BlockingCollection<>).FullName!); 97=> compilation.GetTypeByMetadataName(typeof(Collection<>).FullName!); 100=> compilation.GetTypeByMetadataName(typeof(Exception).FullName!); 103=> compilation.GetTypeByMetadataName(typeof(System.Diagnostics.DebuggerDisplayAttribute).FullName!); 106=> compilation.GetTypeByMetadataName(typeof(StructLayoutAttribute).FullName!); 109=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.InlineArrayAttribute"); 112=> compilation.GetTypeByMetadataName("System.ComponentModel.DesignerCategoryAttribute"); 115=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute"); 118=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.HideModuleNameAttribute"); 121=> compilation.GetTypeByMetadataName(typeof(ThreadStaticAttribute).FullName!); 124=> compilation.GetTypeByMetadataName(typeof(FormattableString).FullName!); 127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!); 130=> compilation.GetTypeByMetadataName(typeof(EventArgs).FullName!); 133=> compilation.GetTypeByMetadataName(typeof(NotImplementedException).FullName!); 136=> compilation.GetTypeByMetadataName(typeof(EqualityComparer<>).FullName!); 139=> compilation.GetTypeByMetadataName(typeof(Action).FullName!); 142=> compilation.GetTypeByMetadataName("System.Linq.Expressions.Expression`1"); 145=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableAttribute).FullName!); 148=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableState).FullName!); 151=> compilation.GetTypeByMetadataName(typeof(Task).FullName!); 154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!); 157=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask"); 160=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask`1"); 163=> compilation.GetTypeByMetadataName(typeof(ICollection<>).FullName!); 166=> compilation.GetTypeByMetadataName(typeof(System.Collections.IEnumerable).FullName!); 169=> compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!); 172=> compilation.GetTypeByMetadataName(typeof(IEnumerator<>).FullName!); 175=> compilation.GetTypeByMetadataName(typeof(IList<>).FullName!); 178=> compilation.GetTypeByMetadataName(typeof(IReadOnlyList<>).FullName!); 181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!); 184=> compilation.GetTypeByMetadataName(typeof(IReadOnlySet<>).FullName!); 187=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerable`1"); 190=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerator`1"); 193=> compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!); 196=> compilation.GetTypeByMetadataName(typeof(SerializableAttribute).FullName!); 199=> compilation.GetTypeByMetadataName(typeof(CoClassAttribute).FullName!); 202=> compilation.GetTypeByMetadataName(typeof(ComAliasNameAttribute).FullName!); 205=> compilation.GetTypeByMetadataName(typeof(SuppressMessageAttribute).FullName!); 208=> compilation.GetTypeByMetadataName(typeof(TupleElementNamesAttribute).FullName!); 211=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.NativeIntegerAttribute"); 214=> compilation.GetTypeByMetadataName(typeof(DynamicAttribute).FullName!); 217=> compilation.GetTypeByMetadataName(typeof(Lazy<>).FullName!); 220=> compilation.GetTypeByMetadataName(typeof(ISerializable).FullName!); 223=> compilation.GetTypeByMetadataName(typeof(SerializationInfo).FullName!); 226=> compilation.GetTypeByMetadataName(typeof(StreamingContext).FullName!); 229=> compilation.GetTypeByMetadataName(typeof(OnDeserializingAttribute).FullName!); 232=> compilation.GetTypeByMetadataName(typeof(OnDeserializedAttribute).FullName!); 235=> compilation.GetTypeByMetadataName(typeof(OnSerializingAttribute).FullName!); 238=> compilation.GetTypeByMetadataName(typeof(OnSerializedAttribute).FullName!); 241=> compilation.GetTypeByMetadataName(typeof(ComRegisterFunctionAttribute).FullName!); 244=> compilation.GetTypeByMetadataName(typeof(ComUnregisterFunctionAttribute).FullName!); 247=> compilation.GetTypeByMetadataName(typeof(ConditionalAttribute).FullName!); 250=> compilation.GetTypeByMetadataName(typeof(ObsoleteAttribute).FullName!); 253=> compilation.GetTypeByMetadataName("System.Composition.ImportingConstructorAttribute"); 256=> compilation.GetTypeByMetadataName("System.ComponentModel.Composition.ImportingConstructorAttribute"); 259=> compilation.GetTypeByMetadataName(typeof(IDisposable).FullName!); 262=> compilation.GetTypeByMetadataName(typeof(NotNullAttribute).FullName!); 265=> compilation.GetTypeByMetadataName(typeof(MaybeNullAttribute).FullName!); 268=> compilation.GetTypeByMetadataName(typeof(MaybeNullWhenAttribute).FullName!); 271=> compilation.GetTypeByMetadataName(typeof(AllowNullAttribute).FullName!); 274=> compilation.GetTypeByMetadataName(typeof(DisallowNullAttribute).FullName!); 277=> compilation.GetTypeByMetadataName(typeof(DataMemberAttribute).FullName!); 280=> compilation.GetTypeByMetadataName(typeof(DataContractAttribute).FullName!); 283=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"); 286=> compilation.GetTypeByMetadataName(typeof(CancellationToken).FullName!); 289=> compilation.GetTypeByMetadataName($"System.ValueTuple`{arity}"); 292=> compilation.GetTypeByMetadataName(typeof(List<>).FullName!); 295=> compilation.GetTypeByMetadataName(typeof(ReadOnlySpan<>).FullName!); 298=> compilation.GetTypeByMetadataName(typeof(Span<>).FullName!); 301=> compilation.GetTypeByMetadataName(typeof(InterpolatedStringHandlerAttribute).FullName!); 304=> compilation.GetTypeByMetadataName("System.DateOnly"); 307=> compilation.GetTypeByMetadataName("System.TimeOnly");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
506var delegateType = compilation.GetTypeByMetadataName(method.ReturnsVoid
Microsoft.CodeAnalysis.CodeStyle (83)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
54var iCustomMarshaler = context.Compilation.GetTypeByMetadataName(typeof(ICustomMarshaler).FullName!);
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
248=> semanticModel.Compilation.GetTypeByMetadataName(typeof(T).FullName!);
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
75enumerableType = compilation.GetTypeByMetadataName(typeof(Enumerable)?.FullName!);
src\roslyn\src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
109var nullableType = semanticModel.Compilation.GetTypeByMetadataName(typeof(Nullable<>).FullName!);
src\roslyn\src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
73var formatProviderType = startContext.Compilation.GetTypeByMetadataName(typeof(System.IFormatProvider).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (77)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!); 82=> compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!); 85=> compilation.GetTypeByMetadataName(typeof(ArgumentOutOfRangeException).FullName!); 88=> compilation.GetTypeByMetadataName(typeof(Array).FullName!); 91=> compilation.GetTypeByMetadataName(typeof(Attribute).FullName!); 94=> compilation.GetTypeByMetadataName(typeof(BlockingCollection<>).FullName!); 97=> compilation.GetTypeByMetadataName(typeof(Collection<>).FullName!); 100=> compilation.GetTypeByMetadataName(typeof(Exception).FullName!); 103=> compilation.GetTypeByMetadataName(typeof(System.Diagnostics.DebuggerDisplayAttribute).FullName!); 106=> compilation.GetTypeByMetadataName(typeof(StructLayoutAttribute).FullName!); 109=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.InlineArrayAttribute"); 112=> compilation.GetTypeByMetadataName("System.ComponentModel.DesignerCategoryAttribute"); 115=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute"); 118=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.HideModuleNameAttribute"); 121=> compilation.GetTypeByMetadataName(typeof(ThreadStaticAttribute).FullName!); 124=> compilation.GetTypeByMetadataName(typeof(FormattableString).FullName!); 127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!); 130=> compilation.GetTypeByMetadataName(typeof(EventArgs).FullName!); 133=> compilation.GetTypeByMetadataName(typeof(NotImplementedException).FullName!); 136=> compilation.GetTypeByMetadataName(typeof(EqualityComparer<>).FullName!); 139=> compilation.GetTypeByMetadataName(typeof(Action).FullName!); 142=> compilation.GetTypeByMetadataName("System.Linq.Expressions.Expression`1"); 145=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableAttribute).FullName!); 148=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableState).FullName!); 151=> compilation.GetTypeByMetadataName(typeof(Task).FullName!); 154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!); 157=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask"); 160=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask`1"); 163=> compilation.GetTypeByMetadataName(typeof(ICollection<>).FullName!); 166=> compilation.GetTypeByMetadataName(typeof(System.Collections.IEnumerable).FullName!); 169=> compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!); 172=> compilation.GetTypeByMetadataName(typeof(IEnumerator<>).FullName!); 175=> compilation.GetTypeByMetadataName(typeof(IList<>).FullName!); 178=> compilation.GetTypeByMetadataName(typeof(IReadOnlyList<>).FullName!); 181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!); 184=> compilation.GetTypeByMetadataName(typeof(IReadOnlySet<>).FullName!); 187=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerable`1"); 190=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerator`1"); 193=> compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!); 196=> compilation.GetTypeByMetadataName(typeof(SerializableAttribute).FullName!); 199=> compilation.GetTypeByMetadataName(typeof(CoClassAttribute).FullName!); 202=> compilation.GetTypeByMetadataName(typeof(ComAliasNameAttribute).FullName!); 205=> compilation.GetTypeByMetadataName(typeof(SuppressMessageAttribute).FullName!); 208=> compilation.GetTypeByMetadataName(typeof(TupleElementNamesAttribute).FullName!); 211=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.NativeIntegerAttribute"); 214=> compilation.GetTypeByMetadataName(typeof(DynamicAttribute).FullName!); 217=> compilation.GetTypeByMetadataName(typeof(Lazy<>).FullName!); 220=> compilation.GetTypeByMetadataName(typeof(ISerializable).FullName!); 223=> compilation.GetTypeByMetadataName(typeof(SerializationInfo).FullName!); 226=> compilation.GetTypeByMetadataName(typeof(StreamingContext).FullName!); 229=> compilation.GetTypeByMetadataName(typeof(OnDeserializingAttribute).FullName!); 232=> compilation.GetTypeByMetadataName(typeof(OnDeserializedAttribute).FullName!); 235=> compilation.GetTypeByMetadataName(typeof(OnSerializingAttribute).FullName!); 238=> compilation.GetTypeByMetadataName(typeof(OnSerializedAttribute).FullName!); 241=> compilation.GetTypeByMetadataName(typeof(ComRegisterFunctionAttribute).FullName!); 244=> compilation.GetTypeByMetadataName(typeof(ComUnregisterFunctionAttribute).FullName!); 247=> compilation.GetTypeByMetadataName(typeof(ConditionalAttribute).FullName!); 250=> compilation.GetTypeByMetadataName(typeof(ObsoleteAttribute).FullName!); 253=> compilation.GetTypeByMetadataName("System.Composition.ImportingConstructorAttribute"); 256=> compilation.GetTypeByMetadataName("System.ComponentModel.Composition.ImportingConstructorAttribute"); 259=> compilation.GetTypeByMetadataName(typeof(IDisposable).FullName!); 262=> compilation.GetTypeByMetadataName(typeof(NotNullAttribute).FullName!); 265=> compilation.GetTypeByMetadataName(typeof(MaybeNullAttribute).FullName!); 268=> compilation.GetTypeByMetadataName(typeof(MaybeNullWhenAttribute).FullName!); 271=> compilation.GetTypeByMetadataName(typeof(AllowNullAttribute).FullName!); 274=> compilation.GetTypeByMetadataName(typeof(DisallowNullAttribute).FullName!); 277=> compilation.GetTypeByMetadataName(typeof(DataMemberAttribute).FullName!); 280=> compilation.GetTypeByMetadataName(typeof(DataContractAttribute).FullName!); 283=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"); 286=> compilation.GetTypeByMetadataName(typeof(CancellationToken).FullName!); 289=> compilation.GetTypeByMetadataName($"System.ValueTuple`{arity}"); 292=> compilation.GetTypeByMetadataName(typeof(List<>).FullName!); 295=> compilation.GetTypeByMetadataName(typeof(ReadOnlySpan<>).FullName!); 298=> compilation.GetTypeByMetadataName(typeof(Span<>).FullName!); 301=> compilation.GetTypeByMetadataName(typeof(InterpolatedStringHandlerAttribute).FullName!); 304=> compilation.GetTypeByMetadataName("System.DateOnly"); 307=> compilation.GetTypeByMetadataName("System.TimeOnly");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
506var delegateType = compilation.GetTypeByMetadataName(method.ReturnsVoid
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\roslyn\src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
60var attribute = compilation.GetTypeByMetadataName(typeof(ObsoleteAttribute).FullName!);
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
202var gcType = compilation.GetTypeByMetadataName(typeof(GC).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
25var exceptionType = compilation.GetTypeByMetadataName(exceptionMetadataName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
441var type = compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
243var iequatableType = compilation.GetTypeByMetadataName(typeof(IEquatable<>).FullName);
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\roslyn\src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
50var expressionType = compilation.GetTypeByMetadataName(typeof(Expression<>).FullName!);
src\roslyn\src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (1)
31var enumerableType = context.Compilation.GetTypeByMetadataName(typeof(Enumerable).FullName!);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
64var expressionType = compilation.GetTypeByMetadataName(typeof(Expression<>).FullName!);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
54var expressionType = context.Compilation.GetTypeByMetadataName(typeof(System.Linq.Expressions.Expression<>).FullName!);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
src\roslyn\src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (6)
119var ienumerableSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerable).FullName!); 120var ienumeratorSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerator).FullName!); 121var ienumerableGenericSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!); 122var ienumeratorGenericSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerator<>).FullName!); 192var ienumerableSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerable).FullName!); 193var ienumeratorSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerator).FullName!);
src\roslyn\src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (2)
115ienumerableSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerable).FullName!); 116ienumerableGenericSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!);
src\roslyn\src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
92else if (type.Equals(semanticModel.Compilation.GetTypeByMetadataName(typeof(CancellationToken).FullName!))) 123var flagsAttribute = compilation.GetTypeByMetadataName(typeof(FlagsAttribute).FullName!);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
102var taskType = semanticModel.Compilation.GetTypeByMetadataName(typeof(Task).FullName!);
Microsoft.CodeAnalysis.CSharp.Features (18)
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
371=> Equals(typeSymbol.OriginalDefinition, _semanticModel.Compilation.GetTypeByMetadataName(typeof(List<>).FullName));
ConvertToInterpolatedString\CSharpConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
21=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.DefaultInterpolatedStringHandler") != null;
Copilot\CSharpImplementNotImplementedExceptionDiagnosticAnalyzer.cs (1)
30var notImplementedExceptionType = context.Compilation.GetTypeByMetadataName(typeof(NotImplementedException).FullName!);
src\roslyn\src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
50var expressionType = compilation.GetTypeByMetadataName(typeof(Expression<>).FullName!);
src\roslyn\src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (1)
31var enumerableType = context.Compilation.GetTypeByMetadataName(typeof(Enumerable).FullName!);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
64var expressionType = compilation.GetTypeByMetadataName(typeof(Expression<>).FullName!);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
54var expressionType = context.Compilation.GetTypeByMetadataName(typeof(System.Linq.Expressions.Expression<>).FullName!);
src\roslyn\src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (6)
119var ienumerableSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerable).FullName!); 120var ienumeratorSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerator).FullName!); 121var ienumerableGenericSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!); 122var ienumeratorGenericSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerator<>).FullName!); 192var ienumerableSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerable).FullName!); 193var ienumeratorSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerator).FullName!);
src\roslyn\src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (2)
115ienumerableSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerable).FullName!); 116ienumerableGenericSymbol = model.Compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!);
src\roslyn\src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
92else if (type.Equals(semanticModel.Compilation.GetTypeByMetadataName(typeof(CancellationToken).FullName!))) 123var flagsAttribute = compilation.GetTypeByMetadataName(typeof(FlagsAttribute).FullName!);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
102var taskType = semanticModel.Compilation.GetTypeByMetadataName(typeof(Task).FullName!);
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\Performance\CSharpCollapseMultiplePathOperations.Fixer.cs (1)
34semanticModel.Compilation.GetTypeByMetadataName(WellKnownTypeNames.SystemIOPath) is not { } pathType)
Microsoft.NetCore.Analyzers\Runtime\CSharpAvoidRedundantRegexIsMatchBeforeMatch.Fixer.cs (1)
332var matchType = model.Compilation.GetTypeByMetadataName("System.Text.RegularExpressions.Match");
Microsoft.CodeAnalysis.Extensions.Package (78)
Compilation\CompilationExtensions.cs (77)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!); 82=> compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!); 85=> compilation.GetTypeByMetadataName(typeof(ArgumentOutOfRangeException).FullName!); 88=> compilation.GetTypeByMetadataName(typeof(Array).FullName!); 91=> compilation.GetTypeByMetadataName(typeof(Attribute).FullName!); 94=> compilation.GetTypeByMetadataName(typeof(BlockingCollection<>).FullName!); 97=> compilation.GetTypeByMetadataName(typeof(Collection<>).FullName!); 100=> compilation.GetTypeByMetadataName(typeof(Exception).FullName!); 103=> compilation.GetTypeByMetadataName(typeof(System.Diagnostics.DebuggerDisplayAttribute).FullName!); 106=> compilation.GetTypeByMetadataName(typeof(StructLayoutAttribute).FullName!); 109=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.InlineArrayAttribute"); 112=> compilation.GetTypeByMetadataName("System.ComponentModel.DesignerCategoryAttribute"); 115=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute"); 118=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.HideModuleNameAttribute"); 121=> compilation.GetTypeByMetadataName(typeof(ThreadStaticAttribute).FullName!); 124=> compilation.GetTypeByMetadataName(typeof(FormattableString).FullName!); 127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!); 130=> compilation.GetTypeByMetadataName(typeof(EventArgs).FullName!); 133=> compilation.GetTypeByMetadataName(typeof(NotImplementedException).FullName!); 136=> compilation.GetTypeByMetadataName(typeof(EqualityComparer<>).FullName!); 139=> compilation.GetTypeByMetadataName(typeof(Action).FullName!); 142=> compilation.GetTypeByMetadataName("System.Linq.Expressions.Expression`1"); 145=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableAttribute).FullName!); 148=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableState).FullName!); 151=> compilation.GetTypeByMetadataName(typeof(Task).FullName!); 154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!); 157=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask"); 160=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask`1"); 163=> compilation.GetTypeByMetadataName(typeof(ICollection<>).FullName!); 166=> compilation.GetTypeByMetadataName(typeof(System.Collections.IEnumerable).FullName!); 169=> compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!); 172=> compilation.GetTypeByMetadataName(typeof(IEnumerator<>).FullName!); 175=> compilation.GetTypeByMetadataName(typeof(IList<>).FullName!); 178=> compilation.GetTypeByMetadataName(typeof(IReadOnlyList<>).FullName!); 181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!); 184=> compilation.GetTypeByMetadataName(typeof(IReadOnlySet<>).FullName!); 187=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerable`1"); 190=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerator`1"); 193=> compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!); 196=> compilation.GetTypeByMetadataName(typeof(SerializableAttribute).FullName!); 199=> compilation.GetTypeByMetadataName(typeof(CoClassAttribute).FullName!); 202=> compilation.GetTypeByMetadataName(typeof(ComAliasNameAttribute).FullName!); 205=> compilation.GetTypeByMetadataName(typeof(SuppressMessageAttribute).FullName!); 208=> compilation.GetTypeByMetadataName(typeof(TupleElementNamesAttribute).FullName!); 211=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.NativeIntegerAttribute"); 214=> compilation.GetTypeByMetadataName(typeof(DynamicAttribute).FullName!); 217=> compilation.GetTypeByMetadataName(typeof(Lazy<>).FullName!); 220=> compilation.GetTypeByMetadataName(typeof(ISerializable).FullName!); 223=> compilation.GetTypeByMetadataName(typeof(SerializationInfo).FullName!); 226=> compilation.GetTypeByMetadataName(typeof(StreamingContext).FullName!); 229=> compilation.GetTypeByMetadataName(typeof(OnDeserializingAttribute).FullName!); 232=> compilation.GetTypeByMetadataName(typeof(OnDeserializedAttribute).FullName!); 235=> compilation.GetTypeByMetadataName(typeof(OnSerializingAttribute).FullName!); 238=> compilation.GetTypeByMetadataName(typeof(OnSerializedAttribute).FullName!); 241=> compilation.GetTypeByMetadataName(typeof(ComRegisterFunctionAttribute).FullName!); 244=> compilation.GetTypeByMetadataName(typeof(ComUnregisterFunctionAttribute).FullName!); 247=> compilation.GetTypeByMetadataName(typeof(ConditionalAttribute).FullName!); 250=> compilation.GetTypeByMetadataName(typeof(ObsoleteAttribute).FullName!); 253=> compilation.GetTypeByMetadataName("System.Composition.ImportingConstructorAttribute"); 256=> compilation.GetTypeByMetadataName("System.ComponentModel.Composition.ImportingConstructorAttribute"); 259=> compilation.GetTypeByMetadataName(typeof(IDisposable).FullName!); 262=> compilation.GetTypeByMetadataName(typeof(NotNullAttribute).FullName!); 265=> compilation.GetTypeByMetadataName(typeof(MaybeNullAttribute).FullName!); 268=> compilation.GetTypeByMetadataName(typeof(MaybeNullWhenAttribute).FullName!); 271=> compilation.GetTypeByMetadataName(typeof(AllowNullAttribute).FullName!); 274=> compilation.GetTypeByMetadataName(typeof(DisallowNullAttribute).FullName!); 277=> compilation.GetTypeByMetadataName(typeof(DataMemberAttribute).FullName!); 280=> compilation.GetTypeByMetadataName(typeof(DataContractAttribute).FullName!); 283=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"); 286=> compilation.GetTypeByMetadataName(typeof(CancellationToken).FullName!); 289=> compilation.GetTypeByMetadataName($"System.ValueTuple`{arity}"); 292=> compilation.GetTypeByMetadataName(typeof(List<>).FullName!); 295=> compilation.GetTypeByMetadataName(typeof(ReadOnlySpan<>).FullName!); 298=> compilation.GetTypeByMetadataName(typeof(Span<>).FullName!); 301=> compilation.GetTypeByMetadataName(typeof(InterpolatedStringHandlerAttribute).FullName!); 304=> compilation.GetTypeByMetadataName("System.DateOnly"); 307=> compilation.GetTypeByMetadataName("System.TimeOnly");
Symbols\ISymbolExtensions.cs (1)
506var delegateType = compilation.GetTypeByMetadataName(method.ReturnsVoid
Microsoft.CodeAnalysis.Features (33)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (2)
47var debuggerAttributeTypeSymbol = compilation.GetTypeByMetadataName("System.Diagnostics.DebuggerDisplayAttribute"); 111.Contains(compilation.GetTypeByMetadataName("System.Diagnostics.DebuggerDisplayAttribute"));
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (1)
129var internalsVisibleToAttributeSymbol = semanticModel.Compilation.GetTypeByMetadataName(typeof(InternalsVisibleToAttribute).FullName!);
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (2)
231return (compilation.GetTypeByMetadataName(fullyQualifiedName + aritySuffix), 0); 234return (compilation.GetTypeByMetadataName(fullyQualifiedName), 0);
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (2)
254if (collectionType.OriginalDefinition.Equals(model.Compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!))) 273model.Compilation.GetTypeByMetadataName).Where(t => !IsNullOrErrorType(t));
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
344var wellKnownType = compilation.GetTypeByMetadataName($"{wellKnownNamespace}.{errorType.Name}");
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (3)
5452var layoutAttribute = model.Compilation.GetTypeByMetadataName(typeof(StructLayoutAttribute).FullName!); 6801if (oldCompilation.GetTypeByMetadataName(stateMachineAttributeQualifiedName) == null) 7158=> method.Parameters is [var parameter] && SymbolEqualityComparer.Default.Equals(parameter.Type, compilation.GetTypeByMetadataName(typeof(StringBuilder).FullName!));
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (2)
161_dateTimeType ??= _compilation.GetTypeByMetadataName(typeof(DateTime).FullName!); 162_dateTimeOffsetType ??= _compilation.GetTypeByMetadataName(typeof(DateTimeOffset).FullName!);
EmbeddedLanguages\Json\LanguageServices\JsonLanguageDetector.cs (1)
34var types = s_typeNamesOfInterest.Select(compilation.GetTypeByMetadataName).WhereNotNull().ToSet();
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexLanguageDetector.cs (1)
37var regexType = compilation.GetTypeByMetadataName(typeof(Regex).FullName!);
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
61var comparableType = compilation.GetTypeByMetadataName(typeof(IComparable<>).FullName!);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (1)
235if (argumentNullExceptionType is null || semanticModel.Compilation.GetTypeByMetadataName(argumentNullExceptionType) is null)
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (2)
151var hashCodeType = compilation.GetTypeByMetadataName("System.HashCode"); 182var valueTupleType = compilation.GetTypeByMetadataName(typeof(ValueTuple).FullName!);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (1)
102var equatableType = semanticModel.Compilation.GetTypeByMetadataName(typeof(IEquatable<>).FullName!);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
142var equatableTypeOpt = semanticModel.Compilation.GetTypeByMetadataName(typeof(IEquatable<>).FullName!);
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
945var typeSymbol = compilation.GetTypeByMetadataName(fullName);
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (1)
92if (argumentNullExceptionType is null || semanticModel.Compilation.GetTypeByMetadataName(argumentNullExceptionType) is null)
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
613!parameter.Type.Equals(compilation.GetTypeByMetadataName(typeof(CancellationToken)?.FullName!));
SignatureHelp\CommonSignatureHelpUtilities.cs (1)
171var ienumerableType = compilation.GetTypeByMetadataName(typeof(IEnumerable).FullName!);
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
54var iCustomMarshaler = context.Compilation.GetTypeByMetadataName(typeof(ICustomMarshaler).FullName!);
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
248=> semanticModel.Compilation.GetTypeByMetadataName(typeof(T).FullName!);
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
75enumerableType = compilation.GetTypeByMetadataName(typeof(Enumerable)?.FullName!);
src\roslyn\src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
109var nullableType = semanticModel.Compilation.GetTypeByMetadataName(typeof(Nullable<>).FullName!);
src\roslyn\src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
73var formatProviderType = startContext.Compilation.GetTypeByMetadataName(typeof(System.IFormatProvider).FullName!);
src\roslyn\src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
60var attribute = compilation.GetTypeByMetadataName(typeof(ObsoleteAttribute).FullName!);
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
202var gcType = compilation.GetTypeByMetadataName(typeof(GC).FullName!);
StackTraceExplorer\StackTraceExplorerUtilities.cs (1)
110var type = compilation.GetTypeByMetadataName(fullyQualifiedTypeName);
Microsoft.CodeAnalysis.Razor.Compiler (25)
Analyzers\ComponentParameterNullableWarningSuppressor.cs (3)
25var editorRequiredSymbol = context.Compilation.GetTypeByMetadataName("Microsoft.AspNetCore.Components.EditorRequiredAttribute"); 26var parameterSymbol = context.Compilation.GetTypeByMetadataName("Microsoft.AspNetCore.Components.ParameterAttribute"); 27var componentSymbol = context.Compilation.GetTypeByMetadataName("Microsoft.AspNetCore.Components.IComponent");
CSharp\CompilationExtensions.cs (2)
25var type = compilation.GetTypeByMetadataName(typeMetadataName); 41var readOnlySpanType = compilation.GetTypeByMetadataName("System.ReadOnlySpan`1");
CSharp\DefaultUtf8WriteLiteralFeature.cs (2)
108var type = compilation.GetTypeByMetadataName(info.BaseTypeName); 216/// <see cref="Compilation.GetTypeByMetadataName"/>. Unlike <c>GetFullName()</c>
Language\TagHelpers\Producers\BindTagHelperProducer.Factory.cs (2)
26var bindElementAttributeType = compilation.GetTypeByMetadataName(ComponentsApi.BindElementAttribute.FullTypeName); 27var bindInputElementAttributeType = compilation.GetTypeByMetadataName(ComponentsApi.BindInputElementAttribute.FullTypeName);
Language\TagHelpers\RoslynExtensions.cs (1)
19result = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
Mvc.Version1_X\ViewComponentTagHelperDescriptorFactory.cs (4)
44_viewComponentAttributeSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.ViewComponentAttribute); 45_genericTaskSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.GenericTask); 46_taskSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.Task); 47_iDictionarySymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.IDictionary);
Mvc.Version1_X\ViewComponentTagHelperProducer.Factory.cs (1)
28var nonViewComponentAttributeType = compilation.GetTypeByMetadataName(ViewComponentTypes.NonViewComponentAttribute);
Mvc.Version2_X\ViewComponentTagHelperDescriptorFactory.cs (4)
44_viewComponentAttributeSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.ViewComponentAttribute); 45_genericTaskSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.GenericTask); 46_taskSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.Task); 47_iDictionarySymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.IDictionary);
Mvc.Version2_X\ViewComponentTagHelperProducer.Factory.cs (1)
28var nonViewComponentAttributeType = compilation.GetTypeByMetadataName(ViewComponentTypes.NonViewComponentAttribute);
Mvc\ViewComponentTagHelperDescriptorFactory.cs (4)
44_viewComponentAttributeSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.ViewComponentAttribute); 45_genericTaskSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.GenericTask); 46_taskSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.Task); 47_iDictionarySymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.IDictionary);
Mvc\ViewComponentTagHelperProducer.Factory.cs (1)
28var nonViewComponentAttributeType = compilation.GetTypeByMetadataName(ViewComponentTypes.NonViewComponentAttribute);
Microsoft.CodeAnalysis.Rebuild (1)
CompilationFactory.cs (1)
179var typeSymbol = rebuildCompilation.GetTypeByMetadataName(mainTypeName);
Microsoft.CodeAnalysis.ResxSourceGenerator (78)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (77)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!); 82=> compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!); 85=> compilation.GetTypeByMetadataName(typeof(ArgumentOutOfRangeException).FullName!); 88=> compilation.GetTypeByMetadataName(typeof(Array).FullName!); 91=> compilation.GetTypeByMetadataName(typeof(Attribute).FullName!); 94=> compilation.GetTypeByMetadataName(typeof(BlockingCollection<>).FullName!); 97=> compilation.GetTypeByMetadataName(typeof(Collection<>).FullName!); 100=> compilation.GetTypeByMetadataName(typeof(Exception).FullName!); 103=> compilation.GetTypeByMetadataName(typeof(System.Diagnostics.DebuggerDisplayAttribute).FullName!); 106=> compilation.GetTypeByMetadataName(typeof(StructLayoutAttribute).FullName!); 109=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.InlineArrayAttribute"); 112=> compilation.GetTypeByMetadataName("System.ComponentModel.DesignerCategoryAttribute"); 115=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute"); 118=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.HideModuleNameAttribute"); 121=> compilation.GetTypeByMetadataName(typeof(ThreadStaticAttribute).FullName!); 124=> compilation.GetTypeByMetadataName(typeof(FormattableString).FullName!); 127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!); 130=> compilation.GetTypeByMetadataName(typeof(EventArgs).FullName!); 133=> compilation.GetTypeByMetadataName(typeof(NotImplementedException).FullName!); 136=> compilation.GetTypeByMetadataName(typeof(EqualityComparer<>).FullName!); 139=> compilation.GetTypeByMetadataName(typeof(Action).FullName!); 142=> compilation.GetTypeByMetadataName("System.Linq.Expressions.Expression`1"); 145=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableAttribute).FullName!); 148=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableState).FullName!); 151=> compilation.GetTypeByMetadataName(typeof(Task).FullName!); 154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!); 157=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask"); 160=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask`1"); 163=> compilation.GetTypeByMetadataName(typeof(ICollection<>).FullName!); 166=> compilation.GetTypeByMetadataName(typeof(System.Collections.IEnumerable).FullName!); 169=> compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!); 172=> compilation.GetTypeByMetadataName(typeof(IEnumerator<>).FullName!); 175=> compilation.GetTypeByMetadataName(typeof(IList<>).FullName!); 178=> compilation.GetTypeByMetadataName(typeof(IReadOnlyList<>).FullName!); 181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!); 184=> compilation.GetTypeByMetadataName(typeof(IReadOnlySet<>).FullName!); 187=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerable`1"); 190=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerator`1"); 193=> compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!); 196=> compilation.GetTypeByMetadataName(typeof(SerializableAttribute).FullName!); 199=> compilation.GetTypeByMetadataName(typeof(CoClassAttribute).FullName!); 202=> compilation.GetTypeByMetadataName(typeof(ComAliasNameAttribute).FullName!); 205=> compilation.GetTypeByMetadataName(typeof(SuppressMessageAttribute).FullName!); 208=> compilation.GetTypeByMetadataName(typeof(TupleElementNamesAttribute).FullName!); 211=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.NativeIntegerAttribute"); 214=> compilation.GetTypeByMetadataName(typeof(DynamicAttribute).FullName!); 217=> compilation.GetTypeByMetadataName(typeof(Lazy<>).FullName!); 220=> compilation.GetTypeByMetadataName(typeof(ISerializable).FullName!); 223=> compilation.GetTypeByMetadataName(typeof(SerializationInfo).FullName!); 226=> compilation.GetTypeByMetadataName(typeof(StreamingContext).FullName!); 229=> compilation.GetTypeByMetadataName(typeof(OnDeserializingAttribute).FullName!); 232=> compilation.GetTypeByMetadataName(typeof(OnDeserializedAttribute).FullName!); 235=> compilation.GetTypeByMetadataName(typeof(OnSerializingAttribute).FullName!); 238=> compilation.GetTypeByMetadataName(typeof(OnSerializedAttribute).FullName!); 241=> compilation.GetTypeByMetadataName(typeof(ComRegisterFunctionAttribute).FullName!); 244=> compilation.GetTypeByMetadataName(typeof(ComUnregisterFunctionAttribute).FullName!); 247=> compilation.GetTypeByMetadataName(typeof(ConditionalAttribute).FullName!); 250=> compilation.GetTypeByMetadataName(typeof(ObsoleteAttribute).FullName!); 253=> compilation.GetTypeByMetadataName("System.Composition.ImportingConstructorAttribute"); 256=> compilation.GetTypeByMetadataName("System.ComponentModel.Composition.ImportingConstructorAttribute"); 259=> compilation.GetTypeByMetadataName(typeof(IDisposable).FullName!); 262=> compilation.GetTypeByMetadataName(typeof(NotNullAttribute).FullName!); 265=> compilation.GetTypeByMetadataName(typeof(MaybeNullAttribute).FullName!); 268=> compilation.GetTypeByMetadataName(typeof(MaybeNullWhenAttribute).FullName!); 271=> compilation.GetTypeByMetadataName(typeof(AllowNullAttribute).FullName!); 274=> compilation.GetTypeByMetadataName(typeof(DisallowNullAttribute).FullName!); 277=> compilation.GetTypeByMetadataName(typeof(DataMemberAttribute).FullName!); 280=> compilation.GetTypeByMetadataName(typeof(DataContractAttribute).FullName!); 283=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"); 286=> compilation.GetTypeByMetadataName(typeof(CancellationToken).FullName!); 289=> compilation.GetTypeByMetadataName($"System.ValueTuple`{arity}"); 292=> compilation.GetTypeByMetadataName(typeof(List<>).FullName!); 295=> compilation.GetTypeByMetadataName(typeof(ReadOnlySpan<>).FullName!); 298=> compilation.GetTypeByMetadataName(typeof(Span<>).FullName!); 301=> compilation.GetTypeByMetadataName(typeof(InterpolatedStringHandlerAttribute).FullName!); 304=> compilation.GetTypeByMetadataName("System.DateOnly"); 307=> compilation.GetTypeByMetadataName("System.TimeOnly");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
506var delegateType = compilation.GetTypeByMetadataName(method.ReturnsVoid
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Utilities\IntrinsicOperators\AbstractIntrinsicOperatorDocumentation.vb (1)
53Dim returnType = semanticModel.Compilation.GetTypeByMetadataName(ReturnTypeMetadataName)
Microsoft.CodeAnalysis.Workspaces (85)
Recommendations\AbstractRecommendationServiceRunner.cs (1)
191var expressionSymbol = _context.SemanticModel.Compilation.GetTypeByMetadataName(typeof(Expression<>).FullName);
Shared\Utilities\EditorBrowsableHelpers.cs (2)
98var typeLibAttributeType = compilation.GetTypeByMetadataName(attributeMetadataName); 99var typeLibFlagsType = compilation.GetTypeByMetadataName(flagsMetadataName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (77)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!); 82=> compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!); 85=> compilation.GetTypeByMetadataName(typeof(ArgumentOutOfRangeException).FullName!); 88=> compilation.GetTypeByMetadataName(typeof(Array).FullName!); 91=> compilation.GetTypeByMetadataName(typeof(Attribute).FullName!); 94=> compilation.GetTypeByMetadataName(typeof(BlockingCollection<>).FullName!); 97=> compilation.GetTypeByMetadataName(typeof(Collection<>).FullName!); 100=> compilation.GetTypeByMetadataName(typeof(Exception).FullName!); 103=> compilation.GetTypeByMetadataName(typeof(System.Diagnostics.DebuggerDisplayAttribute).FullName!); 106=> compilation.GetTypeByMetadataName(typeof(StructLayoutAttribute).FullName!); 109=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.InlineArrayAttribute"); 112=> compilation.GetTypeByMetadataName("System.ComponentModel.DesignerCategoryAttribute"); 115=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute"); 118=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.HideModuleNameAttribute"); 121=> compilation.GetTypeByMetadataName(typeof(ThreadStaticAttribute).FullName!); 124=> compilation.GetTypeByMetadataName(typeof(FormattableString).FullName!); 127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!); 130=> compilation.GetTypeByMetadataName(typeof(EventArgs).FullName!); 133=> compilation.GetTypeByMetadataName(typeof(NotImplementedException).FullName!); 136=> compilation.GetTypeByMetadataName(typeof(EqualityComparer<>).FullName!); 139=> compilation.GetTypeByMetadataName(typeof(Action).FullName!); 142=> compilation.GetTypeByMetadataName("System.Linq.Expressions.Expression`1"); 145=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableAttribute).FullName!); 148=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableState).FullName!); 151=> compilation.GetTypeByMetadataName(typeof(Task).FullName!); 154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!); 157=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask"); 160=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask`1"); 163=> compilation.GetTypeByMetadataName(typeof(ICollection<>).FullName!); 166=> compilation.GetTypeByMetadataName(typeof(System.Collections.IEnumerable).FullName!); 169=> compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!); 172=> compilation.GetTypeByMetadataName(typeof(IEnumerator<>).FullName!); 175=> compilation.GetTypeByMetadataName(typeof(IList<>).FullName!); 178=> compilation.GetTypeByMetadataName(typeof(IReadOnlyList<>).FullName!); 181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!); 184=> compilation.GetTypeByMetadataName(typeof(IReadOnlySet<>).FullName!); 187=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerable`1"); 190=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerator`1"); 193=> compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!); 196=> compilation.GetTypeByMetadataName(typeof(SerializableAttribute).FullName!); 199=> compilation.GetTypeByMetadataName(typeof(CoClassAttribute).FullName!); 202=> compilation.GetTypeByMetadataName(typeof(ComAliasNameAttribute).FullName!); 205=> compilation.GetTypeByMetadataName(typeof(SuppressMessageAttribute).FullName!); 208=> compilation.GetTypeByMetadataName(typeof(TupleElementNamesAttribute).FullName!); 211=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.NativeIntegerAttribute"); 214=> compilation.GetTypeByMetadataName(typeof(DynamicAttribute).FullName!); 217=> compilation.GetTypeByMetadataName(typeof(Lazy<>).FullName!); 220=> compilation.GetTypeByMetadataName(typeof(ISerializable).FullName!); 223=> compilation.GetTypeByMetadataName(typeof(SerializationInfo).FullName!); 226=> compilation.GetTypeByMetadataName(typeof(StreamingContext).FullName!); 229=> compilation.GetTypeByMetadataName(typeof(OnDeserializingAttribute).FullName!); 232=> compilation.GetTypeByMetadataName(typeof(OnDeserializedAttribute).FullName!); 235=> compilation.GetTypeByMetadataName(typeof(OnSerializingAttribute).FullName!); 238=> compilation.GetTypeByMetadataName(typeof(OnSerializedAttribute).FullName!); 241=> compilation.GetTypeByMetadataName(typeof(ComRegisterFunctionAttribute).FullName!); 244=> compilation.GetTypeByMetadataName(typeof(ComUnregisterFunctionAttribute).FullName!); 247=> compilation.GetTypeByMetadataName(typeof(ConditionalAttribute).FullName!); 250=> compilation.GetTypeByMetadataName(typeof(ObsoleteAttribute).FullName!); 253=> compilation.GetTypeByMetadataName("System.Composition.ImportingConstructorAttribute"); 256=> compilation.GetTypeByMetadataName("System.ComponentModel.Composition.ImportingConstructorAttribute"); 259=> compilation.GetTypeByMetadataName(typeof(IDisposable).FullName!); 262=> compilation.GetTypeByMetadataName(typeof(NotNullAttribute).FullName!); 265=> compilation.GetTypeByMetadataName(typeof(MaybeNullAttribute).FullName!); 268=> compilation.GetTypeByMetadataName(typeof(MaybeNullWhenAttribute).FullName!); 271=> compilation.GetTypeByMetadataName(typeof(AllowNullAttribute).FullName!); 274=> compilation.GetTypeByMetadataName(typeof(DisallowNullAttribute).FullName!); 277=> compilation.GetTypeByMetadataName(typeof(DataMemberAttribute).FullName!); 280=> compilation.GetTypeByMetadataName(typeof(DataContractAttribute).FullName!); 283=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"); 286=> compilation.GetTypeByMetadataName(typeof(CancellationToken).FullName!); 289=> compilation.GetTypeByMetadataName($"System.ValueTuple`{arity}"); 292=> compilation.GetTypeByMetadataName(typeof(List<>).FullName!); 295=> compilation.GetTypeByMetadataName(typeof(ReadOnlySpan<>).FullName!); 298=> compilation.GetTypeByMetadataName(typeof(Span<>).FullName!); 301=> compilation.GetTypeByMetadataName(typeof(InterpolatedStringHandlerAttribute).FullName!); 304=> compilation.GetTypeByMetadataName("System.DateOnly"); 307=> compilation.GetTypeByMetadataName("System.TimeOnly");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
506var delegateType = compilation.GetTypeByMetadataName(method.ReturnsVoid
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
25var exceptionType = compilation.GetTypeByMetadataName(exceptionMetadataName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
441var type = compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
243var iequatableType = compilation.GetTypeByMetadataName(typeof(IEquatable<>).FullName);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
491compilationWithoutGeneratedDocuments.GetTypeByMetadataName("System.Object") != null);
Microsoft.Diagnostics.DataContractReader.DataGenerator (2)
CdacGenerator.cs (2)
39EmitLayoutPair: compilation.GetTypeByMetadataName(LayoutPairSource.FullyQualifiedName) is null, 40EmitTypeNameResolver: compilation.GetTypeByMetadataName(TypeNameResolverSource.FullyQualifiedName) is null));
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\ResourceUsageAnalyzer.cs (1)
27SRSymbol = context.Compilation.GetTypeByMetadataName("System.SR");
Microsoft.Extensions.Logging.Generators (1)
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
41var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
Microsoft.Extensions.Options.SourceGeneration (2)
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
41var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
SymbolLoader.cs (1)
30INamedTypeSymbol? GetSymbol(string metadataName) => compilation.GetTypeByMetadataName(metadataName);
Microsoft.Gen.BuildMetadata (1)
src\Generators\Shared\RoslynExtensions.cs (1)
46var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
Microsoft.Gen.ComplianceReports (2)
SymbolLoader.cs (2)
16var dataClassificationAttributeSymbol = compilation.GetTypeByMetadataName(DataClassificationAttribute); 26compilation.GetTypeByMetadataName(LoggerMessageAttribute));
Microsoft.Gen.ContextualOptions (1)
SymbolLoader.cs (1)
14var optionsContextAttribute = compilation.GetTypeByMetadataName("Microsoft.Extensions.Options.Contextual.OptionsContextAttribute");
Microsoft.Gen.Logging (1)
src\Generators\Shared\RoslynExtensions.cs (1)
46var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
Microsoft.Gen.Logging.Unit.Tests (1)
TypeSymbolExtensionsTests.cs (1)
297INamedTypeSymbol listType = compilation.GetTypeByMetadataName("System.Collections.Generic.List`1")!;
Microsoft.Gen.MetadataExtractor (10)
src\Generators\Microsoft.Gen.ComplianceReports\SymbolLoader.cs (2)
16var dataClassificationAttributeSymbol = compilation.GetTypeByMetadataName(DataClassificationAttribute); 26compilation.GetTypeByMetadataName(LoggerMessageAttribute));
src\Generators\Microsoft.Gen.Metrics\SymbolLoader.cs (8)
21var meterClassSymbol = compilation.GetTypeByMetadataName(MeterClass); 22var counterAttribute = compilation.GetTypeByMetadataName(CounterAttribute); 23var histogramAttribute = compilation.GetTypeByMetadataName(HistogramAttribute); 33var counterTAttribute = compilation.GetTypeByMetadataName(CounterTAttribute); 34var histogramTAttribute = compilation.GetTypeByMetadataName(HistogramTAttribute); 35var gaugeAttribute = compilation.GetTypeByMetadataName(GaugeAttribute); 36var gaugeTAttribute = compilation.GetTypeByMetadataName(GaugeTAttribute); 37var tagNameAttribute = compilation.GetTypeByMetadataName(TagNameAttribute);
Microsoft.Gen.Metrics (9)
src\Generators\Shared\RoslynExtensions.cs (1)
46var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
SymbolLoader.cs (8)
21var meterClassSymbol = compilation.GetTypeByMetadataName(MeterClass); 22var counterAttribute = compilation.GetTypeByMetadataName(CounterAttribute); 23var histogramAttribute = compilation.GetTypeByMetadataName(HistogramAttribute); 33var counterTAttribute = compilation.GetTypeByMetadataName(CounterTAttribute); 34var histogramTAttribute = compilation.GetTypeByMetadataName(HistogramTAttribute); 35var gaugeAttribute = compilation.GetTypeByMetadataName(GaugeAttribute); 36var gaugeTAttribute = compilation.GetTypeByMetadataName(GaugeTAttribute); 37var tagNameAttribute = compilation.GetTypeByMetadataName(TagNameAttribute);
Microsoft.Gen.MetricsReports (8)
src\Generators\Microsoft.Gen.Metrics\SymbolLoader.cs (8)
21var meterClassSymbol = compilation.GetTypeByMetadataName(MeterClass); 22var counterAttribute = compilation.GetTypeByMetadataName(CounterAttribute); 23var histogramAttribute = compilation.GetTypeByMetadataName(HistogramAttribute); 33var counterTAttribute = compilation.GetTypeByMetadataName(CounterTAttribute); 34var histogramTAttribute = compilation.GetTypeByMetadataName(HistogramTAttribute); 35var gaugeAttribute = compilation.GetTypeByMetadataName(GaugeAttribute); 36var gaugeTAttribute = compilation.GetTypeByMetadataName(GaugeTAttribute); 37var tagNameAttribute = compilation.GetTypeByMetadataName(TagNameAttribute);
Microsoft.Interop.ComInterfaceGenerator (10)
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (3)
82var generatedComInterfaceAttribute = gen.Attribute(gen.TypeExpression(comp.GetTypeByMetadataName(TypeNames.GeneratedComInterfaceAttribute)).WithAdditionalAnnotations(Simplifier.AddImportsAnnotation)); 91gen.AttributeArgument("StringMarshallingCustomType", gen.TypeOfExpression(gen.TypeExpression(comp.GetTypeByMetadataName(TypeNames.BStrStringMarshaller)))) 101var comImportAttributeType = comp.GetTypeByMetadataName(TypeNames.System_Runtime_InteropServices_ComImportAttribute);
ComInterfaceGenerator.cs (1)
327environment.Compilation.GetTypeByMetadataName(TypeNames.System_Exception),
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
41var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
VtableIndexStubGenerator.cs (5)
262INamedTypeSymbol? lcidConversionAttrType = environment.Compilation.GetTypeByMetadataName(TypeNames.LCIDConversionAttribute); 263INamedTypeSymbol? suppressGCTransitionAttrType = environment.Compilation.GetTypeByMetadataName(TypeNames.SuppressGCTransitionAttribute); 264INamedTypeSymbol? unmanagedCallConvAttrType = environment.Compilation.GetTypeByMetadataName(TypeNames.UnmanagedCallConvAttribute); 265INamedTypeSymbol iUnmanagedInterfaceTypeType = environment.Compilation.GetTypeByMetadataName(TypeNames.IUnmanagedInterfaceType_Metadata)!; 414compilation.GetTypeByMetadataName(TypeNames.System_Exception),
Microsoft.Interop.JavaScript.JSImportGenerator (2)
Analyzers\JSImportExportDiagnosticsAnalyzer.cs (1)
71INamedTypeSymbol? attrType = context.Compilation.GetTypeByMetadataName(AttributeMetadataName);
JSMarshalAsAttributeInfoParser.cs (1)
19_jsMarshalAsAttribute = compilation.GetTypeByMetadataName(Constants.JSMarshalAsAttribute)!.ConstructUnboundGenericType();
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\CustomMarshallerAttributeFixer.cs (1)
571compilation.GetTypeByMetadataName("System.NotImplementedException"))));
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
41var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
41var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
Microsoft.Interop.SourceGeneration (16)
ArrayMarshallingInfoProvider.cs (2)
51arrayMarshaller = compilation.GetTypeByMetadataName(TypeNames.System_Runtime_InteropServices_PointerArrayMarshaller_Metadata); 56arrayMarshaller = compilation.GetTypeByMetadataName(TypeNames.System_Runtime_InteropServices_ArrayMarshaller_Metadata);
ComInterfaceMarshallingInfoProvider.cs (1)
36INamedTypeSymbol? comInterfaceMarshaller = compilation.GetTypeByMetadataName(TypeNames.System_Runtime_InteropServices_Marshalling_ComInterfaceMarshaller_Metadata);
MarshallerShape.cs (4)
116INamedTypeSymbol spanOfT = compilation.GetTypeByMetadataName(TypeNames.System_Span_Metadata)!; 120INamedTypeSymbol readOnlySpanOfT = compilation.GetTypeByMetadataName(TypeNames.System_ReadOnlySpan_Metadata)!; 454INamedTypeSymbol spanOfT = compilation.GetTypeByMetadataName(TypeNames.System_Span_Metadata)!; 459INamedTypeSymbol readOnlySpanOfT = compilation.GetTypeByMetadataName(TypeNames.System_ReadOnlySpan_Metadata)!;
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
41var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
StubEnvironment.cs (6)
30_lcidConversionAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(TypeNames.LCIDConversionAttribute)); 44_suppressGCTransitionAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(TypeNames.SuppressGCTransitionAttribute)); 58_unmanagedCallConvAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(TypeNames.UnmanagedCallConvAttribute)); 72_defaultDllImportSearchPathsAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(TypeNames.DefaultDllImportSearchPathsAttribute)); 86_wasmImportLinkageAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(TypeNames.WasmImportLinkageAttribute)); 100_stackTraceHiddenAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(TypeNames.System_Diagnostics_StackTraceHiddenAttribute));
TypePositionInfo.cs (2)
113INamedTypeSymbol outAttributeType = compilation.GetTypeByMetadataName(TypeNames.System_Runtime_InteropServices_OutAttribute)!; 114INamedTypeSymbol inAttributeType = compilation.GetTypeByMetadataName(TypeNames.System_Runtime_InteropServices_InAttribute)!;
Microsoft.Maui.Controls.SourceGen (1)
CodeBehindGenerator.cs (1)
190 INamedTypeSymbol? internalsVisibleToAttribute = compilation.GetTypeByMetadataName(typeof(InternalsVisibleToAttribute).FullName);
Microsoft.ML.InternalCodeAnalyzer (7)
BaseTestClassAnalyzer.cs (3)
40if (!(context.Compilation.GetTypeByMetadataName("Xunit.FactAttribute") is { } factAttribute)) 61_baseTestClass = _compilation.GetTypeByMetadataName("Microsoft.ML.TestFramework.BaseTestClass"); 62_ITbaseTestClass = _compilation.GetTypeByMetadataName("Microsoft.ML.IntegrationTests.IntegrationTestBaseClass");
BestFriendAnalyzer.cs (2)
55var bestFriendAttributeType = comp.GetTypeByMetadataName(attributeName); 58var wantsToBeBestFriendsAttributeType = comp.GetTypeByMetadataName(assemblyAttributeName);
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
48var attribute = context.Compilation.GetTypeByMetadataName(attributeName);
RelaxTestNamingSuppressor.cs (1)
26if (!(context.Compilation.GetTypeByMetadataName("Xunit.FactAttribute") is { } factAttribute))
Roslyn.Diagnostics.Analyzers (81)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (77)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!); 82=> compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!); 85=> compilation.GetTypeByMetadataName(typeof(ArgumentOutOfRangeException).FullName!); 88=> compilation.GetTypeByMetadataName(typeof(Array).FullName!); 91=> compilation.GetTypeByMetadataName(typeof(Attribute).FullName!); 94=> compilation.GetTypeByMetadataName(typeof(BlockingCollection<>).FullName!); 97=> compilation.GetTypeByMetadataName(typeof(Collection<>).FullName!); 100=> compilation.GetTypeByMetadataName(typeof(Exception).FullName!); 103=> compilation.GetTypeByMetadataName(typeof(System.Diagnostics.DebuggerDisplayAttribute).FullName!); 106=> compilation.GetTypeByMetadataName(typeof(StructLayoutAttribute).FullName!); 109=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.InlineArrayAttribute"); 112=> compilation.GetTypeByMetadataName("System.ComponentModel.DesignerCategoryAttribute"); 115=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute"); 118=> compilation.GetTypeByMetadataName("Microsoft.VisualBasic.HideModuleNameAttribute"); 121=> compilation.GetTypeByMetadataName(typeof(ThreadStaticAttribute).FullName!); 124=> compilation.GetTypeByMetadataName(typeof(FormattableString).FullName!); 127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!); 130=> compilation.GetTypeByMetadataName(typeof(EventArgs).FullName!); 133=> compilation.GetTypeByMetadataName(typeof(NotImplementedException).FullName!); 136=> compilation.GetTypeByMetadataName(typeof(EqualityComparer<>).FullName!); 139=> compilation.GetTypeByMetadataName(typeof(Action).FullName!); 142=> compilation.GetTypeByMetadataName("System.Linq.Expressions.Expression`1"); 145=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableAttribute).FullName!); 148=> compilation.GetTypeByMetadataName(typeof(EditorBrowsableState).FullName!); 151=> compilation.GetTypeByMetadataName(typeof(Task).FullName!); 154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!); 157=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask"); 160=> compilation.GetTypeByMetadataName("System.Threading.Tasks.ValueTask`1"); 163=> compilation.GetTypeByMetadataName(typeof(ICollection<>).FullName!); 166=> compilation.GetTypeByMetadataName(typeof(System.Collections.IEnumerable).FullName!); 169=> compilation.GetTypeByMetadataName(typeof(IEnumerable<>).FullName!); 172=> compilation.GetTypeByMetadataName(typeof(IEnumerator<>).FullName!); 175=> compilation.GetTypeByMetadataName(typeof(IList<>).FullName!); 178=> compilation.GetTypeByMetadataName(typeof(IReadOnlyList<>).FullName!); 181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!); 184=> compilation.GetTypeByMetadataName(typeof(IReadOnlySet<>).FullName!); 187=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerable`1"); 190=> compilation.GetTypeByMetadataName("System.Collections.Generic.IAsyncEnumerator`1"); 193=> compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!); 196=> compilation.GetTypeByMetadataName(typeof(SerializableAttribute).FullName!); 199=> compilation.GetTypeByMetadataName(typeof(CoClassAttribute).FullName!); 202=> compilation.GetTypeByMetadataName(typeof(ComAliasNameAttribute).FullName!); 205=> compilation.GetTypeByMetadataName(typeof(SuppressMessageAttribute).FullName!); 208=> compilation.GetTypeByMetadataName(typeof(TupleElementNamesAttribute).FullName!); 211=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.NativeIntegerAttribute"); 214=> compilation.GetTypeByMetadataName(typeof(DynamicAttribute).FullName!); 217=> compilation.GetTypeByMetadataName(typeof(Lazy<>).FullName!); 220=> compilation.GetTypeByMetadataName(typeof(ISerializable).FullName!); 223=> compilation.GetTypeByMetadataName(typeof(SerializationInfo).FullName!); 226=> compilation.GetTypeByMetadataName(typeof(StreamingContext).FullName!); 229=> compilation.GetTypeByMetadataName(typeof(OnDeserializingAttribute).FullName!); 232=> compilation.GetTypeByMetadataName(typeof(OnDeserializedAttribute).FullName!); 235=> compilation.GetTypeByMetadataName(typeof(OnSerializingAttribute).FullName!); 238=> compilation.GetTypeByMetadataName(typeof(OnSerializedAttribute).FullName!); 241=> compilation.GetTypeByMetadataName(typeof(ComRegisterFunctionAttribute).FullName!); 244=> compilation.GetTypeByMetadataName(typeof(ComUnregisterFunctionAttribute).FullName!); 247=> compilation.GetTypeByMetadataName(typeof(ConditionalAttribute).FullName!); 250=> compilation.GetTypeByMetadataName(typeof(ObsoleteAttribute).FullName!); 253=> compilation.GetTypeByMetadataName("System.Composition.ImportingConstructorAttribute"); 256=> compilation.GetTypeByMetadataName("System.ComponentModel.Composition.ImportingConstructorAttribute"); 259=> compilation.GetTypeByMetadataName(typeof(IDisposable).FullName!); 262=> compilation.GetTypeByMetadataName(typeof(NotNullAttribute).FullName!); 265=> compilation.GetTypeByMetadataName(typeof(MaybeNullAttribute).FullName!); 268=> compilation.GetTypeByMetadataName(typeof(MaybeNullWhenAttribute).FullName!); 271=> compilation.GetTypeByMetadataName(typeof(AllowNullAttribute).FullName!); 274=> compilation.GetTypeByMetadataName(typeof(DisallowNullAttribute).FullName!); 277=> compilation.GetTypeByMetadataName(typeof(DataMemberAttribute).FullName!); 280=> compilation.GetTypeByMetadataName(typeof(DataContractAttribute).FullName!); 283=> compilation.GetTypeByMetadataName("System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"); 286=> compilation.GetTypeByMetadataName(typeof(CancellationToken).FullName!); 289=> compilation.GetTypeByMetadataName($"System.ValueTuple`{arity}"); 292=> compilation.GetTypeByMetadataName(typeof(List<>).FullName!); 295=> compilation.GetTypeByMetadataName(typeof(ReadOnlySpan<>).FullName!); 298=> compilation.GetTypeByMetadataName(typeof(Span<>).FullName!); 301=> compilation.GetTypeByMetadataName(typeof(InterpolatedStringHandlerAttribute).FullName!); 304=> compilation.GetTypeByMetadataName("System.DateOnly"); 307=> compilation.GetTypeByMetadataName("System.TimeOnly");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
506var delegateType = compilation.GetTypeByMetadataName(method.ReturnsVoid
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
25var exceptionType = compilation.GetTypeByMetadataName(exceptionMetadataName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
441var type = compilation.GetTypeByMetadataName(typeof(ArgumentNullException).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
243var iequatableType = compilation.GetTypeByMetadataName(typeof(IEquatable<>).FullName);
System.Text.Json.SourceGeneration (1)
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
41var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
System.Text.RegularExpressions.Generator (9)
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
41var type = compilation.GetTypeByMetadataName(fullyQualifiedMetadataName);
UpgradeToGeneratedRegexAnalyzer.cs (2)
207regexTypeSymbol = compilation.GetTypeByMetadataName(RegexTypeName); 213INamedTypeSymbol? generatedRegexAttributeTypeSymbol = compilation.GetTypeByMetadataName(GeneratedRegexTypeName);
UpgradeToGeneratedRegexCodeFixer.cs (6)
98compilation.GetTypeByMetadataName(RegexTypeName) is not INamedTypeSymbol regexSymbol || 99compilation.GetTypeByMetadataName(GeneratedRegexTypeName) is not INamedTypeSymbol generatedRegexAttributeSymbol || 197compilation.GetTypeByMetadataName(RegexTypeName) is not INamedTypeSymbol regexSymbol || 198compilation.GetTypeByMetadataName(GeneratedRegexTypeName) is not INamedTypeSymbol generatedRegexAttributeSymbol || 247compilation.GetTypeByMetadataName(RegexTypeName) is not INamedTypeSymbol regexSymbol || 248compilation.GetTypeByMetadataName(GeneratedRegexTypeName) is not INamedTypeSymbol generatedRegexAttributeSymbol ||
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (1)
205INamedTypeSymbol? flagsAttributeType = compilation.GetTypeByMetadataName("System.FlagsAttribute");