//Type type = Type.GetType("Domain.Entitiy." + item.Name);
//object handler = Activator.CreateInstance(type);
//Func<string, QueryStoresOutput> hook = o => ((dynamic)handler).QueryStore((dynamic)o);
//var res = hook(cityCode);
Type type = Type.GetType("Domain.Entitiy." + item.Name);
object handler = Activator.CreateInstance(type);
Func<BusinessSystemSubmitInputModel, QuoteSnapshot> hook =
o => ((dynamic)handler).GetQuote((dynamic)o);
var res = hook(model);
Action<object> hook = message => ((dynamic)handler).HandleMessage((dynamic)message);
时间: 2024-10-29 19:08:18