WSTrustChannelFactory.CreateChannel(EndpointAddress, Uri) 方法

定义

创建 WSTrustChannel 对象,该对象用于通过指定的传输地址将消息发送到位于特定终结点地址的服务。Creates a WSTrustChannel object that is used to send messages to a service at a specific endpoint address through a specified transport address.

public:
 override System::ServiceModel::Security::IWSTrustChannelContract ^ CreateChannel(System::ServiceModel::EndpointAddress ^ address, Uri ^ via);
public override System.ServiceModel.Security.IWSTrustChannelContract CreateChannel (System.ServiceModel.EndpointAddress address, Uri via);
override this.CreateChannel : System.ServiceModel.EndpointAddress * Uri -> System.ServiceModel.Security.IWSTrustChannelContract
Public Overrides Function CreateChannel (address As EndpointAddress, via As Uri) As IWSTrustChannelContract

参数

address
EndpointAddress

提供服务位置的 EndpointAddressThe EndpointAddress that provides the location of the service.

via
Uri

包含通道向其发送消息的传输地址的 UriThe Uri that contains the transport address to which the channel sends messages.

返回

IWSTrustChannelContract

表示新通道的 Contract 对象。A Contract object that represents the new channel.

注解

返回的对象是类的实例 WSTrustChannelThe object returned is an instance of the WSTrustChannel class.

适用于