2 instantiations of AddImportPlacementOptions
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\AddImport\AddImportPlacementOptions.cs (1)
30
public 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)
64
var
addImportOptions = await document.GetAddImportPlacementOptionsAsync(cancellationToken).ConfigureAwait(false);
71
internal static async Task<Document> AddImportsFromSyntaxesAsync(Document document,
AddImportPlacementOptions
options, CancellationToken cancellationToken)
77
internal static async Task<Document> AddImportsFromSyntaxesAsync(Document document, SyntaxAnnotation annotation,
AddImportPlacementOptions
options, CancellationToken cancellationToken)
83
internal static Task<Document> AddImportsFromSyntaxesAsync(Document document, IEnumerable<TextSpan> spans,
AddImportPlacementOptions
options, CancellationToken cancellationToken)
89
internal static async Task<Document> AddImportsFromSymbolAnnotationAsync(Document document,
AddImportPlacementOptions
options, CancellationToken cancellationToken)
95
internal static async Task<Document> AddImportsFromSymbolAnnotationAsync(Document document, SyntaxAnnotation annotation,
AddImportPlacementOptions
options, CancellationToken cancellationToken)
98
internal static Task<Document> AddImportsFromSymbolAnnotationAsync(Document document, IEnumerable<TextSpan> spans,
AddImportPlacementOptions
options, CancellationToken cancellationToken)
ExtractMethod\ExtractMethodOptions.cs (1)
37
public
AddImportPlacementOptions
AddImportOptions => CodeCleanupOptions.AddImportOptions;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\AddImport\AddImportPlacementOptions.cs (1)
30
public 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)
17
defaultValue:
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)
24
public static
AddImportPlacementOptions
GetAddImportPlacementOptions(this IOptionsReader options, Host.LanguageServices languageServices, bool? allowInHiddenRegions)
25
=> languageServices.GetRequiredService<IAddImportsService>().GetAddImportOptions(options, allowInHiddenRegions ??
AddImportPlacementOptions
.Default.AllowInHiddenRegions);
27
public static async ValueTask<
AddImportPlacementOptions
> GetAddImportPlacementOptionsAsync(this Document document, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
257
var
addImportsOptions = await newDocument.GetAddImportPlacementOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeAndImportGenerationOptionsProviders.cs (1)
16
AddImportOptions =
AddImportPlacementOptions
.Default
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
36
AddImportPlacementOptions
options,
110
AddImportPlacementOptions
options,
171
AddImportPlacementOptions
options,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (5)
36
public
AddImportPlacementOptions
GetAddImportOptions(IOptionsReader configOptions, bool allowInHiddenRegions)
103
public SyntaxNode GetImportContainer(SyntaxNode root, SyntaxNode? contextLocation, SyntaxNode import,
AddImportPlacementOptions
options)
136
AddImportPlacementOptions
options,
164
AddImportPlacementOptions
options, SyntaxNode root, CancellationToken cancellationToken);
166
private 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)
22
AddImportPlacementOptions
GetAddImportOptions(IOptionsReader configOptions, bool allowInHiddenRegions);
35
SyntaxNode GetImportContainer(SyntaxNode root, SyntaxNode? contextLocation, SyntaxNode import,
AddImportPlacementOptions
options);
39
IEnumerable<SyntaxNode> newImports, SyntaxGenerator generator,
AddImportPlacementOptions
options, CancellationToken cancellationToken);
46
SyntaxNode contextLocation, SyntaxNode newImport, SyntaxGenerator generator,
AddImportPlacementOptions
options,