1
This commit is contained in:
@@ -24,6 +24,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Natasha.CSharp;
|
||||
using Spire.Pdf.Widget;
|
||||
using Tnb.Common.Extension;
|
||||
using Tnb.WarehouseMgr.Entities.Attributes;
|
||||
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||
@@ -46,7 +47,7 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
_timedFuncMap = App.EffectiveTypes.AsParallel().Where(t => !t.Namespace.IsNullOrWhiteSpace() && t.Namespace.Contains("Tnb.WarehouseMgr")).SelectMany(t => t.GetMethods())
|
||||
_timedFuncMap = App.EffectiveTypes.AsParallel().Where(t => !t.Namespace.IsNullOrWhiteSpace() && t.Namespace.Equals("Tnb.WarehouseMgr", StringComparison.OrdinalIgnoreCase)).SelectMany(t => t.GetMethods())
|
||||
.Where(m => m.GetCustomAttribute<TimedAttribute>() != null)
|
||||
.ToDictionary(x => x.Name, x =>
|
||||
(Func<CancellationTokenSource?, Task>)Delegate.CreateDelegate(typeof(Func<CancellationTokenSource?, Task>), App.GetService(x.DeclaringType), x));
|
||||
|
||||
Reference in New Issue
Block a user