Example #1
0
 protected BaseLogEntryCollection(IEventDataParser <EventData> eventDataParser, IEventDataParser <EventOffset> eventOffsetParser)
 {
     this.eventDataParser   = eventDataParser;
     this.eventOffsetParser = eventOffsetParser;
     this.logStreams        = new List <string>();
     this.logEntries        = new Dictionary <Guid, LogEntry>();
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MetadataViewPresentationModel"/> class.
 /// </summary>
 /// <param name="configurationService">The configuration service instance.</param>
 /// <param name="eventDataParser">The event data parser instance.</param>
 /// <param name="eventOffsetParser">The event offset parser instance.</param>
 public MetadataViewPresentationModel(IConfigurationService configurationService, IEventDataParser <EventData> eventDataParser, IEventDataParser <EventOffset> eventOffsetParser)
 {
     this.configurationService = configurationService;
     this.eventDataParser      = eventDataParser;
     this.eventOffsetParser    = eventOffsetParser;
     this.SearchCommand        = new DelegateCommand <string>(this.Search);
     this.Metadata             = new ObservableCollection <EventData>();
     this.availableMetadata    = new List <EventData>();
     this.MetadataFilters      = new List <string> {
         "Both", "Play By Play", "Commentary"
     };
     this.SelectedMetadataFilter = this.MetadataFilters[0];
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="MetadataViewPresentationModel"/> class.
        /// </summary>
        /// <param name="configurationService">The configuration service instance.</param>
        /// <param name="eventDataParser">The event data parser instance.</param>
        /// <param name="eventOffsetParser">The event offset parser instance.</param>
        /// <param name="eventAggregator"></param>
        public MetadataViewPresentationModel(IConfigurationService configurationService, IEventDataParser <EventData> eventDataParser, IEventDataParser <EventOffset> eventOffsetParser, IEventAggregator eventAggregator)
        {
            this.configurationService  = configurationService;
            this.eventDataParser       = eventDataParser;
            this.eventOffsetParser     = eventOffsetParser;
            this.eventAggregator       = eventAggregator;
            this.SearchCommand         = new DelegateCommand <string>(this.Search);
            this.KeyboardActionCommand = new DelegateCommand <Tuple <KeyboardAction, object> >(this.ExecuteKeyboardAction);
            this.Metadata          = new ObservableCollection <EventData>();
            this.availableMetadata = new List <EventData>();
            this.MetadataFilters   = new List <string> {
                "Both", "Play By Play", "Commentary"
            };
            this.SelectedMetadataFilter = this.MetadataFilters[0];

            this.eventAggregator.GetEvent <SubClipMediaElementOpenedEvent>().Subscribe(this.SubClipMediaElementOpened);
        }
        public PollingLogEntryCollection(IEventDataParser <EventData> eventDataParser, IEventDataParser <EventOffset> eventDataOffsetParser, IConfigurationService configurationService)
            : base(eventDataParser, eventDataOffsetParser)
        {
            this.configurationService   = configurationService;
            this.markerEntryElementName = this.configurationService.GetParameterValue("LogEntryElementName");
            double?pollingIntervalInSeconds =
                this.configurationService.GetParameterValueAsDouble("LogEntryPollingIntervalInSeconds");

            this.pollingTimer          = new DispatcherTimer();
            this.pollingTimer.Interval = TimeSpan.FromSeconds(pollingIntervalInSeconds.HasValue ? pollingIntervalInSeconds.Value : DefaultPollingIntervalInSeconds);
            this.pollingTimer.Tick    += this.PollingTimerTick;
            this.pollingTimer.Start();
            this.downloadManager = new DownloaderManager();
            this.downloadManager.DownloadCompleted += this.DownloadCompleted;

            string url = this.configurationService.GetParameterValue("LogEntrySourceUrl");

            if (!string.IsNullOrEmpty(url))
            {
                this.markersUrl = new Uri(url);
            }
        }