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); }
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); }