public Radio(string Url) { this.Url = Url; OnMetadataChanged += UpdateCurrentSong; pluginManager = new PluginManager(); }
public void Dispose() { // Thread-safe single disposal if (Interlocked.Exchange(ref _disposed, (IntPtr)1) != IntPtr.Zero) return; Running = false; OnCurrentSongChanged -= pluginManager.OnCurrentSongChanged; OnStreamUpdate -= pluginManager.OnStreamUpdate; OnStreamOver -= pluginManager.OnStreamOver; pluginManager.Dispose(); pluginManager = null; OnMessageLogged = null; }