490 references to Compilation
ConfigurationSchemaGenerator (1)
ILLink.CodeFixProvider (2)
Microsoft.Analyzers.Extra (4)
Microsoft.AspNetCore.App.Analyzers (9)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.AspNetCore.App.CodeFixes (4)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (5)
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
Microsoft.CodeAnalysis (13)
DiagnosticAnalyzer\AnalyzerExecutor.cs (3)
675var operationContext = new OperationAnalysisContext(operation, containingSymbol, semanticModel.Compilation,
823operationBlockScope, operationBlocks, declaredSymbol, semanticModel.Compilation, AnalyzerOptions,
908var context = new OperationBlockAnalysisContext(operationBlocks, declaredSymbol, semanticModel.Compilation,
Microsoft.CodeAnalysis.CodeStyle (21)
Microsoft.CodeAnalysis.CodeStyle.Fixes (31)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
136if (addImportsService.HasExistingImport(model.Compilation, root, node, namespaceSyntax, generator))
161model.Compilation, root, context, importsToAdd, generator, options, cancellationToken);
Microsoft.CodeAnalysis.CSharp (5)
Microsoft.CodeAnalysis.CSharp.CodeStyle (23)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (28)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Semantics\OutVarTests.cs (8)
1058var conversion = model.ClassifyConversion(decl, model.Compilation.ObjectType, false);
1060Assert.Equal(conversion, model.ClassifyConversion(decl, model.Compilation.ObjectType, true));
1061Assert.Equal(conversion, ((CSharpSemanticModel)model).ClassifyConversion(decl, model.Compilation.ObjectType, false));
1062Assert.Equal(conversion, ((CSharpSemanticModel)model).ClassifyConversion(decl, model.Compilation.ObjectType, true));
1063Assert.Equal(conversion, model.ClassifyConversion(decl.Position, decl, model.Compilation.ObjectType, false));
1064Assert.Equal(conversion, model.ClassifyConversion(decl.Position, decl, model.Compilation.ObjectType, true));
1065Assert.Equal(conversion, ((CSharpSemanticModel)model).ClassifyConversion(decl.Position, decl, model.Compilation.ObjectType, false));
1066Assert.Equal(conversion, ((CSharpSemanticModel)model).ClassifyConversion(decl.Position, decl, model.Compilation.ObjectType, true));
Microsoft.CodeAnalysis.CSharp.Features (62)
AddImport\CSharpAddImportFeatureService.cs (3)
386semanticModel.Compilation, root, contextNode, newImports, generator, options, cancellationToken);
493return (usingDirective, addImportService.HasExistingImport(semanticModel.Compilation, root, contextNode, usingDirective, generator));
565var metadataReference = semanticModel.Compilation.GetMetadataReference(namespaceSymbol.ContainingAssembly);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Workspaces (20)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeGeneration\CodeGenerationTests.cs (3)
658attributes: default, RefKind.None, isParams, GetTypeSymbol(s.Compilation, type), name,
665attributes: default, RefKind.None, isParams, GetTypeSymbol(s.Compilation, typeFullName, typeArrayRank), parameterName,
723=> s => s?.Compilation.GetTypeByMetadataName(typeMetadataName);
Microsoft.CodeAnalysis.Features (83)
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (8)
227if (!IsExchangable(array.ElementType, foreachType, model.Compilation))
241var charType = model.Compilation.GetSpecialType(SpecialType.System_Char);
242if (!IsExchangable(charType, foreachType, model.Compilation))
254if (collectionType.OriginalDefinition.Equals(model.Compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!)))
259if (!IsExchangable(indexer.ReturnType, foreachType, model.Compilation))
273model.Compilation.GetTypeByMetadataName).Where(t => !IsNullOrErrorType(t));
283IsExchangable(indexer.ReturnType, foreachType, model.Compilation))
314if (!IsExchangable(indexerImpl.ReturnType, foreachType, model.Compilation))
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.Test.Utilities (7)
Microsoft.CodeAnalysis.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic (5)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (11)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
Microsoft.CodeAnalysis.VisualBasic.Features (20)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (19)
Microsoft.CodeAnalysis.Workspaces (30)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
136if (addImportsService.HasExistingImport(model.Compilation, root, node, namespaceSyntax, generator))
161model.Compilation, root, context, importsToAdd, generator, options, cancellationToken);
Microsoft.Interop.ComInterfaceGenerator (2)
Microsoft.Interop.LibraryImportGenerator (45)
Analyzers\CustomMarshallerAttributeFixer.cs (32)
167ManualTypeMarshallingHelper.TryResolveManagedType(entryPointTypeSymbol, ManualTypeMarshallingHelper.ReplaceGenericPlaceholderInType(managedTypeSymbolInAttribute, entryPointTypeSymbol, model.Compilation), isLinearCollectionMarshaller, IgnoreArityMismatch, out ITypeSymbol managedType);
208var (_, methods) = StatelessMarshallerShapeHelper.GetShapeForType(marshallerType, managedType, isLinearCollectionMarshaller, editor.SemanticModel.Compilation);
209INamedTypeSymbol spanOfT = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(TypeNames.System_Span_Metadata)!;
210INamedTypeSymbol readOnlySpanOfT = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(TypeNames.System_ReadOnlySpan_Metadata)!;
228statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
240statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
248gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32)),
251gen.GetAccessorDeclaration(statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) })));
267statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
283statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
298statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
314statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
330statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
345statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
382return gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr));
396return editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr);
404var (_, methods) = StatefulMarshallerShapeHelper.GetShapeForType(marshallerType, managedType, isLinearCollectionMarshaller, editor.SemanticModel.Compilation);
405INamedTypeSymbol spanOfT = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(TypeNames.System_Span_Metadata)!;
406INamedTypeSymbol readOnlySpanOfT = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(TypeNames.System_ReadOnlySpan_Metadata)!;
422statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
432statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
442statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
452statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
460gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32)),
463gen.GetAccessorDeclaration(statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) })));
473statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
483statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
497statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
511statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
520statements: new[] { DefaultMethodStatement(gen, editor.SemanticModel.Compilation) }));
549return gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr));
563return editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr);
Microsoft.Interop.SourceGeneration (1)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
System.Private.CoreLib.Generators (1)
System.Text.RegularExpressions.Generator (2)