adds comments, fixes null check.
This commit is contained in:
@@ -2,14 +2,32 @@ using System;
|
||||
|
||||
namespace Umbraco.Cms.Web.Common.ApplicationBuilder
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The context object used during
|
||||
/// </summary>
|
||||
public interface IUmbracoApplicationBuilderContext : IUmbracoApplicationBuilderServices
|
||||
{
|
||||
/// <summary>
|
||||
/// Called to include the core umbraco middleware.
|
||||
/// </summary>
|
||||
void UseUmbracoCoreMiddleware();
|
||||
|
||||
/// <summary>
|
||||
/// Manually runs the <see cref="IUmbracoPipelineFilter"/> pre pipeline filters
|
||||
/// </summary>
|
||||
void RunPrePipeline();
|
||||
|
||||
/// <summary>
|
||||
/// Manually runs the <see cref="IUmbracoPipelineFilter "/> post pipeline filters
|
||||
/// </summary>
|
||||
void RunPostPipeline();
|
||||
|
||||
/// <summary>
|
||||
/// Called to include all of the default umbraco required middleware.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If using this method, there is no need to use <see cref="UseUmbracoCoreMiddleware"/>
|
||||
/// </remarks>
|
||||
void RegisterDefaultRequiredMiddleware();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ using Umbraco.Cms.Core.Services;
|
||||
|
||||
namespace Umbraco.Cms.Web.Common.ApplicationBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// Services used during the Umbraco building phase.
|
||||
/// </summary>
|
||||
public interface IUmbracoApplicationBuilderServices
|
||||
{
|
||||
IApplicationBuilder AppBuilder { get; }
|
||||
|
||||
@@ -9,17 +9,20 @@ using Umbraco.Extensions;
|
||||
namespace Umbraco.Cms.Web.Common.ApplicationBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// A builder to allow encapsulating the enabled endpoints in Umbraco
|
||||
/// A builder used to enable middleware and endpoints required for Umbraco to operate.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This helps to ensure that everything is registered in the correct order.
|
||||
/// </remarks>
|
||||
public class UmbracoApplicationBuilder : IUmbracoApplicationBuilder, IUmbracoEndpointBuilder, IUmbracoApplicationBuilderContext
|
||||
{
|
||||
private readonly IOptions<UmbracoPipelineOptions> _umbracoPipelineStartupOptions;
|
||||
|
||||
public UmbracoApplicationBuilder(IApplicationBuilder appBuilder)
|
||||
{
|
||||
ApplicationServices = appBuilder.ApplicationServices;
|
||||
RuntimeState = appBuilder.ApplicationServices.GetRequiredService<IRuntimeState>();
|
||||
AppBuilder = appBuilder ?? throw new ArgumentNullException(nameof(appBuilder));
|
||||
ApplicationServices = appBuilder.ApplicationServices;
|
||||
RuntimeState = appBuilder.ApplicationServices.GetRequiredService<IRuntimeState>();
|
||||
_umbracoPipelineStartupOptions = ApplicationServices.GetRequiredService<IOptions<UmbracoPipelineOptions>>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user