Exemple #1
0
 public Radio(string Url)
 {
     this.Url = Url;
     OnMetadataChanged += UpdateCurrentSong;
     pluginManager = new PluginManager();
 }
Exemple #2
0
        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;
        }