Exemplo n.º 1
0
        public void Open(IMessagesRangeHost host)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host");
            }

            CheckNotOpen();

            this.host = host;
        }
Exemplo n.º 2
0
        public void Dispose()
        {
            if (host == null)
            {
                return;
            }

            IMessagesRangeHost tmp = host;

            // Zero this.host to indicate that this range is closed (disposed).
            host = null;

            // Notify the host, that this range is asked to be disposed.
            // We have to do that after this range is marked as closed because
            // the host may want to merge this range with others, that need
            // this range to be closed.
            tmp.DisposeRange(this);
        }