mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-20 00:16:37 +08:00
加入任务调度模块
This commit is contained in:
21
Yi.Framework/Yi.Framework.Common/Helper/AssemblyHelper.cs
Normal file
21
Yi.Framework/Yi.Framework.Common/Helper/AssemblyHelper.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Common.Helper
|
||||
{
|
||||
public class AssemblyHelper
|
||||
{
|
||||
public static List<Type> GetClass(string assemblyFile, string className = null, string spaceName=null)
|
||||
{
|
||||
Assembly assembly = Assembly.Load(assemblyFile);
|
||||
return assembly.GetTypes().Where(m => m.IsClass
|
||||
&& m.Name==null?true:m.Name==className
|
||||
).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user