Ejemplo n.º 1
0
 /// <summary>
 /// 代理描述
 /// </summary>
 /// <param name="proxyType">代理类型</param>
 /// <param name="apiMethods">接口声明的api方法</param>
 /// <exception cref="ArgumentNullException"></exception>
 private HttpApiProxy(Type proxyType, MethodInfo[] apiMethods)
 {
     this.ProxyType    = proxyType ?? throw new ArgumentNullException(nameof(proxyType));
     this.ApiMethods   = apiMethods ?? throw new ArgumentNullException(nameof(apiMethods));
     this.proxyFactory = Lambda.CreateCtorFunc <IApiInterceptor, MethodInfo[], HttpApi>(proxyType);
 }