qol: simplify accessors
This commit is contained in:
@@ -67,7 +67,7 @@ namespace Disco.Services.Plugins.Features.CertificateProvider
|
||||
public CertificateProvidersLog()
|
||||
{
|
||||
}
|
||||
private static void Log(CertificateProvidersLog.EventTypeIds EventTypeId, params object[] Args)
|
||||
private static void Log(EventTypeIds EventTypeId, params object[] Args)
|
||||
{
|
||||
CertificateProvidersLog.Current.Log((int)EventTypeId, Args);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Disco.Services.Plugins.Features.RepairProvider
|
||||
public abstract class RepairProviderFeature : PluginFeature
|
||||
{
|
||||
/// <summary>
|
||||
/// The repairer identifier. Used to link this provider to any <see cref="Disco.Models.Repository.RepairerName"/>. This identifier is used to automatically set the RepairerName when a job is submitted using this plugin.
|
||||
/// The repairer identifier. Used to link this provider to any <see cref="Models.Repository.RepairerName"/>. This identifier is used to automatically set the RepairerName when a job is submitted using this plugin.
|
||||
/// </summary>
|
||||
public abstract string ProviderId { get; }
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Disco.Services.Plugins.Features.RepairProvider
|
||||
/// <summary>
|
||||
/// Called when the plugin should submit the job to the external party.
|
||||
/// </summary>
|
||||
/// <returns>A reference number/identifier from the external party which is stored in <see cref="Disco.Models.Repository.RepairerReference"/></returns>
|
||||
/// <returns>A reference number/identifier from the external party which is stored in <see cref="Models.Repository.RepairerReference"/></returns>
|
||||
public abstract string SubmitJob(DiscoDataContext Database, Job Job, OrganisationAddress Address, User TechUser, string RepairDescription, Dictionary<string, string> ProviderProperties);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Disco.Services.Plugins.Features.UIExtension.Results
|
||||
model = Model;
|
||||
}
|
||||
|
||||
public override void ExecuteResult<T>(System.Web.Mvc.WebViewPage<T> page)
|
||||
public override void ExecuteResult<T>(WebViewPage<T> page)
|
||||
{
|
||||
WebViewPage partialView = Activator.CreateInstance(viewType) as WebViewPage;
|
||||
if (partialView == null)
|
||||
|
||||
@@ -16,15 +16,15 @@ namespace Disco.Services.Plugins
|
||||
#region Model Binding from Controller
|
||||
public static bool TryUpdateModel<TModel>(this Controller controller, TModel model) where TModel : class
|
||||
{
|
||||
return controller.TryUpdateModel<TModel>(model, null, controller.ValueProvider);
|
||||
return controller.TryUpdateModel(model, null, controller.ValueProvider);
|
||||
}
|
||||
public static bool TryUpdateModel<TModel>(this Controller controller, TModel model, IValueProvider valueProvider) where TModel : class
|
||||
{
|
||||
return controller.TryUpdateModel<TModel>(model, null, valueProvider);
|
||||
return controller.TryUpdateModel(model, null, valueProvider);
|
||||
}
|
||||
public static bool TryUpdateModel<TModel>(this Controller controller, TModel model, string prefix) where TModel : class
|
||||
{
|
||||
return controller.TryUpdateModel<TModel>(model, prefix, controller.ValueProvider);
|
||||
return controller.TryUpdateModel(model, prefix, controller.ValueProvider);
|
||||
}
|
||||
public static bool TryUpdateModel<TModel>(this Controller controller, TModel model, string prefix, IValueProvider valueProvider) where TModel : class
|
||||
{
|
||||
@@ -250,7 +250,7 @@ namespace Disco.Services.Plugins
|
||||
private static MvcForm FormHelper<T>(this WebViewPage<T> ViewPage, string formAction, FormMethod method, IDictionary<string, object> htmlAttributes)
|
||||
{
|
||||
TagBuilder builder = new TagBuilder("form");
|
||||
builder.MergeAttributes<string, object>(htmlAttributes);
|
||||
builder.MergeAttributes(htmlAttributes);
|
||||
builder.MergeAttribute("action", formAction);
|
||||
builder.MergeAttribute("method", HtmlHelper.GetFormMethodString(method), true);
|
||||
bool flag = ViewPage.ViewContext.ClientValidationEnabled && !ViewPage.ViewContext.UnobtrusiveJavaScriptEnabled;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Disco.Services.Plugins
|
||||
{
|
||||
public abstract class PluginWebViewPage<T> : Disco.Services.Web.WebViewPage<T>
|
||||
public abstract class PluginWebViewPage<T> : Web.WebViewPage<T>
|
||||
{
|
||||
private Lazy<WebPageHelper<T>> _plugin;
|
||||
|
||||
|
||||
@@ -176,10 +176,10 @@ namespace Disco.Services.Plugins
|
||||
Log(WarningOrMessage, LogData);
|
||||
}
|
||||
|
||||
protected override List<Logging.Models.LogEventType> LoadEventTypes()
|
||||
protected override List<LogEventType> LoadEventTypes()
|
||||
{
|
||||
return new System.Collections.Generic.List<LogEventType>
|
||||
{
|
||||
return new List<LogEventType>
|
||||
{
|
||||
new LogEventType
|
||||
{
|
||||
Id = (int)EventTypeIds.InitializingPlugins,
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Disco.Services.Plugins
|
||||
|
||||
public HtmlString PartialCompiled<ViewType>(object Model) where ViewType : WebViewPage
|
||||
{
|
||||
using (System.IO.StringWriter writer = new StringWriter(CultureInfo.CurrentCulture))
|
||||
using (StringWriter writer = new StringWriter(CultureInfo.CurrentCulture))
|
||||
{
|
||||
RenderPartialCompiled<ViewType>(writer, Model);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user