示例#1
0
        /// <summary>
        /// Produces a pessimistic list of spans that denote the regions of text in this tree that
        /// are changed from the text of the old tree.
        /// </summary>
        /// <param name="oldTree">The old tree. Cannot be <c>null</c>.</param>
        /// <remarks>The list is pessimistic because it may claim more or larger regions than actually changed.</remarks>
        public override IList <TextSpan> GetChangedSpans(SyntaxTree oldTree)
        {
            if (oldTree == null)
            {
                throw new ArgumentNullException(nameof(oldTree));
            }

            return(SyntaxDiffer.GetPossiblyDifferentTextSpans(oldTree, this));
        }
示例#2
0
        /// <summary>
        /// Gets a list of text changes that when applied to the old tree produce this tree.
        /// </summary>
        /// <param name="oldTree">The old tree. Cannot be <c>null</c>.</param>
        /// <remarks>The list of changes may be different than the original changes that produced this tree.</remarks>
        public override IList <TextChange> GetChanges(SyntaxTree oldTree)
        {
            if (oldTree == null)
            {
                throw new ArgumentNullException("oldTree");
            }

            return(SyntaxDiffer.GetTextChanges(oldTree, this));
        }
 /// <summary>
 /// Gets a list of text changes that when applied to the old tree produce this tree.
 /// </summary>
 /// <param name="oldTree">The old tree.</param>
 /// <remarks>The list of changes may be different than the original changes that produced this tree.</remarks>
 public override IList <TextChange> GetChanges(SyntaxTree oldTree)
 {
     return(SyntaxDiffer.GetTextChanges(oldTree, this));
 }
 /// <summary>
 /// Produces a pessimistic list of spans that denote the regions of text in this tree that
 /// are changed from the text of the old tree.
 /// </summary>
 /// <param name="oldTree">The old tree.</param>
 /// <remarks>The list is pessimistic because it may claim more or larger regions than actually changed.</remarks>
 public override IList <TextSpan> GetChangedSpans(SyntaxTree oldTree)
 {
     return(SyntaxDiffer.GetPossiblyDifferentTextSpans(oldTree, this));
 }
示例#5
0
 private static ImmutableArray <TreeChange> ComputeDiff(SyntaxNode before, SyntaxNode after)
 {
     var differ = new SyntaxDiffer(before, after);
 }