void GetSequencePointContent(CodeCoverageSequencePoint sp) { if (cacheFileName == sp.Document) { // check primary cache (this.Filename) sp.Content = cacheDocument == null? "" : cacheDocument.GetText(sp); } else { // check & update secondary cache if (cache2FileName == sp.Document) { sp.Content = cache2Document == null? "" : cache2Document.GetText(sp); } else { cache2FileName = sp.Document; cache2Document = GetSource(cache2FileName); sp.Content = cache2Document == null? "" : cache2Document.GetText(sp); } } if (sp.Content != String.Empty) { if (sp.Line != sp.EndLine) { // merge multiple lines to single line sp.Content = Regex.Replace(sp.Content, @"\s+", " "); } // SequencePoint.Length counts all but whitespace sp.Length = Regex.Replace(sp.Content, @"\s", "").Length; } }
void GetSequencePointContent(CodeCoverageSequencePoint sp) { if (cacheFileName == sp.Document) { // check primary cache (this.Filename) sp.Content = cacheDocument == null? "" : cacheDocument.GetText(sp); } else { // check & update secondary cache if (cache2FileName == sp.Document) { sp.Content = cache2Document == null? "" : cache2Document.GetText(sp); } else { cache2FileName = sp.Document; cache2Document = GetSource (cache2FileName); sp.Content = cache2Document == null? "" : cache2Document.GetText(sp); } } if (sp.Content != String.Empty) { if (sp.Line != sp.EndLine) { // merge multiple lines to single line sp.Content = Regex.Replace(sp.Content, @"\s+", " "); } // SequencePoint.Length counts all but whitespace sp.Length = Regex.Replace(sp.Content, @"\s", "").Length; } }