From 77017c1168e7e9837a48c661202510ccb5a9f008 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Sun, 24 Mar 2019 13:10:01 +0100 Subject: [PATCH] Ensure that web is shared in plugins. --- src/Squidex.Web/SquidexWeb.cs | 18 ++++++++++++++++++ .../Pipeline/Plugins/PluginExtensions.cs | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/Squidex.Web/SquidexWeb.cs diff --git a/src/Squidex.Web/SquidexWeb.cs b/src/Squidex.Web/SquidexWeb.cs new file mode 100644 index 000000000..a76b688dc --- /dev/null +++ b/src/Squidex.Web/SquidexWeb.cs @@ -0,0 +1,18 @@ +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschränkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== + +using System.Reflection; + +#pragma warning disable RECS0014 // If all fields, properties and methods members are static, the class can be made static. + +namespace Squidex.Infrastructure +{ + public sealed class SquidexInfrastructure + { + public static readonly Assembly Assembly = typeof(SquidexInfrastructure).Assembly; + } +} diff --git a/src/Squidex/Pipeline/Plugins/PluginExtensions.cs b/src/Squidex/Pipeline/Plugins/PluginExtensions.cs index 42a07e18d..986c0c55c 100644 --- a/src/Squidex/Pipeline/Plugins/PluginExtensions.cs +++ b/src/Squidex/Pipeline/Plugins/PluginExtensions.cs @@ -20,6 +20,7 @@ using Squidex.Domain.Apps.Events; using Squidex.Infrastructure; using Squidex.Infrastructure.Log; using Squidex.Infrastructure.Plugins; +using Squidex.Web; namespace Squidex.Pipeline.Plugins { @@ -32,7 +33,8 @@ namespace Squidex.Pipeline.Plugins typeof(SquidexCoreOperations), typeof(SquidexEntities), typeof(SquidexEvents), - typeof(SquidexInfrastructure) + typeof(SquidexInfrastructure), + typeof(SquidexWeb) }; public static IMvcBuilder AddMyPlugins(this IMvcBuilder mvcBuilder, IConfiguration config)