/// <summary>
        /// Detach the event repeater from the document instance
        /// </summary>
        public void Detach()
        {
            // confirm preconditions
            Debug.Assert(connectionPoint != null);

            // detach and set internal references to null
            connectionPoint.Unadvise(connectionPointCookie);
            connectionPoint = null;
            HtmlDocument    = null;

            _eventCounter.AssertAllEventsAreUnhooked();
        }