From a38b50675f2cf8e813bd337ca2f9d9456cc421d3 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期四, 17 十月 2024 09:50:14 +0800 Subject: [PATCH] WCS --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs" index 8da6ce0..370e2d5 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs" @@ -2,6 +2,7 @@ using Autofac.Extras.DynamicProxy; using log4net; using Microsoft.Extensions.DependencyModel; +using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; using System; using System.Collections.Generic; using System.Linq; @@ -33,9 +34,9 @@ List<RuntimeLibrary> compilationLibrary = DependencyContext.Default .RuntimeLibraries - .Where(x => !x.Serviceable - && x.Type == "project") + .Where(x => !x.Serviceable && x.Type == "project") .ToList(); + List<Assembly> assemblyList = new List<Assembly>(); foreach (var library in compilationLibrary) { @@ -52,10 +53,22 @@ builder.RegisterAssemblyTypes(assemblyList.ToArray()).Where(x => !x.IsInterface && !x.IsAbstract && baseType.IsAssignableFrom(x)) .AsImplementedInterfaces() .PropertiesAutowired() - .InstancePerDependency(). - EnableInterfaceInterceptors() + .InstancePerDependency() + .EnableInterfaceInterceptors() .InterceptedBy(cacheType.ToArray()); + + foreach (var assembly in assemblyList) + { + foreach (var type in assembly.GetTypes()) + { + if (!type.IsInterface && !type.IsAbstract && baseType.IsAssignableFrom(type)) + { + Console.WriteLine($"娉ㄥ唽绫诲瀷: {type.FullName}"); + } + } + } + builder.RegisterType<UnitOfWorkManage>().As<IUnitOfWorkManage>() .AsImplementedInterfaces() .InstancePerLifetimeScope() -- Gitblit v1.9.3