Beispiel #1
0
            public void AddRequest(IEnumerable <SDScheduleRequest> scheduleRequest, string stationContext = null,
                                   DateTime?retryTime = null, int priority = 5)
            {
                var splitRequest = splitArray <SDScheduleRequest>(scheduleRequest.ToArray(), config.ScheduleRetrievalItems);

                foreach (var thisSplit in splitRequest)
                {
                    if (thisSplit.Length > 0)
                    {
                        var thisRequest = new SDRequestQueueItem
                        {
                            sdRequestType   = RequestType.SDRequestSchedule,
                            scheduleRequest = thisSplit,
                            retryTimeUtc    = retryTime ?? DateTime.UtcNow,
                            stationContext  = stationContext,
                            priority        = priority
                        };

                        items.Add(thisRequest);
                    }
                }
            }
Beispiel #2
0
            public void AddRequest(string[] programRequest, string stationContext = null,
                                   DateTime?retryTime = null, int priority = 5)
            {
                var splitRequest = splitArray <string>(programRequest, config.ProgrammeRetrievalItems);

                foreach (var thisSplit in splitRequest)
                {
                    if (thisSplit.Length > 0)
                    {
                        var thisRequest = new SDRequestQueueItem
                        {
                            sdRequestType    = RequestType.SDRequestProgramme,
                            programmeRequest = thisSplit,
                            retryTimeUtc     = retryTime ?? DateTime.UtcNow,
                            stationContext   = stationContext,
                            priority         = priority
                        };

                        items.Add(thisRequest);
                    }
                }
            }