public StreamProviderManagerAgent(Silo silo, List <IProvider> allSiloProviders)
     : base(Constants.StreamProviderManagerAgentSystemTargetId, silo.SiloAddress)
 {
     logger = LogManager.GetLogger("StreamProviderUpdateAgent", LoggerType.Runtime);
     this.streamProviderManager = (StreamProviderManager)silo.StreamProviderManager;
     providerConfigurations     = silo.GlobalConfig.ProviderConfigurations;
     this.allSiloProviders      = allSiloProviders;
     nonReentrancyGuarantor     = new AsyncSerialExecutor();
 }
Example #2
0
        public StreamProviderManagerAgent(Silo silo, IStreamProviderRuntime streamProviderRuntime, ILoggerFactory loggerFactory)
            : base(Constants.StreamProviderManagerAgentSystemTargetId, silo.SiloAddress, loggerFactory)

        {
            logger = loggerFactory.CreateLogger <StreamProviderManagerAgent>();
            this.streamProviderManager = (StreamProviderManager)silo.StreamProviderManager;
            providerConfigurations     = silo.GlobalConfig.ProviderConfigurations;
            this.streamProviderRuntime = streamProviderRuntime;
            nonReentrancyGuarantor     = new AsyncSerialExecutor();
        }
Example #3
0
        /// <inheritdoc />
        public StreamRef StreamOf(StreamPath path)
        {
            if (path == StreamPath.Empty)
            {
                throw new ArgumentException("Stream path is empty", nameof(path));
            }

            var provider = StreamProviderManager.GetStreamProvider(path.Provider);

            return(new StreamRef(path, provider));
        }
Example #4
0
        public MainViewModel(IInformationProvider infoProvider, IPersistenceManager persistenceManager)
        {
            try
            {
                Title = "Sojurn";

                pm = persistenceManager;
                ip = infoProvider;

                Shows = new CollectionViewSource {
                    Source = shows
                };
                Shows.SortDescriptions.Add(new SortDescription("UnwatchedCount", ListSortDirection.Descending));
                Shows.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));

                TimeLine = new CollectionViewSource {
                    Source = timeLine
                };
                TimeLine.SortDescriptions.Add(new SortDescription("Date", ListSortDirection.Ascending));
                TimeLine.GroupDescriptions.Add(new PropertyGroupDescription("Date"));

                Backlog = new CollectionViewSource {
                    Source = backlog
                };
                Backlog.GroupDescriptions.Add(new PropertyGroupDescription("ShowName"));
                Backlog.SortDescriptions.Add(new SortDescription("ShowName", ListSortDirection.Ascending));
                Backlog.SortDescriptions.Add(new SortDescription("SeasonNumber", ListSortDirection.Ascending));
                Backlog.SortDescriptions.Add(new SortDescription("EpisodeNumberThisSeason", ListSortDirection.Ascending));

                Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();

                spm = new StreamProviderManager();

                StreamProviders = new ObservableCollection <StreamProvider>(spm.StreamProviders);

                BindCommands();
            }
            catch (Exception ex)
            {
                ErrorManager.Log(ex);
            }
        }