An alternative to UBB.threads
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.
 
 
 
 
FLocal/FLocal.IISHandler/handlers/response/AbstractNewMessageHandler.cs

27 lines
1.0 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Web.Core;
using FLocal.Common;
namespace FLocal.IISHandler.handlers.response {
abstract class AbstractNewMessageHandler<TUrl> : AbstractGetHandler<TUrl> where TUrl : FLocal.Common.URL.AbstractUrl {
abstract protected IEnumerable<XElement> getSpecificNewMessageData(WebContext context);
protected override IEnumerable<XElement> getSpecificData(WebContext context) {
var result = new List<XElement>();
if(context.httprequest.Form.AllKeys.Contains("title")) {
result.Add(new XElement("newTitle", context.httprequest.Form["title"]));
}
if(context.httprequest.Form.AllKeys.Contains("Body")) {
result.Add(new XElement("bodyUBB", context.httprequest.Form["Body"]));
result.Add(new XElement("bodyIntermediate", context.outputParams.preprocessBodyIntermediate(UBBParser.UBBToIntermediate(context.httprequest.Form["Body"]))));
}
return result.Concat(this.getSpecificNewMessageData(context));
}
}
}