public StdRequest(HttpRequest request) { this.request = request; serviceScanner = GlobalConfig.Instance.ServiceScanner; // 收集参数 parseBatchId(); parseTransportMode(); parseInvocations(); }
public void DefaultConfig(string assembly,ILogFactory factory) { // 首先要设置日志工厂 if (factory != null) { LogFactory = factory; } // Json序列化 JsonSerializer = new NewtonsoftJsonSerializerImpl(); // 服务扫描 ServiceScanner = new AttributeServiceScanner(assembly); // 添加基础类型参数映射 Interceptors.Add(new ExceptionInterceptor()); // 异常捕获 Interceptors.Add(new ParamConvertInterceptor()); // 参数转换 Interceptors.Add(new DownloadInterceptor()); // 下载拦截 }