From 857af7e92eeb911a060f4cf2ee3be7c70d44b321 Mon Sep 17 00:00:00 2001 From: "DESKTOP-G961P6V\\Zhh" <839860190@qq.com> Date: Fri, 17 May 2024 00:11:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ImportLisResultPlugInsBase.cs | 3 +- .../ImportLisResultPlugInsDbBase.cs | 2 +- .../ImportPacsResultPlugInsBase.cs | 4 +- .../LisRequestPlugInsBase.cs | 15 +++++++ .../PlugInsBase.cs | 40 +++++++++++------- .../ThirdPlugInsBase.cs | 20 ++++++++- .../ColumnReferenceAppService.cs | 10 ++--- .../ImportLisResultAppService.cs | 7 +++- .../ImportPacsResultAppService.cs | 5 ++- .../ChargeRequests/ChargeRequestManager.cs | 37 +++++++++-------- .../LisRequests/LisRequestManager.cs | 3 +- .../AppServiceHelper.cs | 41 ++++++++++++++++++- .../Schedulers/ThirdInterfaceWorkerBase.cs | 6 +-- src/Shentun.Utilities/ReflectionHelper.cs | 6 +-- 14 files changed, 147 insertions(+), 52 deletions(-) diff --git a/src/Shentun.ColumnReferencePlugIns/ImportLisResultPlugInsBase.cs b/src/Shentun.ColumnReferencePlugIns/ImportLisResultPlugInsBase.cs index 00cd814..568014f 100644 --- a/src/Shentun.ColumnReferencePlugIns/ImportLisResultPlugInsBase.cs +++ b/src/Shentun.ColumnReferencePlugIns/ImportLisResultPlugInsBase.cs @@ -62,11 +62,12 @@ register_check.patient_register_id = patient_register.id and ( patient_register.complete_flag = '1' or patient_register.complete_flag = '2') and + patient_register.medical_center_id =@MedicalCenterId and lis_request.creation_time > @StartDate ORDER BY register_check.patient_register_id "; var patientRegisterForLisRequests = (await conn.QueryAsync(sql, - new { StartDate = startDate })).ToList(); + new { MedicalCenterId = _thirdInterfaceDto.MedicalCenterId, StartDate = startDate })).ToList(); return patientRegisterForLisRequests; } diff --git a/src/Shentun.ColumnReferencePlugIns/ImportLisResultPlugInsDbBase.cs b/src/Shentun.ColumnReferencePlugIns/ImportLisResultPlugInsDbBase.cs index 7fc849c..fc18b4f 100644 --- a/src/Shentun.ColumnReferencePlugIns/ImportLisResultPlugInsDbBase.cs +++ b/src/Shentun.ColumnReferencePlugIns/ImportLisResultPlugInsDbBase.cs @@ -48,7 +48,7 @@ namespace Shentun.Peis.PlugIns //设置结果,生成小结 - await LoginAsync(); + //await LoginAsync(); var createImportLisResultDtos = new List(); foreach (var lisRequest in lisRequests) { diff --git a/src/Shentun.ColumnReferencePlugIns/ImportPacsResultPlugInsBase.cs b/src/Shentun.ColumnReferencePlugIns/ImportPacsResultPlugInsBase.cs index 1c2e935..d334818 100644 --- a/src/Shentun.ColumnReferencePlugIns/ImportPacsResultPlugInsBase.cs +++ b/src/Shentun.ColumnReferencePlugIns/ImportPacsResultPlugInsBase.cs @@ -1,5 +1,6 @@ using Dapper; using Npgsql; +using Shentun.Peis.ThirdInterfaces; using System; using System.Collections.Generic; using System.Data.Common; @@ -66,12 +67,13 @@ where ( patient_register.complete_flag = '1' or patient_register.complete_flag = '2') and + patient_register.medical_center_id =@MedicalCenterId and patient_register.medical_start_date >@StartDate and register_check.creation_time >@StartDate ORDER BY register_check.patient_register_id "; var patientRegisterForLisRequests = (await conn.QueryAsync(sql, - new { StartDate = startDate })).ToList(); + new { MedicalCenterId = _thirdInterfaceDto.MedicalCenterId, StartDate = startDate })).ToList(); return patientRegisterForLisRequests; } diff --git a/src/Shentun.ColumnReferencePlugIns/LisRequestPlugInsBase.cs b/src/Shentun.ColumnReferencePlugIns/LisRequestPlugInsBase.cs index 4d7ccff..b7da443 100644 --- a/src/Shentun.ColumnReferencePlugIns/LisRequestPlugInsBase.cs +++ b/src/Shentun.ColumnReferencePlugIns/LisRequestPlugInsBase.cs @@ -15,6 +15,21 @@ namespace Shentun.Peis.PlugIns { protected Guid AsbitemColumnReferenceId; protected Guid SampleTypeColumnReferenceId; + + public LisRequestPlugInsBase(Guid thirdInterfaceId):base(thirdInterfaceId) + { + var asbitemColumnReferenceIdStr = InterfaceConfig.GetSection("Interface").GetSection("AsbitemColumnReferenceId").Value; + if (!string.IsNullOrWhiteSpace(asbitemColumnReferenceIdStr)) + { + AsbitemColumnReferenceId = new Guid(asbitemColumnReferenceIdStr); + } + var sampleTypeColumnReferenceIdStr = InterfaceConfig.GetSection("Interface").GetSection("SampleTypeColumnReferenceId").Value; + if (!string.IsNullOrWhiteSpace(sampleTypeColumnReferenceIdStr)) + { + SampleTypeColumnReferenceId = new Guid(sampleTypeColumnReferenceIdStr); + } + } + public LisRequestPlugInsBase(string parmValue) : base(parmValue) { diff --git a/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs b/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs index ae6b8cd..10119df 100644 --- a/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs +++ b/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs @@ -21,17 +21,17 @@ namespace Shentun.Peis.PlugIns { public class PlugInsBase { - protected IConfiguration AppConfig; - protected IConfiguration InterfaceConfig; + protected IConfiguration? AppConfig; + protected IConfiguration? InterfaceConfig; protected string? AppConnctionStr; - private string _appBaseAddress; - private static string _accesToken; + private string? _appBaseAddress; + private static string? _accesToken; protected string? SelfUser; protected string? SelfPassword; - protected string InterfaceSql; - protected string InterfaceSqlKeyColumn; - protected string InterfaceDbType; + protected string? InterfaceSql; + protected string? InterfaceSqlKeyColumn; + protected string? InterfaceDbType; protected string? InterfaceConnctionStr; protected string? InterfaceWebApiUrl; @@ -45,12 +45,24 @@ namespace Shentun.Peis.PlugIns { Dapper.DefaultTypeMap.MatchNamesWithUnderscores = true; } + public PlugInsBase() + { + Init(); + } + public PlugInsBase(string parmValue) + { + Init(); + + Init(parmValue); + + } + public void Init() { AppConfig = new ConfigurationBuilder() - .SetBasePath(DirectoryHelper.GetAppDirectory()) // 设置基础路径为当前目录 - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .Build(); + .SetBasePath(DirectoryHelper.GetAppDirectory()) // 设置基础路径为当前目录 + .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) + .Build(); AppConnctionStr = AppConfig.GetSection("ConnectionStrings") .GetSection("Default").Value; _appBaseAddress = AppConfig.GetSection("App") @@ -59,9 +71,11 @@ namespace Shentun.Peis.PlugIns .GetSection("SelfUser").Value; SelfPassword = AppConfig.GetSection("App") .GetSection("SelfPassword").Value; - + } + public void Init(string parmValue) + { var configurationBuilder = new ConfigurationBuilder() - .AddJsonStream(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(parmValue))); + .AddJsonStream(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(parmValue))); InterfaceConfig = configurationBuilder.Build(); InterfaceSql = InterfaceConfig.GetSection("Interface").GetSection("Sql").Value; @@ -98,9 +112,7 @@ namespace Shentun.Peis.PlugIns { UserColumnReferenceId = new Guid(userColumnReferenceIdStr); } - } - protected DbConnection CreateInterfaceDbConnect() { DbConnection conn; diff --git a/src/Shentun.ColumnReferencePlugIns/ThirdPlugInsBase.cs b/src/Shentun.ColumnReferencePlugIns/ThirdPlugInsBase.cs index f45092c..94c6f3e 100644 --- a/src/Shentun.ColumnReferencePlugIns/ThirdPlugInsBase.cs +++ b/src/Shentun.ColumnReferencePlugIns/ThirdPlugInsBase.cs @@ -1,6 +1,7 @@ using Dapper; using Microsoft.Extensions.Configuration; using Npgsql; +using Shentun.Peis.ThirdInterfaces; using Shentun.Utilities; using System; using System.Collections.Generic; @@ -13,7 +14,24 @@ namespace Shentun.Peis.PlugIns { public class ThirdPlugInsBase: PlugInsBase { - + //private Guid _thirdInterfaceId; + protected ThirdInterfaceDto _thirdInterfaceDto; + public ThirdPlugInsBase(Guid thirdInterfaceId):base() + { + + using (DbConnection conn = new NpgsqlConnection(AppConnctionStr)) + { + string sql; + sql = @" + SELECT * + from third_interface + where id =@ThirdInterfaceId + "; + _thirdInterfaceDto = ( conn.Query(sql, + new { ThirdInterfaceId = thirdInterfaceId })).Single(); + Init(_thirdInterfaceDto.ParmValue); + } + } public ThirdPlugInsBase(string parmValue):base(parmValue) { diff --git a/src/Shentun.Peis.Application/ColumnReferences/ColumnReferenceAppService.cs b/src/Shentun.Peis.Application/ColumnReferences/ColumnReferenceAppService.cs index a039e0c..5630f0d 100644 --- a/src/Shentun.Peis.Application/ColumnReferences/ColumnReferenceAppService.cs +++ b/src/Shentun.Peis.Application/ColumnReferences/ColumnReferenceAppService.cs @@ -248,7 +248,7 @@ namespace Shentun.Peis.ColumnReferences var config = configurationBuilder.Build(); var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; var className = config.GetSection("Interface").GetSection("ClassName").Value; - var list = await ReflectionHelper.InvokeAsync>(assemblyName, className, parmValue, "GetAppColumns"); + var list = await ReflectionHelper.InvokeAsync>(assemblyName, className, [parmValue], "GetAppColumns"); return list; @@ -272,7 +272,7 @@ namespace Shentun.Peis.ColumnReferences var config = configurationBuilder.Build(); var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; var className = config.GetSection("Interface").GetSection("ClassName").Value; - var list = await ReflectionHelper.InvokeAsync>(assemblyName, className, parmValue, "GetInterfaceColumns"); + var list = await ReflectionHelper.InvokeAsync>(assemblyName, className, [parmValue], "GetInterfaceColumns"); return list; } @@ -293,7 +293,7 @@ namespace Shentun.Peis.ColumnReferences var config = configurationBuilder.Build(); var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; var className = config.GetSection("Interface").GetSection("ClassName").Value; - var list = await ReflectionHelper.InvokeAsync >(assemblyName, className, parmValue, "GetAppCodeValuesAsync"); + var list = await ReflectionHelper.InvokeAsync >(assemblyName, className, [parmValue], "GetAppCodeValuesAsync"); return list; } @@ -317,7 +317,7 @@ namespace Shentun.Peis.ColumnReferences var config = configurationBuilder.Build(); var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; var className = config.GetSection("Interface").GetSection("ClassName").Value; - var list = await ReflectionHelper.InvokeAsync>(assemblyName, className, parmValue, "GetInterfaceCodeValuesAsync"); + var list = await ReflectionHelper.InvokeAsync>(assemblyName, className, [parmValue], "GetInterfaceCodeValuesAsync"); @@ -345,7 +345,7 @@ namespace Shentun.Peis.ColumnReferences var config = configurationBuilder.Build(); var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; var className = config.GetSection("Interface").GetSection("ClassName").Value; - var list = await ReflectionHelper.InvokeAsync>(assemblyName, className, parmValue, "GetInterfaceCodeValuesAsync"); + var list = await ReflectionHelper.InvokeAsync>(assemblyName, className, [parmValue], "GetInterfaceCodeValuesAsync"); var result = new List(); foreach ( var item in items) { diff --git a/src/Shentun.Peis.Application/ImportLisResults/ImportLisResultAppService.cs b/src/Shentun.Peis.Application/ImportLisResults/ImportLisResultAppService.cs index 7b23026..a4e1edc 100644 --- a/src/Shentun.Peis.Application/ImportLisResults/ImportLisResultAppService.cs +++ b/src/Shentun.Peis.Application/ImportLisResults/ImportLisResultAppService.cs @@ -287,8 +287,10 @@ namespace Shentun.Peis.ImportLisResults [HttpPost("api/app/ImportLisResult/ImportResultByPatientRegisterId")] public async Task ImportResultByPatientRegisterIdAsync(PatientRegisterIdInputDto input) { + var patientRegister = await _patientRegisterRepository.GetAsync(input.PatientRegisterId); var thirdInterfaces = await _thirdInterfaceRepository.GetListAsync(o => - o.ThirdInterfaceType == ThirdInterfaceTypeFlag.ImportLisResult + o.ThirdInterfaceType == ThirdInterfaceTypeFlag.ImportLisResult + && o.MedicalCenterId == patientRegister.MedicalCenterId && o.IsActive == 'Y'); foreach (var thirdInterface in thirdInterfaces) { @@ -299,7 +301,8 @@ namespace Shentun.Peis.ImportLisResults var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; var className = config.GetSection("Interface").GetSection("ClassName").Value; object[] objects = new object[] { input.PatientRegisterId }; - var pluginsOut = await Utilities.ReflectionHelper.InvokeAsync(assemblyName, className, parmValue, "ImportResultByPatientRegisterIdAsync", objects); + var pluginsOut = await Utilities.ReflectionHelper.InvokeAsync(assemblyName, + className, [thirdInterface.Id], "ImportResultByPatientRegisterIdAsync", objects); } } diff --git a/src/Shentun.Peis.Application/ImportPacsResults/ImportPacsResultAppService.cs b/src/Shentun.Peis.Application/ImportPacsResults/ImportPacsResultAppService.cs index 1e07c2e..2b0e450 100644 --- a/src/Shentun.Peis.Application/ImportPacsResults/ImportPacsResultAppService.cs +++ b/src/Shentun.Peis.Application/ImportPacsResults/ImportPacsResultAppService.cs @@ -312,8 +312,10 @@ namespace Shentun.Peis.ImportPacsResults [HttpPost("api/app/ImportPacsResult/ImportResultByPatientRegisterId")] public async Task ImportResultByPatientRegisterIdAsync(PatientRegisterIdInputDto input) { + var patientRegister = await _patientRegisterRepository.GetAsync(input.PatientRegisterId); var thirdInterfaces = await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType == ThirdInterfaceTypeFlag.ImportPacsResult + && o.MedicalCenterId == patientRegister.MedicalCenterId && o.IsActive == 'Y'); foreach (var thirdInterface in thirdInterfaces) { @@ -324,7 +326,8 @@ namespace Shentun.Peis.ImportPacsResults var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; var className = config.GetSection("Interface").GetSection("ClassName").Value; object[] objects = new object[] { input.PatientRegisterId }; - var pluginsOut = await Utilities.ReflectionHelper.InvokeAsync(assemblyName, className, parmValue, "ImportResultByPatientRegisterIdAsync", objects); + var pluginsOut = await Utilities.ReflectionHelper.InvokeAsync(assemblyName, + className, [thirdInterface.Id], "ImportResultByPatientRegisterIdAsync", objects); } } diff --git a/src/Shentun.Peis.Domain/ChargeRequests/ChargeRequestManager.cs b/src/Shentun.Peis.Domain/ChargeRequests/ChargeRequestManager.cs index 85fba08..435bafb 100644 --- a/src/Shentun.Peis.Domain/ChargeRequests/ChargeRequestManager.cs +++ b/src/Shentun.Peis.Domain/ChargeRequests/ChargeRequestManager.cs @@ -67,25 +67,25 @@ namespace Shentun.Peis.ChargeRequests public async Task SendThirChargeRequestAsync(Guid id,string funName) { - //var patientRegisterEntity = (from patientRegister in await _patientRegisterRepository.GetQueryableAsync() - // join registerCheck in await _registerCheckRepository.GetQueryableAsync() - // on patientRegister.Id equals registerCheck.PatientRegisterId - // join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync() - // on registerCheck.Id equals registerCheckAsbitem.RegisterCheckId - // join chargeRequest in await _repository.GetQueryableAsync() - // on registerCheckAsbitem.LisRequestId equals chargeRequest.Id - // where chargeRequest.Id == id - // select new - // { - // patientRegister - // }).ToList().FirstOrDefault(); - //if (patientRegisterEntity == null) - //{ - // return; - //} + var patientRegisterEntity = (from patientRegister in await _patientRegisterRepository.GetQueryableAsync() + join registerCheck in await _registerCheckRepository.GetQueryableAsync() + on patientRegister.Id equals registerCheck.PatientRegisterId + join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync() + on registerCheck.Id equals registerCheckAsbitem.RegisterCheckId + join chargeRequest in await _repository.GetQueryableAsync() + on registerCheckAsbitem.ChargeRequestId equals chargeRequest.Id + where chargeRequest.Id == id + select new + { + patientRegister + }).ToList().FirstOrDefault(); + if (patientRegisterEntity == null) + { + return; + } var thirdInterfaces = (await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType == ThirdInterfaceTypeFlag.ChargeRequest - )) + && o.MedicalCenterId == patientRegisterEntity.patientRegister.MedicalCenterId)) .OrderBy(o => o.DisplayOrder).ToList(); foreach (var thirdInterface in thirdInterfaces) { @@ -101,7 +101,8 @@ namespace Shentun.Peis.ChargeRequests var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; var className = config.GetSection("Interface").GetSection("ClassName").Value; object[] objects = new object[] { chargeRequestPlugInsInput }; - var chargeRequestPluginsOut = await ReflectionHelper.InvokeAsync(assemblyName, className, parmValue, funName, objects); + var chargeRequestPluginsOut = await ReflectionHelper.InvokeAsync(assemblyName, + className, [thirdInterface.Id], funName, objects); } } diff --git a/src/Shentun.Peis.Domain/LisRequests/LisRequestManager.cs b/src/Shentun.Peis.Domain/LisRequests/LisRequestManager.cs index 7cdabc7..71f81c2 100644 --- a/src/Shentun.Peis.Domain/LisRequests/LisRequestManager.cs +++ b/src/Shentun.Peis.Domain/LisRequests/LisRequestManager.cs @@ -359,7 +359,8 @@ namespace Shentun.Peis.LisRequests var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; var className = config.GetSection("Interface").GetSection("ClassName").Value; object[] objects = new object[] { lisRequestPluginsInput }; - var LisRequestPluginsOut = await ReflectionHelper.InvokeAsync(assemblyName, className, parmValue, "SendRequestAsync", objects); + var LisRequestPluginsOut = await ReflectionHelper.InvokeAsync(assemblyName, + className, [thirdInterface.Id], "SendRequestAsync", objects); } } diff --git a/src/Shentun.Peis.HttpApi.Host/AppServiceHelper.cs b/src/Shentun.Peis.HttpApi.Host/AppServiceHelper.cs index 241c134..3170a0d 100644 --- a/src/Shentun.Peis.HttpApi.Host/AppServiceHelper.cs +++ b/src/Shentun.Peis.HttpApi.Host/AppServiceHelper.cs @@ -7,6 +7,8 @@ using System.Net.Http; using System.Threading.Tasks; using System; using Newtonsoft.Json.Converters; +using System.IdentityModel.Tokens.Jwt; +using System.Linq; namespace Shentun.Peis { @@ -14,7 +16,7 @@ namespace Shentun.Peis { protected IConfiguration AppConfig; private string _appBaseAddress; - private string _accesToken; + private static string _accesToken; private string _selfUser; private string _selfPassword; @@ -35,6 +37,7 @@ namespace Shentun.Peis public async Task CallAppServiceAsync(string url, TInput data) { string baseAddress = _appBaseAddress; + await CheckLoginAsync(); using (var httpClientHandler = new HttpClientHandler()) { using (var httpClient = new HttpClient(httpClientHandler)) @@ -230,5 +233,41 @@ namespace Shentun.Peis } } + private async Task CheckLoginAsync() + { + if (string.IsNullOrWhiteSpace(_accesToken)) + { + await LoginAsync(); + } + else + { + var handler = new JwtSecurityTokenHandler(); + var payload = handler.ReadJwtToken(_accesToken).Payload; + var claims = payload.Claims; + var exp = claims.First(claim => claim.Type == "exp").Value; + if (exp == null) + { + await LoginAsync(); + } + else + { + if (long.TryParse(exp, out var expires)) + { + var expireTime = DateTimeOffset.FromUnixTimeSeconds(expires).LocalDateTime; + if (expireTime <= DateTime.Now) + { + await LoginAsync(); + } + } + else + { + await LoginAsync(); + } + + } + + } + } + } } diff --git a/src/Shentun.Peis.HttpApi.Host/Schedulers/ThirdInterfaceWorkerBase.cs b/src/Shentun.Peis.HttpApi.Host/Schedulers/ThirdInterfaceWorkerBase.cs index 5785e82..53a296b 100644 --- a/src/Shentun.Peis.HttpApi.Host/Schedulers/ThirdInterfaceWorkerBase.cs +++ b/src/Shentun.Peis.HttpApi.Host/Schedulers/ThirdInterfaceWorkerBase.cs @@ -27,7 +27,7 @@ namespace Shentun.Peis.Schedulers { //Logger.LogInformation("Executed" + GetType().Name + "..!"); var appServiceHelper = new AppServiceHelper(); - appServiceHelper.Login(); + //appServiceHelper.Login(); var thirdInterFaceForHostOutDto = appServiceHelper.CallAppService("api/app/ThirdInterface/GetList", null); var thirdInterfaceDto = thirdInterFaceForHostOutDto.Data.Where(o => o.Id == interfaceId).FirstOrDefault(); if (thirdInterfaceDto == null) @@ -57,8 +57,8 @@ namespace Shentun.Peis.Schedulers var assemblyName = interfaceConfig.GetSection("Interface").GetSection("AssemblyName").Value; var className = interfaceConfig.GetSection("Interface").GetSection("ClassName").Value; var funName = "DoWork"; - //object[] objects = new object[] { chargeRequestPlugInsInput }; - ReflectionHelper.Invoke(assemblyName, className, parmValue, funName); + object[] classConstructorArg = new object[] { thirdInterfaceDto.Id }; + ReflectionHelper.Invoke(assemblyName, className, classConstructorArg, funName); } diff --git a/src/Shentun.Utilities/ReflectionHelper.cs b/src/Shentun.Utilities/ReflectionHelper.cs index 26b3e4f..9475074 100644 --- a/src/Shentun.Utilities/ReflectionHelper.cs +++ b/src/Shentun.Utilities/ReflectionHelper.cs @@ -9,7 +9,7 @@ namespace Shentun.Utilities { public class ReflectionHelper { - public static async Task InvokeAsync(string assemblyName, string className, string classConstructorArg, string methodName, object[] args = null) + public static async Task InvokeAsync(string assemblyName, string className, object[] classConstructorArg, string methodName, object[] args = null) { Assembly assembly = Assembly.Load(assemblyName); Type type = assembly.GetType(className); @@ -36,7 +36,7 @@ namespace Shentun.Utilities return returnValue; } - public static async Task InvokeAsync(string assemblyName, string className, string classConstructorArg, string methodName, object[] args = null) + public static async Task InvokeAsync(string assemblyName, string className, object[] classConstructorArg, string methodName, object[] args = null) { Assembly assembly = Assembly.Load(assemblyName); Type type = assembly.GetType(className); @@ -62,7 +62,7 @@ namespace Shentun.Utilities return ; } - public static void Invoke(string assemblyName, string className, string classConstructorArg, string methodName, object[] args = null) + public static void Invoke(string assemblyName, string className, object[] classConstructorArg, string methodName, object[] args = null) { Assembly assembly = Assembly.Load(assemblyName); Type type = assembly.GetType(className);