update
This commit is contained in:
parent
6976bc645e
commit
8a50a5eb81
@ -12,7 +12,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
{
|
||||
public static class DependencyInjectionExtensions
|
||||
{
|
||||
public static void ServiceRegister(this IServiceCollection services,params Assembly[] assemblies)
|
||||
public static void ServiceRegister(this IServiceCollection services, params Assembly[] assemblies)
|
||||
{
|
||||
if (assemblies.Length <= 0)
|
||||
{
|
||||
@ -61,7 +61,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
}
|
||||
}
|
||||
|
||||
public static void PluginServiceRegister(this IServiceCollection services,string pluginPath="")
|
||||
public static void PluginServiceRegister(this IServiceCollection services, string pluginPath = "")
|
||||
{
|
||||
if (pluginPath.IsNullOrWhiteSpace())
|
||||
{
|
||||
@ -74,6 +74,8 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
public static IEnumerable<Assembly> GetAssembliesFromFolder(string folderPath)
|
||||
{
|
||||
var directory = new DirectoryInfo(folderPath);
|
||||
if (!directory.Exists) return Enumerable.Empty<Assembly>();
|
||||
|
||||
var files = directory.GetFiles("*.dll");
|
||||
|
||||
var assemblies = new List<Assembly>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user