Exemplo n.º 1
0
            GetFileRegions(Request request) {
            var context = new BufferContext(request, this._parser);

            var declarationCollector = new GetDirectivesAstVisitor();
            context.ParsedContent.SyntaxTree
                .AcceptVisitor(declarationCollector);

            var regions = declarationCollector.Directives
                .Where(d => d.Type == PreProcessorDirectiveType.Region
                       || d.Type == PreProcessorDirectiveType.Endregion)
                .Select(d => QuickFix.ForFirstLineInRegion
                        (d.GetRegion(), context.Document));

            return new QuickFixResponse(regions);
        }
Exemplo n.º 2
0
        GetFileRegions(Request request)
        {
            var context = new BufferContext(request, this._parser);

            var declarationCollector = new GetDirectivesAstVisitor();

            context.ParsedContent.SyntaxTree
            .AcceptVisitor(declarationCollector);

            var regions = declarationCollector.Directives
                          .Where(d => d.Type == PreProcessorDirectiveType.Region ||
                                 d.Type == PreProcessorDirectiveType.Endregion)
                          .Select(d => QuickFix.ForFirstLineInRegion
                                      (d.GetRegion(), context.Document));

            return(new QuickFixResponse(regions));
        }