public IActionResult Analyse(Guid Id) { var assemblyInfo = _assemblyService.GetById(Id); if (assemblyInfo == null) { return(BadMsg("数据异常!")); } var activator = EngineContext.Resolve <IActivator>(); var metadataProvider = EngineContext.Resolve <IMetadataProvider>(); var domain = activator.CreateDomain(); var assembly = activator.LoadInDomain(assemblyInfo.FileInfo.Path, domain); var services = metadataProvider.GetServices(assembly); foreach (var service in services) { service.Assembly = assemblyInfo; _serviceInfoService.Insert(service); } return(OkMsg()); }