public static ProjectionSpanDifference DiffSourceSpans(IDifferenceService diffService, IProjectionSnapshot left, IProjectionSnapshot right) { if (left == null) { throw new ArgumentNullException("left"); } if (right == null) { throw new ArgumentNullException("right"); } if (!object.ReferenceEquals(left.TextBuffer, right.TextBuffer)) { throw new ArgumentException("left does not belong to the same text buffer as right"); } ProjectionSpanDiffer differ = new ProjectionSpanDiffer (diffService, left.GetSourceSpans(), right.GetSourceSpans()); return(new ProjectionSpanDifference(differ.GetDifferences(), differ.InsertedSpans, differ.DeletedSpans)); }
public ProjectionSpanDiffer(IDifferenceService diffService, ReadOnlyCollection <SnapshotSpan> deletedSnapSpans, ReadOnlyCollection <SnapshotSpan> insertedSnapSpans) { this.diffService = diffService; this.inputDeletedSnapSpans = deletedSnapSpans; this.inputInsertedSnapSpans = insertedSnapSpans; }
public DiffController( IDifferenceLeftRepository differenceLeftRepository, IDifferenceRightRepository differenceRightRepository, IDifferenceService differenceService) { _differenceLeftRepository = differenceLeftRepository; _differenceRightRepository = differenceRightRepository; _differenceService = differenceService; }
/// <summary> /// Initializes a new instance of the <see cref="DiffController"/> class. /// </summary> /// <param name="differenceService">The service that implements difference.</param> public DiffController(IDifferenceService differenceService) { _differenceService = differenceService; }
internal ProjectionWorkaroundTagger(IProjectionBuffer projectionBuffer, IDifferenceService diffService) { this.ProjectionBuffer = projectionBuffer; this.diffService = diffService; this.ProjectionBuffer.SourceBuffersChanged += SourceSpansChanged; }
/// <summary> /// Initializes a new instance of the <see cref="DifferenceServiceHost"/> class. /// </summary> /// <param name="differenceService">The service that implements difference.</param> public DifferenceServiceHost(IDifferenceService differenceService) { _differenceService = differenceService; }