當前位置: 首頁>>代碼示例>>C#>>正文


C# HttpContextBase.XDocument方法代碼示例

本文整理匯總了C#中System.Web.HttpContextBase.XDocument方法的典型用法代碼示例。如果您正苦於以下問題:C# HttpContextBase.XDocument方法的具體用法?C# HttpContextBase.XDocument怎麽用?C# HttpContextBase.XDocument使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Web.HttpContextBase的用法示例。


在下文中一共展示了HttpContextBase.XDocument方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Execute

        public override void Execute(HttpContextBase context)
        {
            var triggerGroups = scheduler.TriggerGroupNames
                .Select(t => new GroupWithStatus(t, scheduler.IsTriggerGroupPaused(t)))
                .ToArray();
            var jobGroups = scheduler.JobGroupNames
                .Select(j => new GroupWithStatus(j, scheduler.IsJobGroupPaused(j)))
                .ToArray();
            var calendars = scheduler.CalendarNames
                .Select(name => Helpers.KV(name, scheduler.GetCalendar(name).Description))
                .ToArray();

            var jobListeners = scheduler.GlobalJobListeners
                .Cast<IJobListener>()
                .Select(j => Helpers.KV(j.Name, j.GetType()))
                .ToArray();

            var triggerListeners = scheduler.GlobalTriggerListeners
                .Cast<ITriggerListener>()
                .Select(j => Helpers.KV(j.Name, j.GetType()))
                .ToArray();

            var view = Views.Views.IndexPage(scheduler, scheduler.GetMetaData(), triggerGroups, jobGroups, calendars, jobListeners, triggerListeners);
            context.XDocument(Helpers.XHTML(view));
        }
開發者ID:wuyansheng37,項目名稱:QuartzNetWebConsole,代碼行數:25,代碼來源:IndexController.cs

示例2: Execute

 public override void Execute(HttpContextBase context)
 {
     var group = context.Request.QueryString["group"];
     var job = context.Request.QueryString["job"];
     var thisUrl = context.Request.RawUrl;
     var triggers = scheduler.GetTriggersOfJob(job, group)
         .Select(t => {
             var state = scheduler.GetTriggerState(t.Name, t.Group);
             return new TriggerWithState(t, state);
         });
     var highlight = context.Request.QueryString["highlight"];
     var m = new TriggersByJobModel(triggers, thisUrl, group, job, highlight);
     context.XDocument(Helpers.XHTML(Views.Views.TriggersByJob(m)));
 }
開發者ID:wuyansheng37,項目名稱:QuartzNetWebConsole,代碼行數:14,代碼來源:TriggersByJobController.cs

示例3: Execute

 public override void Execute(HttpContextBase context)
 {
     var group = context.Request.QueryString["group"];
     var triggerNames = scheduler.GetTriggerNames(group);
     var triggers = triggerNames
         .Select(t => {
             var trigger = scheduler.GetTrigger(t, group);
             var state = scheduler.GetTriggerState(t, group);
             return new TriggerWithState(trigger, state);
         });
     var thisUrl = context.Request.RawUrl;
     var paused = scheduler.IsTriggerGroupPaused(group);
     var highlight = context.Request.QueryString["highlight"];
     var v = Views.Views.TriggerGroup(group, paused, thisUrl, highlight, triggers);
     context.XDocument(Helpers.XHTML(v));
 }
開發者ID:wuyansheng37,項目名稱:QuartzNetWebConsole,代碼行數:16,代碼來源:TriggerGroupController.cs

示例4: Execute

 public override void Execute(HttpContextBase context)
 {
     var qs = context.Request.QueryString;
     var thisUrl = context.Request.Url.ToString().Split('?')[0];
     var pageSize = GetPageSize(qs);
     var pagination = new PaginationInfo {
         FirstItemIndex = GetStartIndex(qs),
         PageSize = pageSize,
         TotalItemCount = logsQ.Count(),
         PageUrl = "log.ashx?start=!0&max=" + pageSize,
     };
     var logs = logsQ.Skip(pagination.FirstItemIndex).Take(pagination.PageSize).ToList();
     var v = GetView(qs.AllKeys);
     var view = v.Value(logs, pagination, thisUrl);
     context.XDocument(view, contentType: v.Key);
 }
開發者ID:wuyansheng37,項目名稱:QuartzNetWebConsole,代碼行數:16,代碼來源:LogController.cs

示例5: Execute

 public override void Execute(HttpContextBase context)
 {
     var group = context.Request.QueryString["group"];
     var jobNames = scheduler.GetJobNames(group);
     var runningJobs = scheduler.GetCurrentlyExecutingJobs().Cast<JobExecutionContext>();
     var jobs = jobNames.Select(j => {
         var job = scheduler.GetJobDetail(j, group);
         var interruptible = typeof (IInterruptableJob).IsAssignableFrom(job.JobType);
         var jobContext = runningJobs.FirstOrDefault(r => r.JobDetail.FullName == job.FullName);
         return new JobWithContext(job, jobContext, interruptible);
     });
     var paused = scheduler.IsJobGroupPaused(group);
     var thisUrl = context.Request.RawUrl;
     var highlight = context.Request.QueryString["highlight"];
     var view = Views.Views.JobGroup(group, paused, highlight, thisUrl, jobs);
     context.XDocument(Helpers.XHTML(view));
 }
開發者ID:wuyansheng37,項目名稱:QuartzNetWebConsole,代碼行數:17,代碼來源:JobGroupController.cs


注:本文中的System.Web.HttpContextBase.XDocument方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。