public void SetEnd(int endPosition, TrackingToken endToken, ITextSnapshot snapshot) { if (_startPosition > endPosition) { return; } Scope = new Span(_startPosition, endPosition - _startPosition); Area = new Span(Area.Start, endToken.GetEnd(snapshot) - Area.Start); }
public Block(IBlock parent, BlockType type, TrackingToken start, TrackingToken end, ITextSnapshot snapshot) : this(parent, type, start.GetStart(snapshot), end.GetEnd(snapshot)) { }