ClientAssembly selection criteria changed

This commit is contained in:
Pavel Vesely
2020-05-12 23:17:37 +02:00
parent da73d519d7
commit 4c188b782d
3 changed files with 3 additions and 1 deletions

View File

@ -1,8 +1,10 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Oqtane.Modules;
using Oqtane.Services;
using Oqtane.Shared;
using Oqtane.Themes;
// ReSharper disable once CheckNamespace
namespace System.Reflection
@ -74,7 +76,7 @@ namespace System.Reflection
public static IEnumerable<Assembly> GetOqtaneClientAssemblies(this AppDomain appDomain)
{
return appDomain.GetOqtaneAssemblies()
.Where(a => a.GetTypes<IClientStartup>().Any());
.Where(a => a.GetTypes<IModuleControl>().Any() || a.GetTypes<IThemeControl>().Any() || a.GetTypes<IClientStartup>().Any());
}
}
}

View File

@ -0,0 +1,12 @@
using Oqtane.Shared;
namespace Oqtane.Modules
{
public interface IModuleControl
{
SecurityAccessLevel SecurityAccessLevel { get; } // defines the security access level for this control - defaults to View
string Title { get; } // title to display for this control - defaults to module title
string Actions { get; } // allows for routing by configuration rather than by convention ( comma delimited ) - defaults to using component file name
bool UseAdminContainer { get; } // container for embedding module control - defaults to true
}
}

View File

@ -0,0 +1,7 @@
namespace Oqtane.Themes
{
public interface IThemeControl
{
string Panes { get; } // identifies all panes in a theme ( delimited by ";" ) - assumed to be a layout if no panes specified
}
}