Пример #1
0
        public static async Task <WebBoolResult> ProcessAsync(IOwinContext context, string scheduleId, string channelId = null, string title = null, DateTime?startTime = null, DateTime?endTime = null, WebScheduleType?scheduleType = null, int?preRecordInterval = null, int?postRecordInterval = null, string directory = null, int?priority = null)
        {
            if (!ServiceRegistration.IsRegistered <ITvProvider>())
            {
                throw new BadRequestException("EditSchedule: ITvProvider not found");
            }

            bool result = await TVAccess.EditScheduleAsync(context, int.Parse(scheduleId),
                                                           channelId != null?int.Parse(channelId) : (int?)null,
                                                           title,
                                                           startTime,
                                                           endTime,
                                                           scheduleType,
                                                           preRecordInterval,
                                                           postRecordInterval,
                                                           directory,
                                                           priority);

            return(new WebBoolResult {
                Result = result
            });
        }