|  |  | 
 |  |  | 锘縰sing Autofac; | 
 |  |  | using Autofac.Extras.DynamicProxy; | 
 |  |  | using HslCommunication.WebSocket; | 
 |  |  | using Microsoft.Extensions.DependencyModel; | 
 |  |  | using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; | 
 |  |  | using System; | 
 |  |  | 
 |  |  | using WIDESEA_Core.BaseRepository; | 
 |  |  | using WIDESEA_Core.BaseServices; | 
 |  |  | using WIDESEA_Core.Helper; | 
 |  |  | using WIDESEA_Core.LogHelper; | 
 |  |  |  | 
 |  |  | namespace WIDESEA_Core.Extensions | 
 |  |  | { | 
 |  |  | 
 |  |  |             var cacheType = new List<Type>(); | 
 |  |  |  | 
 |  |  |             builder.RegisterType<LogAOP>(); | 
 |  |  |             cacheType.Add(typeof(LogAOP)); | 
 |  |  |  | 
 |  |  |             if (AppSettings.Get("LogAopEnable").ObjToBool()) | 
 |  |  |             { | 
 |  |  |                 cacheType.Add(typeof(LogAOP)); | 
 |  |  |             } | 
 |  |  |              | 
 |  |  |             builder.RegisterGeneric(typeof(RepositoryBase<>)).As(typeof(IRepository<>)).InstancePerDependency();//娉ㄥ唽浠撳偍 | 
 |  |  |             builder.RegisterGeneric(typeof(ServiceBase<,>)).As(typeof(IService<>)).InstancePerDependency();//娉ㄥ唽鏈嶅姟 | 
 |  |  |  | 
 |  |  | 
 |  |  |                .AsImplementedInterfaces() | 
 |  |  |                .InstancePerLifetimeScope() | 
 |  |  |                .PropertiesAutowired(); | 
 |  |  |  | 
 |  |  |             builder.RegisterType<RequestLogModel>().InstancePerLifetimeScope(); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  | } |