3 instantiations of MoveToNamespaceAnalysisResult
Microsoft.CodeAnalysis.Features (3)
MoveToNamespace\AbstractMoveToNamespaceService.cs (2)
109
return new
MoveToNamespaceAnalysisResult
(document, declarationSyntax, namespaceName, namespaces.ToImmutableArray(), MoveToNamespaceAnalysisResult.ContainerType.Namespace);
151
return new
MoveToNamespaceAnalysisResult
(document, namedTypeDeclarationSyntax, GetNamespaceName(container), namespaces.ToImmutableArray(), MoveToNamespaceAnalysisResult.ContainerType.NamedType);
MoveToNamespace\MoveToNamespaceAnalysisResult.cs (1)
13
public static readonly MoveToNamespaceAnalysisResult Invalid =
new
();
25 references to MoveToNamespaceAnalysisResult
Microsoft.CodeAnalysis.Features (25)
MoveToNamespace\AbstractMoveToNamespaceCodeAction.cs (5)
20
MoveToNamespaceAnalysisResult
analysisResult) : CodeActionWithOptions
23
private readonly
MoveToNamespaceAnalysisResult
_moveToNamespaceAnalysisResult = analysisResult;
89
public static AbstractMoveToNamespaceCodeAction Generate(IMoveToNamespaceService changeNamespaceService,
MoveToNamespaceAnalysisResult
analysisResult)
92
MoveToNamespaceAnalysisResult
.ContainerType.NamedType => new MoveTypeToNamespaceCodeAction(changeNamespaceService, analysisResult),
93
MoveToNamespaceAnalysisResult
.ContainerType.Namespace => new MoveItemsToNamespaceCodeAction(changeNamespaceService, analysisResult),
MoveToNamespace\AbstractMoveToNamespaceCodeAction.MoveItemsToNamespaceCodeAction.cs (1)
9
private sealed class MoveItemsToNamespaceCodeAction(IMoveToNamespaceService changeNamespaceService,
MoveToNamespaceAnalysisResult
analysisResult)
MoveToNamespace\AbstractMoveToNamespaceCodeAction.MoveTypeToNamespaceCodeAction.cs (1)
9
private sealed class MoveTypeToNamespaceCodeAction(IMoveToNamespaceService changeNamespaceService,
MoveToNamespaceAnalysisResult
analysisResult)
MoveToNamespace\AbstractMoveToNamespaceService.cs (17)
29
Task<
MoveToNamespaceAnalysisResult
> AnalyzeTypeAtPositionAsync(Document document, int position, CancellationToken cancellationToken);
30
Task<MoveToNamespaceResult> MoveToNamespaceAsync(
MoveToNamespaceAnalysisResult
analysisResult, string targetNamespace, CancellationToken cancellationToken);
59
var
typeAnalysisResult = await AnalyzeTypeAtPositionAsync(document, span.Start, cancellationToken).ConfigureAwait(false);
70
public async Task<
MoveToNamespaceAnalysisResult
> AnalyzeTypeAtPositionAsync(
80
var
moveToNamespaceAnalysisResult = await TryAnalyzeNamespaceAsync(document, node, position, cancellationToken).ConfigureAwait(false);
88
return moveToNamespaceAnalysisResult ??
MoveToNamespaceAnalysisResult
.Invalid;
91
private async Task<
MoveToNamespaceAnalysisResult
> TryAnalyzeNamespaceAsync(
109
return new MoveToNamespaceAnalysisResult(document, declarationSyntax, namespaceName, namespaces.ToImmutableArray(),
MoveToNamespaceAnalysisResult
.ContainerType.Namespace);
113
return
MoveToNamespaceAnalysisResult
.Invalid;
116
private async Task<
MoveToNamespaceAnalysisResult
> TryAnalyzeNamedTypeAsync(
124
return
MoveToNamespaceAnalysisResult
.Invalid;
138
return
MoveToNamespaceAnalysisResult
.Invalid;
151
return new MoveToNamespaceAnalysisResult(document, namedTypeDeclarationSyntax, GetNamespaceName(container), namespaces.ToImmutableArray(),
MoveToNamespaceAnalysisResult
.ContainerType.NamedType);
155
return
MoveToNamespaceAnalysisResult
.Invalid;
168
MoveToNamespaceAnalysisResult
analysisResult,
179
MoveToNamespaceAnalysisResult
.ContainerType.Namespace => MoveItemsInNamespaceAsync(analysisResult.Document, analysisResult.SyntaxNode, targetNamespace, cancellationToken),
180
MoveToNamespaceAnalysisResult
.ContainerType.NamedType => MoveTypeToNamespaceAsync(analysisResult.Document, analysisResult.SyntaxNode, targetNamespace, cancellationToken),
MoveToNamespace\MoveToNamespaceAnalysisResult.cs (1)
13
public static readonly
MoveToNamespaceAnalysisResult
Invalid = new();