public void UnsubscribeDownload(OnDownloadStopped handler) { try { if (!OnChangeState.GetInvocationList().Contains(handler)) { DownloadStopped -= handler; } } catch (NullReferenceException) { } }
public void UnsubscribeState(OnTorrentChangeState handler) { try { if (!OnChangeState.GetInvocationList().Contains(handler)) { OnChangeState += handler; } } catch (NullReferenceException) { } }