示例#1
0
        private WMSApiAccessor()
        {
            HttpApiConfig config = new HttpApiConfig();

            config.HttpHost = new Uri("http://localhost:23456/hook/wcs/");
            _apiProxy       = HttpApi.Create <IWMSApiProxy>(config);
        }
示例#2
0
        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);
        }
示例#3
0
 public void Dispose()
 {
     _apiProxy = null;
 }