public virtual void Dispose() { if (this.Id == 0) { return; } this.service.Remove(this.Id); this.Id = 0; } }
public void RemoveChannel(long channelId) { AChannel channel = this.service?.GetChannel(channelId); if (channel == null) { return; } this.service.Remove(channelId); channel.Dispose(); }