예제 #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);
        }
예제 #2
0
 private static SerializableDocumentHighlights Dehydrate(DocumentHighlights highlights)
 => new SerializableDocumentHighlights
 {
     DocumentId     = highlights.Document.Id,
     HighlightSpans = SerializableHighlightSpan.Dehydrate(highlights.HighlightSpans)
 };
예제 #3
0
 private DocumentHighlights Rehydrate(Solution solution)
 => new DocumentHighlights(solution.GetDocument(DocumentId), SerializableHighlightSpan.Rehydrate(HighlightSpans));