Plugin Base WebViewPage #22 & Authorization #24

Plugins have a base WebViewPage to inherit, this offers integration with
various Disco services. Plugins can also add Authorization attributes to
their Web Handlers and Controller Methods.
This commit is contained in:
Gary Sharp
2013-10-14 20:13:00 +11:00
parent 4b822d3ae3
commit 9784c5d282
21 changed files with 496 additions and 112 deletions
@@ -34,16 +34,16 @@ namespace Disco.Web.Extensions
{
htmlHelper.RenderPartialCompiledInternal(viewType, model, htmlHelper.ViewContext.Writer);
}
public static MvcHtmlString PartialCompiled(this HtmlHelper htmlHelper, Type viewType)
public static HtmlString PartialCompiled(this HtmlHelper htmlHelper, Type viewType)
{
return PartialCompiled(htmlHelper, viewType, null);
}
public static MvcHtmlString PartialCompiled(this HtmlHelper htmlHelper, Type viewType, object model)
public static HtmlString PartialCompiled(this HtmlHelper htmlHelper, Type viewType, object model)
{
using (StringWriter writer = new StringWriter(CultureInfo.CurrentCulture))
{
htmlHelper.RenderPartialCompiledInternal(viewType, model, writer);
return MvcHtmlString.Create(writer.ToString());
return new HtmlString(writer.ToString());
}
}
#endregion