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