宜昌华友成品库管理软件
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
630 B

using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel.Channels;
using System.ServiceModel;
namespace SSLMS.Common
{
public class WCFHelper
{
#region Wcf·þÎñ¹¤³§
public static T Create<T>(string url)
{
EndpointAddress address = new EndpointAddress(url);
Binding binding = new BasicHttpBinding(BasicHttpSecurityMode.None);
IChannelFactory<T> factory = binding.BuildChannelFactory<T>(new BindingParameterCollection());
return factory.CreateChannel(address);
}
#endregion
}
}