Ejemplo n.º 1
0
        /// <summary>
        /// Instantiates a CodeCoverage manager when a textView is created.
        /// </summary>
        /// <param name="textView">The <see cref="IWpfTextView"/> upon which the adornment should be placed</param>
        public void TextViewCreated(IWpfTextView textView)
        {
            DTE dte = (DTE)ServiceProvider.GetService(typeof(DTE));

            // Store this thing somewhere so our GC doesn't incidentally destroy it.
            this.coverage = new CodeCoverage(textView, dte);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Instantiates a CodeCoverage manager when a textView is created.
        /// </summary>
        /// <param name="textView">The <see cref="IWpfTextView"/> upon which the adornment should be placed</param>
        public void TextViewCreated(IWpfTextView textView)
        {
            DTE dte = (DTE)ServiceProvider.GetService(typeof(DTE));

            // Store this thing somewhere so our GC doesn't incidentally destroy it.
            var cover = new CodeCoverage(textView, dte);

            textView.Closed += (object sender, EventArgs e) => {
                cover.Close();
            };
        }