| 1234567891011121314151617181920212223 |
- using System.Reflection;
- using Quadarax.Foundation.Core.Object;
- using Quadarax.Foundation.Core.Reflection;
- namespace Quadarax.Foundation.Core.Business.Processor.Task
- {
- internal class TaskExecuteProviderFactory
- {
- public TaskExecuteProviderFactory()
- {
- }
- public ITaskExecuteProvider Create(string providerClass, ITypedArgument[] arguments)
- {
- var type = TypeUtils.GetRemoteType(providerClass);
- if (type == null) throw new Exception($"Cannot find type {providerClass}");
-
- return (ITaskExecuteProvider)Activator.CreateInstance(type, arguments);
- }
- }
- }
|