本文整理汇总了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));
}
示例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)));
}
示例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));
}
示例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);
}
示例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));
}