using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Update.WeighTerminalService;
|
|
using System.ServiceModel;
|
|
using Update.Utils;
|
|
using WeighBusiness;
|
|
|
|
namespace Update.WCF_
|
|
{
|
|
public class WeighTerminalClient : WeighTerminalServiceClient
|
|
{
|
|
public WeighTerminalClient()
|
|
: base(new BasicHttpBinding(BasicHttpSecurityMode.None) {
|
|
MaxReceivedMessageSize = 655350,
|
|
MaxBufferSize = 655350
|
|
}, new EndpointAddress(Url))
|
|
{
|
|
}
|
|
|
|
static string Url
|
|
{
|
|
get
|
|
{
|
|
#if DEBUG
|
|
return Config.WeighAddress;
|
|
#else
|
|
string head = Config.SystemIP;
|
|
if (!head.EndsWith("/"))
|
|
head += "/";
|
|
return head + "B2/O/Breed/WeighTerminalService.svc";
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
}
|