2 instantiations of AddImportPlacementOptions
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\AddImport\AddImportPlacementOptions.cs (1)
30public static readonly AddImportPlacementOptions Default = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
37=> new()
30 references to AddImportPlacementOptions
Microsoft.CodeAnalysis.Workspaces (30)
Editing\ImportAdder.cs (7)
64var addImportOptions = await document.GetAddImportPlacementOptionsAsync(cancellationToken).ConfigureAwait(false); 71internal static async Task<Document> AddImportsFromSyntaxesAsync(Document document, AddImportPlacementOptions options, CancellationToken cancellationToken) 77internal static async Task<Document> AddImportsFromSyntaxesAsync(Document document, SyntaxAnnotation annotation, AddImportPlacementOptions options, CancellationToken cancellationToken) 83internal static Task<Document> AddImportsFromSyntaxesAsync(Document document, IEnumerable<TextSpan> spans, AddImportPlacementOptions options, CancellationToken cancellationToken) 89internal static async Task<Document> AddImportsFromSymbolAnnotationAsync(Document document, AddImportPlacementOptions options, CancellationToken cancellationToken) 95internal static async Task<Document> AddImportsFromSymbolAnnotationAsync(Document document, SyntaxAnnotation annotation, AddImportPlacementOptions options, CancellationToken cancellationToken) 98internal static Task<Document> AddImportsFromSymbolAnnotationAsync(Document document, IEnumerable<TextSpan> spans, AddImportPlacementOptions options, CancellationToken cancellationToken)
ExtractMethod\ExtractMethodOptions.cs (1)
37public AddImportPlacementOptions AddImportOptions => CodeCleanupOptions.AddImportOptions;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\AddImport\AddImportPlacementOptions.cs (1)
30public static readonly AddImportPlacementOptions Default = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeCleanup\CodeCleanupOptions.cs (2)
18[DataMember] public AddImportPlacementOptions AddImportOptions { get; init; } = AddImportPlacementOptions.Default;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Editing\GenerationOptions.cs (1)
17defaultValue: AddImportPlacementOptions.Default.PlaceSystemNamespaceFirst,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\OrganizeImports\OrganizeImportsOptions.cs (1)
14[DataMember] public bool PlaceSystemNamespaceFirst { get; init; } = AddImportPlacementOptions.Default.PlaceSystemNamespaceFirst;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\AddImport\AddImportPlacementOptionsProviders.cs (3)
24public static AddImportPlacementOptions GetAddImportPlacementOptions(this IOptionsReader options, Host.LanguageServices languageServices, bool? allowInHiddenRegions) 25=> languageServices.GetRequiredService<IAddImportsService>().GetAddImportOptions(options, allowInHiddenRegions ?? AddImportPlacementOptions.Default.AllowInHiddenRegions); 27public static async ValueTask<AddImportPlacementOptions> GetAddImportPlacementOptionsAsync(this Document document, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
257var addImportsOptions = await newDocument.GetAddImportPlacementOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeAndImportGenerationOptionsProviders.cs (1)
16AddImportOptions = AddImportPlacementOptions.Default
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
36AddImportPlacementOptions options, 110AddImportPlacementOptions options, 171AddImportPlacementOptions options,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (5)
36public AddImportPlacementOptions GetAddImportOptions(IOptionsReader configOptions, bool allowInHiddenRegions) 103public SyntaxNode GetImportContainer(SyntaxNode root, SyntaxNode? contextLocation, SyntaxNode import, AddImportPlacementOptions options) 136AddImportPlacementOptions options, 164AddImportPlacementOptions options, SyntaxNode root, CancellationToken cancellationToken); 166private void GetContainers(SyntaxNode root, SyntaxNode contextLocation, AddImportPlacementOptions options, out SyntaxNode externContainer, out SyntaxNode usingContainer, out SyntaxNode staticUsingContainer, out SyntaxNode aliasContainer)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\IAddImportsService.cs (4)
22AddImportPlacementOptions GetAddImportOptions(IOptionsReader configOptions, bool allowInHiddenRegions); 35SyntaxNode GetImportContainer(SyntaxNode root, SyntaxNode? contextLocation, SyntaxNode import, AddImportPlacementOptions options); 39IEnumerable<SyntaxNode> newImports, SyntaxGenerator generator, AddImportPlacementOptions options, CancellationToken cancellationToken); 46SyntaxNode contextLocation, SyntaxNode newImport, SyntaxGenerator generator, AddImportPlacementOptions options,