Tidy: Sort/remove usings, simplify names
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
using Disco.Models.UI;
|
||||
using Disco.Services.Plugins.Features.UIExtension.Results;
|
||||
@@ -23,11 +19,11 @@ namespace Disco.Services.Plugins.Features.UIExtension
|
||||
}
|
||||
public UIExtensionFeature()
|
||||
{
|
||||
this.plugin = new Lazy<WebHelper>(new Func<WebHelper>(() => {
|
||||
if (this.Context == null)
|
||||
plugin = new Lazy<WebHelper>(new Func<WebHelper>(() => {
|
||||
if (Context == null)
|
||||
throw new InvalidOperationException("The Context property is not initialized");
|
||||
|
||||
return new WebHelper(this.Context.HttpContext, this.Manifest.PluginManifest);
|
||||
return new WebHelper(Context.HttpContext, Manifest.PluginManifest);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -37,36 +33,36 @@ namespace Disco.Services.Plugins.Features.UIExtension
|
||||
|
||||
protected LiteralResult Literal(string Content)
|
||||
{
|
||||
return new LiteralResult(this.Manifest, Content);
|
||||
return new LiteralResult(Manifest, Content);
|
||||
}
|
||||
protected LiteralResult Nothing()
|
||||
{
|
||||
return new LiteralResult(this.Manifest, null);
|
||||
return new LiteralResult(Manifest, null);
|
||||
}
|
||||
protected LiteralResult ScriptInline(string JavaScriptContent)
|
||||
{
|
||||
return new LiteralResult(this.Manifest, string.Concat("<script type=\"text/javascript\">\n//<!--\n", JavaScriptContent, "\n//-->\n</script>"));
|
||||
return new LiteralResult(Manifest, string.Concat("<script type=\"text/javascript\">\n//<!--\n", JavaScriptContent, "\n//-->\n</script>"));
|
||||
}
|
||||
protected PluginResourceScriptResult ScriptResource(string Resource, bool PlaceInPageHead)
|
||||
{
|
||||
return new PluginResourceScriptResult(this.Manifest, Resource, PlaceInPageHead);
|
||||
return new PluginResourceScriptResult(Manifest, Resource, PlaceInPageHead);
|
||||
}
|
||||
protected PluginResourceCssResult CssResource(string Resource)
|
||||
{
|
||||
return new PluginResourceCssResult(this.Manifest, Resource);
|
||||
return new PluginResourceCssResult(Manifest, Resource);
|
||||
}
|
||||
protected MultipleResult Multiple(params UIExtensionResult[] Results)
|
||||
{
|
||||
return new MultipleResult(this.Manifest, Results);
|
||||
return new MultipleResult(Manifest, Results);
|
||||
}
|
||||
[Obsolete("Use: PartialCompiled<ViewType>(dynamic Model)")]
|
||||
protected PrecompiledPartialViewResult Partial(Type PartialViewType, object Model = null)
|
||||
{
|
||||
return new PrecompiledPartialViewResult(this.Manifest, PartialViewType, Model);
|
||||
return new PrecompiledPartialViewResult(Manifest, PartialViewType, Model);
|
||||
}
|
||||
protected PrecompiledPartialViewResult PartialCompiled<ViewType>(dynamic Model = null) where ViewType : WebViewPage
|
||||
{
|
||||
return new PrecompiledPartialViewResult(this.Manifest, typeof(ViewType), Model);
|
||||
return new PrecompiledPartialViewResult(Manifest, typeof(ViewType), Model);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user