public void Open(IMessagesRangeHost host) { if (host == null) { throw new ArgumentNullException("host"); } CheckNotOpen(); this.host = host; }
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); }