Exemplo n.º 1
0
 public ExtractInterfaceCodeAction(
     AbstractExtractInterfaceService extractInterfaceService,
     ExtractInterfaceTypeAnalysisResult typeAnalysisResult
     )
 {
     _extractInterfaceService = extractInterfaceService;
     _typeAnalysisResult      = typeAnalysisResult;
 }
Exemplo n.º 2
0
 public ExtractInterfaceTypeAnalysisResult(
     AbstractExtractInterfaceService extractInterfaceService,
     Document documentToExtractFrom,
     SyntaxNode typeNode,
     INamedTypeSymbol typeToExtractFrom,
     IEnumerable <ISymbol> extractableMembers)
 {
     CanExtractInterface   = true;
     DocumentToExtractFrom = documentToExtractFrom;
     TypeNode           = typeNode;
     TypeToExtractFrom  = typeToExtractFrom;
     ExtractableMembers = extractableMembers;
 }
Exemplo n.º 3
0
        public override object GetOptions(CancellationToken cancellationToken)
        {
            var containingNamespaceDisplay = _typeAnalysisResult.TypeToExtractFrom.ContainingNamespace.IsGlobalNamespace
                ? string.Empty
                : _typeAnalysisResult.TypeToExtractFrom.ContainingNamespace.ToDisplayString();

            return(AbstractExtractInterfaceService.GetExtractInterfaceOptionsAsync(
                       _typeAnalysisResult.DocumentToExtractFrom,
                       _typeAnalysisResult.TypeToExtractFrom,
                       _typeAnalysisResult.ExtractableMembers,
                       containingNamespaceDisplay,
                       cancellationToken).WaitAndGetResult_CanCallOnBackground(cancellationToken));
        }
 public ExtractInterfaceTypeAnalysisResult(
     AbstractExtractInterfaceService extractInterfaceService,
     Document documentToExtractFrom,
     SyntaxNode typeNode,
     INamedTypeSymbol typeToExtractFrom,
     IEnumerable<ISymbol> extractableMembers)
 {
     this.CanExtractInterface = true;
     this.DocumentToExtractFrom = documentToExtractFrom;
     this.TypeNode = typeNode;
     this.TypeToExtractFrom = typeToExtractFrom;
     this.ExtractableMembers = extractableMembers;
 }
 public ExtractInterfaceCodeAction(AbstractExtractInterfaceService extractInterfaceService, ExtractInterfaceTypeAnalysisResult typeAnalysisResult)
 {
     _extractInterfaceService = extractInterfaceService;
     _typeAnalysisResult = typeAnalysisResult;
 }