示例#1
0
        public static async Task <WebBoolResult> ProcessAsync(IOwinContext context, string channelId, string title, DateTime startTime, DateTime endTime, WebScheduleType scheduleType, int preRecordInterval, int postRecordInterval, string directory, int priority)
        {
            if (!ServiceRegistration.IsRegistered <ITvProvider>())
            {
                throw new BadRequestException("AddScheduleDetailed: ITvProvider not found");
            }

            bool result = await TVAccess.CreateScheduleAsync(context, int.Parse(channelId), title, startTime, endTime, scheduleType, preRecordInterval, postRecordInterval, directory, priority);

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