You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
770 B
32 lines
770 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Xml.Linq;
|
|
using FLocal.Common;
|
|
|
|
namespace FLocal.IISHandler.handlers {
|
|
abstract class AbstractGetHandler : ISpecificHandler {
|
|
|
|
abstract protected string templateName {
|
|
get;
|
|
}
|
|
|
|
abstract protected XElement[] getSpecificData(WebContext context);
|
|
|
|
private XDocument getData(WebContext context) {
|
|
return new XDocument(
|
|
new XElement("root",
|
|
new XElement("title", Config.instance.AppInfo),
|
|
context.exportSession(),
|
|
this.getSpecificData(context)
|
|
)
|
|
);
|
|
}
|
|
|
|
public void Handle(WebContext context) {
|
|
context.httpresponse.Write(context.Transform(this.templateName, this.getData(context)));
|
|
}
|
|
|
|
}
|
|
}
|
|
|