private void Dispose(bool disposing) { if (disposing) { try { if (connectionPoint != null && cookie != 0) { connectionPoint.Unadvise(cookie); } } finally { this.cookie = 0; this.connectionPoint = null; this.cpc = null; } } }
private void Dispose(bool disposing) { ThreadHelper.ThrowIfNotOnUIThread(); if (disposing) { try { if (connectionPoint != null && cookie != 0) { connectionPoint.Unadvise(cookie); } } finally { this.cookie = 0; this.connectionPoint = null; this.cpc = null; } } }