IOutputChannel.Via 属性

定义

获取 URI,该 URI 包含输出通道发送消息的目标传输地址。Gets the URI that contains the transport address to which messages are sent on the output channel.

public:
 property Uri ^ Via { Uri ^ get(); };
public Uri Via { get; }
member this.Via : Uri
Public ReadOnly Property Via As Uri

属性值

Uri

Uri,包含输出通道发送消息的目标传输地址。The Uri that contains the transport address to which messages are sent on the output channel.

示例

下面的代码演示如何实现此属性:The following code illustrates how to implement this property:

public IAsyncResult BeginReceiveRequest(AsyncCallback callback, object state)
{
    return BeginReceiveRequest(DefaultReceiveTimeout, callback, state);
}

注解

如果未指定 EndpointAddressVia 将用作最终目标和物理地址。The EndpointAddress serves as both the ultimate destination and the physical address if a Via is not specified. 如果已指定 Via,则此地址为消息将要发送至的实际物理地址,且消息必须通过此地址到达目标。If the Via is specified, then that is the actual physical address to which the message is sent and through which the message must go to arrive at its destination.

适用于