Exemple #1
0
        private static IEnumerable <SourceFileRegion> ExtractRegions(SourceFile sourceFile)
        {
            var sc      = SourceText.From(sourceFile.Content);
            var regions = sc.ExtractRegions(sourceFile.Name).Select(region => new SourceFileRegion(region.id, region.content)).ToArray();

            return(regions);
        }
Exemple #2
0
        private static IEnumerable <SourceFileRegion> ExtractRegions(SourceFile sourceFile)
        {
            var sc      = SourceText.From(sourceFile.Content);
            var regions = sc.ExtractRegions(sourceFile.Name).Select(
                region => new SourceFileRegion(region.bufferId.ToString(), sc.ToString(region.span).FormatSourceCode(sourceFile.Name))).ToArray();

            return(regions);
        }