当前位置: 首页 > news >正文

万江仿做网站竞价外包

万江仿做网站,竞价外包,花生壳域名还免费吗,网站建设合同书下载此类为扩展注入类,使用autofuc 仅供参考 注入接口和实现。 使用方法: //配置项调用ConfigContainer public void ConfigureContainer(ContainerBuilder builder){TestMicroService.ConfigContainer(builder);} //service调用RegisteApiController …

此类为扩展注入类,使用autofuc 仅供参考

注入接口和实现。

使用方法:

//配置项调用ConfigContainer

public void ConfigureContainer(ContainerBuilder builder){TestMicroService.ConfigContainer(builder);}

//service调用RegisteApiController

public void ConfigureServices(IServiceCollection services){TestMicroService.RegisteApiController(services).AddApiExplorer().AddAuthorization(); }
{public static class TestMicroService{private static readonly string START_PATH = AppContext.BaseDirectory;private static readonly string API_CONTROLLER_PARTTERN = "Test.*.ApiController.dll";private static readonly string SERVICE_INTERFACE_PARTTERN = "Test.*.Service.dll";private static readonly string SERVICE_IMPLEMENT_PARTTERN = "Test.*.ServiceImpl.dll";private static readonly string DAO_INTERFACE_PARTTERN = "Test.*.Dao.dll";private static readonly string DAO_IMPLEMENT_PARTTERN = "Test.*.DaoImpl.dll";public static IMvcCoreBuilder RegisteApiController(IServiceCollection services){Assembly[] apiControllerAssemblies = AssemblyUtils.ListAssemblies(START_PATH, API_CONTROLLER_PARTTERN);return services.AddMvcCore().ConfigureApplicationPartManager(delegate (ApplicationPartManager c){Assembly[] array = apiControllerAssemblies;foreach (Assembly assembly in array){c.ApplicationParts.Add(new AssemblyPart(assembly));}ControllerFeature controllerFeature = new ControllerFeature();c.PopulateFeature(controllerFeature);services.AddSingleton(controllerFeature.Controllers.Select((TypeInfo t) => t.AsType()).ToArray());});}public static void ConfigContainer(this ContainerBuilder builder){Assembly[] array = AssemblyUtils.ListAssemblies(START_PATH, SERVICE_INTERFACE_PARTTERN);Assembly[] array2 = AssemblyUtils.ListAssemblies(START_PATH, SERVICE_IMPLEMENT_PARTTERN);Assembly[] array3 = AssemblyUtils.ListAssemblies(START_PATH, DAO_INTERFACE_PARTTERN);Assembly[] array4 = AssemblyUtils.ListAssemblies(START_PATH, DAO_IMPLEMENT_PARTTERN);if (array.Length != array2.Length || array3.Length != array4.Length){throw new Exception("init error.some service or dao assembly are missing...");}Assembly[] array5 = array2;foreach (Assembly assembly in array5){string interfaceName = assembly.GetName().Name!.Replace("Impl", "");Assembly assembly2 = array.FirstOrDefault((Assembly c) => c.GetName().Name == interfaceName);if (assembly2 != null){(from t in builder.RegisterAssemblyTypes(assembly2, assembly)where t.Name.EndsWith("ServiceImpl")select t).AsImplementedInterfaces();}}array5 = array4;foreach (Assembly assembly3 in array5){string daoInterfaceName = assembly3.GetName().Name!.Replace("Impl", "");Assembly assembly4 = array3.FirstOrDefault((Assembly c) => c.GetName().Name == daoInterfaceName);if (assembly4 != null){(from t in builder.RegisterAssemblyTypes(assembly4, assembly3)where t.Name.EndsWith("DaoImpl")select t).AsImplementedInterfaces();}}}}
}

http://www.hkea.cn/news/507091/

相关文章:

  • wordpress 安卓客户端福建seo优化
  • 襄阳seo技术长沙seo网站优化
  • 做一的同志小说网站做seo要投入什么
  • 网站的文件结构百度搜索排名怎么收费
  • 全景网站app网络营销工具分析
  • 南京建设工程交易中心网站seo是什么的简称
  • 利用vps做网站关键字排名查询
  • 常熟网站制作找哪家好品牌型网站制作价格
  • 怎么做自己网站推广网络广告
  • 化州网站建设促销方法100种
  • 长沙专业网站设计平台新闻最新消息10条
  • 惠州网站建设制作宣传推广方案
  • 宁波网站推广外包服务长岭网站优化公司
  • 哈尔滨市哪里做淘宝网站seo课程心得体会
  • 做网站建设公司企业一个企业该如何进行网络营销
  • 移动端h5网站开发服务企业seo推广
  • 管理公司网站建设引擎搜索优化
  • 上市公司专利查询网站百度广告投放价格
  • html5电商网页制作网站怎么seo关键词排名优化推广
  • 大同网站建设黄冈网站推广优化找哪家
  • 昌邑网站建设站长之家网站排名
  • 建设企业网站的需求分析免费域名
  • 重庆欧勒精细有限公司网站策划书百度竞价推广开户
  • 怎么做一键添加信任网站ios aso优化工具
  • ps做网站的分辨率多少钱苹果cms永久免费建站程序
  • 网站推广积分常用于网站推广的营销手段是
  • wordpress时间云储存沈阳网站制作优化推广
  • h5响应式网站建设竞价托管哪家效果好
  • 企业解决方案参考网站品牌软文营销案例
  • 做淘客要有好的网站上海百度seo