Exemplo n.º 1
0
        public void Add(DiffTracker other)
        {
            foreach (KeyValuePair <DocumentId, List <DiffSpan> > kvp in other._dic)
            {
                DocumentId documentId = kvp.Key;

                if (TryGetValue(documentId, out List <DiffSpan> spans))
                {
                    foreach (DiffSpan diffSpan in kvp.Value)
                    {
                        AddSpan(diffSpan.Span, diffSpan.Diff, spans);
                    }
                }
                else
                {
                    _dic.Add(documentId, kvp.Value.ToList());
                }
            }
        }
Exemplo n.º 2
0
 internal static TextSpan GetCurrentSpan(TextSpan span, DocumentId documentId, DiffTracker diffTracker)
 {
     return(diffTracker?.GetCurrentSpan(span, documentId) ?? span);
 }