|
|
@ -11,18 +11,28 @@ using System.Reflection; |
|
|
using Microsoft.AspNetCore.Builder; |
|
|
using Microsoft.AspNetCore.Builder; |
|
|
using Microsoft.Extensions.Configuration; |
|
|
using Microsoft.Extensions.Configuration; |
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
|
|
using Squidex.Domain.Apps.Core; |
|
|
|
|
|
using Squidex.Domain.Apps.Entities; |
|
|
|
|
|
using Squidex.Domain.Apps.Events; |
|
|
|
|
|
using Squidex.Infrastructure; |
|
|
using Squidex.Infrastructure.Log; |
|
|
using Squidex.Infrastructure.Log; |
|
|
using Squidex.Infrastructure.Plugins; |
|
|
using Squidex.Infrastructure.Plugins; |
|
|
|
|
|
using Squidex.Web; |
|
|
|
|
|
|
|
|
namespace Squidex.Pipeline.Plugins |
|
|
namespace Squidex.Pipeline.Plugins |
|
|
{ |
|
|
{ |
|
|
public static class PluginExtensions |
|
|
public static class PluginExtensions |
|
|
{ |
|
|
{ |
|
|
private static readonly AssemblyName[] SharedAssemblies = |
|
|
private static readonly AssemblyName[] SharedAssemblies = new Type[] |
|
|
Assembly.GetEntryAssembly()! |
|
|
{ |
|
|
.GetReferencedAssemblies() |
|
|
typeof(IPlugin), |
|
|
.Where(x => x.Name?.StartsWith("Squidex.", StringComparison.OrdinalIgnoreCase) == true) |
|
|
typeof(SquidexCoreModel), |
|
|
.ToArray(); |
|
|
typeof(SquidexCoreOperations), |
|
|
|
|
|
typeof(SquidexEntities), |
|
|
|
|
|
typeof(SquidexEvents), |
|
|
|
|
|
typeof(SquidexInfrastructure), |
|
|
|
|
|
typeof(SquidexWeb) |
|
|
|
|
|
}.Select(x => x.Assembly.GetName()).ToArray(); |
|
|
|
|
|
|
|
|
public static IMvcBuilder AddSquidexPlugins(this IMvcBuilder mvcBuilder, IConfiguration config) |
|
|
public static IMvcBuilder AddSquidexPlugins(this IMvcBuilder mvcBuilder, IConfiguration config) |
|
|
{ |
|
|
{ |
|
|
|