/// <summary> /// Initializes a new instance of the <see cref="BraceTracker"/> class. /// </summary> /// <param name="buffer">The text buffer which is being tracked.</param> /// <param name="commentTracker">The buffer's multi-line comment tracker.</param> public BraceTracker(ITextBuffer buffer, MultiLineCommentTracker commentTracker) : base(buffer) { Contract.Require(commentTracker, nameof(commentTracker)); this.commentTracker = commentTracker; InitializeFromBuffer(); }
/// <summary> /// Initializes a new instance of the <see cref="UvssTextBuffer"/> class. /// </summary> /// <param name="buffer">The text buffer which is wrapped by this object./</param> private UvssTextBuffer(ITextBuffer buffer) { Contract.Require(buffer, nameof(buffer)); this.multiLineCommentTracker = new MultiLineCommentTracker(buffer); this.braceTracker = new BraceTracker(buffer, multiLineCommentTracker); this.Parser = new UvssTextParser(buffer); this.Buffer = buffer; this.Buffer.Changed += Buffer_Changed; }