public void Dispose()
        {
            ServiceManager.Get <DBusCommandService> ().ArgumentPushed -= OnCommandLineArgument;
            actions.Dispose();
            lastfm_source.ClearChildSources();

            actions = null;
        }
        private bool ServiceStartup()
        {
            if (lastfm_source != null)
            {
                return(true);
            }

            foreach (var src in ServiceManager.SourceManager.FindSources <LastfmSource> ())
            {
                lastfm_source = src;
                break;
            }

            if (lastfm_source == null)
            {
                return(false);
            }

            lastfm_source.ClearChildSources();
            lastfm_source.SetChildSortTypes(station_sort_types);
            //lastfm_source.PauseSorting ();
            foreach (StationSource child in StationSource.LoadAll(lastfm_source, lastfm_source.Account.UserName))
            {
                lastfm_source.AddChildSource(child);
            }
            //lastfm_source.ResumeSorting ();
            lastfm_source.SortChildSources();
            lastfm_source.Properties.SetString("ActiveSourceUIResource", "ActiveSourceUI.xml");
            lastfm_source.Properties.Set <bool> ("ActiveSourceUIResourcePropagate", true);
            lastfm_source.Properties.Set <System.Reflection.Assembly> ("ActiveSourceUIResource.Assembly", typeof(StationSource).Assembly);
            lastfm_source.Properties.SetString("SortChildrenActionLabel", Catalog.GetString("Sort Stations by"));

            actions = new LastfmStreamingActions(lastfm_source);

            return(true);
        }