Post merge fix (conflicts)
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Core.Events;
|
||||
using Umbraco.ModelsBuilder.Embedded.BackOffice;
|
||||
using Umbraco.ModelsBuilder.Embedded.DependencyInjection;
|
||||
@@ -19,11 +17,10 @@ namespace Umbraco.ModelsBuilder.Embedded
|
||||
/// <summary>
|
||||
/// Handles the <see cref="UmbracoApplicationStarting"/> notification to disable MB controller features
|
||||
/// </summary>
|
||||
public Task HandleAsync(UmbracoApplicationStarting notification, CancellationToken cancellationToken)
|
||||
public void Handle(UmbracoApplicationStarting notification)
|
||||
{
|
||||
// disable the embedded dashboard controller
|
||||
_features.Disabled.Controllers.Add<ModelsBuilderDashboardController>();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -8,7 +7,6 @@ using Umbraco.Configuration;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
using Umbraco.Core.Events;
|
||||
using Umbraco.Core.Hosting;
|
||||
using Umbraco.Extensions;
|
||||
using Umbraco.ModelsBuilder.Embedded.Building;
|
||||
using Umbraco.Web.Cache;
|
||||
@@ -52,10 +50,9 @@ namespace Umbraco.ModelsBuilder.Embedded
|
||||
/// <summary>
|
||||
/// Handles the <see cref="UmbracoApplicationStarting"/> notification
|
||||
/// </summary>
|
||||
public Task HandleAsync(UmbracoApplicationStarting notification, CancellationToken cancellationToken)
|
||||
public void Handle(UmbracoApplicationStarting notification)
|
||||
{
|
||||
Install();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private void Install()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Umbraco.Core.Configuration;
|
||||
@@ -47,7 +45,7 @@ namespace Umbraco.ModelsBuilder.Embedded
|
||||
/// <summary>
|
||||
/// Handles the <see cref="UmbracoApplicationStarting"/> notification
|
||||
/// </summary>
|
||||
public Task HandleAsync(UmbracoApplicationStarting notification, CancellationToken cancellationToken)
|
||||
public void Handle(UmbracoApplicationStarting notification)
|
||||
{
|
||||
// always setup the dashboard
|
||||
// note: UmbracoApiController instances are automatically registered
|
||||
@@ -57,14 +55,12 @@ namespace Umbraco.ModelsBuilder.Embedded
|
||||
{
|
||||
FileService.SavingTemplate += FileService_SavingTemplate;
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the <see cref="ServerVariablesParsing"/> notification
|
||||
/// </summary>
|
||||
public Task HandleAsync(ServerVariablesParsing notification, CancellationToken cancellationToken)
|
||||
public void Handle(ServerVariablesParsing notification)
|
||||
{
|
||||
IDictionary<string, object> serverVars = notification.ServerVariables;
|
||||
|
||||
@@ -96,8 +92,6 @@ namespace Umbraco.ModelsBuilder.Embedded
|
||||
|
||||
umbracoUrls["modelsBuilderBaseUrl"] = _linkGenerator.GetUmbracoApiServiceBaseUrl<ModelsBuilderDashboardController>(controller => controller.BuildModels());
|
||||
umbracoPlugins["modelsBuilder"] = GetModelsBuilderSettings();
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private Dictionary<string, object> GetModelsBuilderSettings()
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
@@ -40,10 +38,9 @@ namespace Umbraco.ModelsBuilder.Embedded
|
||||
/// <summary>
|
||||
/// Handles the <see cref="UmbracoApplicationStarting"/> notification
|
||||
/// </summary>
|
||||
public Task HandleAsync(UmbracoApplicationStarting notification, CancellationToken cancellationToken)
|
||||
public void Handle(UmbracoApplicationStarting notification)
|
||||
{
|
||||
Install();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private void Install()
|
||||
|
||||
Reference in New Issue
Block a user