Exemple #1
0
        internal static          SerializableHighlightSpan[] Dehydrate(ImmutableArray <HighlightSpan> array)
        {
            var result = new SerializableHighlightSpan[array.Length];
            var index  = 0;

            foreach (var span in array)
            {
                result[index] = Dehydrate(span);
                index++;
            }

            return(result);
        }
Exemple #2
0
 private static SerializableDocumentHighlights Dehydrate(DocumentHighlights highlights)
 => new SerializableDocumentHighlights
 {
     DocumentId     = highlights.Document.Id,
     HighlightSpans = SerializableHighlightSpan.Dehydrate(highlights.HighlightSpans)
 };
Exemple #3
0
 private DocumentHighlights Rehydrate(Solution solution)
 => new DocumentHighlights(solution.GetDocument(DocumentId), SerializableHighlightSpan.Rehydrate(HighlightSpans));