private WMSApiAccessor() { HttpApiConfig config = new HttpApiConfig(); config.HttpHost = new Uri("http://localhost:23456/hook/wcs/"); _apiProxy = HttpApi.Create <IWMSApiProxy>(config); }
public WMSBaseApiAccessor(Wms_warehouse warehouse, ISqlSugarClient client, SysUserDto userDto) { this.Warehouse = warehouse; HttpApiConfig config = new HttpApiConfig(); config.HttpHost = new Uri(warehouse.IFAddress); if (!string.IsNullOrWhiteSpace(WMSProxy)) { config.HttpHandler.UseProxy = true; config.HttpHandler.Proxy = new HttpProxy(WMSProxy); WebRequest.DefaultWebProxy = new WebProxy(WMSProxy) { BypassProxyOnLocal = false }; } _apiProxy = HttpApi.Create <IWMSApiProxy>(config); _selfAccessor = new SelfWMSBaseApiAccessor(warehouse, client, userDto); }
public void Dispose() { _apiProxy = null; }