语言

IClientChannel 接口

定义

定义客户端应用程序使用的出站请求和请求/回复通道的行为。

public interface class IClientChannel : IDisposable, System::ServiceModel::IContextChannel, System::ServiceModel::IExtensibleObject<System::ServiceModel::IContextChannel ^>
public interface IClientChannel : IDisposable, System.ServiceModel.IContextChannel, System.ServiceModel.IExtensibleObject<System.ServiceModel.IContextChannel>
type IClientChannel = interface
    interface IDisposable
    interface IChannel
    interface ICommunicationObject
    interface IContextChannel
    interface IExtensibleObject<IContextChannel>
type IClientChannel = interface
    interface IContextChannel
    interface IChannel
    interface ICommunicationObject
    interface IExtensibleObject<IContextChannel>
    interface IDisposable
Public Interface IClientChannel
Implements IContextChannel, IDisposable, IExtensibleObject(Of IContextChannel)
派生
实现

注解

该 IClientChannel 接口定义调用 ChannelFactory<TChannel>.CreateChannel返回的所有通道支持的操作。 IClientChannel使用方法和属性检查和修改出站类型化通道。 ServiceModel 元数据实用工具工具(Svcutil.exe)通过创建继承自目标服务协定ClientBase<TChannel>的协定接口来导出IClientChannel类和服务协定接口,并使你能够将扩展协定用作服务代理和访问客户端通道。

有关详细信息,请参阅 WCF 客户端体系结构。 有关其出现在生成的客户端代码文件中的示例,请参阅 “了解生成的客户端代码”。

属性

名称 说明
AllowInitializationUI

获取或设置一个值,该值指示是尝试调用DisplayInitializationUI()属性中的IInteractiveChannelInitializer对象,还是InteractiveChannelInitializers如果该集合不为空,则引发。

AllowOutputBatching

获取或设置一个值,该值指示 Windows Communication Foundation (WCF) 在向传输提供消息之前存储一组消息。

(继承自 IContextChannel)
DidInteractiveInitialization

获取一个值,该值指示是否对用户界面执行调用以获取凭据信息。

Extensions

获取此可扩展对象的扩展对象的集合。

(继承自 IExtensibleObject<T>)
InputSession

获取通道的输入会话。

(继承自 IContextChannel)
LocalAddress

获取通道的本地终结点。

(继承自 IContextChannel)
OperationTimeout

获取或设置操作必须完成或引发异常的时间段。

(继承自 IContextChannel)
OutputSession

获取与通道关联的输出会话(如果有)。

(继承自 IContextChannel)
RemoteAddress

获取与通道关联的远程地址。

(继承自 IContextChannel)
SessionId

返回当前会话的标识符(如果有)。

(继承自 IContextChannel)
State

获取面向通信的对象的当前状态。

(继承自 ICommunicationObject)
Via

获取包含在客户端通道上发送消息的传输地址的 URI。

方法

名称 说明
Abort()

使通信对象立即从其当前状态转换为关闭状态。

(继承自 ICommunicationObject)
BeginClose(AsyncCallback, Object)

开始异步操作以关闭通信对象。

(继承自 ICommunicationObject)
BeginClose(TimeSpan, AsyncCallback, Object)

开始异步操作以关闭具有指定超时的通信对象。

(继承自 ICommunicationObject)
BeginDisplayInitializationUI(AsyncCallback, Object)

用于开始使用用户界面获取凭据信息的异步调用。

BeginOpen(AsyncCallback, Object)

开始异步操作以打开通信对象。

(继承自 ICommunicationObject)
BeginOpen(TimeSpan, AsyncCallback, Object)

开始一个异步操作,以在指定的时间间隔内打开通信对象。

(继承自 ICommunicationObject)
Close()

使通信对象从其当前状态转换为关闭状态。

(继承自 ICommunicationObject)
Close(TimeSpan)

使通信对象从其当前状态转换为关闭状态。

(继承自 ICommunicationObject)
DisplayInitializationUI()

调用用户界面以获取凭据信息。

Dispose()

执行与释放、释放或重置非托管资源关联的应用程序定义任务。

(继承自 IDisposable)
EndClose(IAsyncResult)

完成异步操作以关闭通信对象。

(继承自 ICommunicationObject)
EndDisplayInitializationUI(IAsyncResult)

调用 BeginDisplayInitializationUI(AsyncCallback, Object) 完成时调用。

EndOpen(IAsyncResult)

完成异步操作以打开通信对象。

(继承自 ICommunicationObject)
GetProperty<T>()

从通道堆栈中的相应层返回所请求的类型化对象(如果存在)。

(继承自 IChannel)
Open()

使通信对象从创建的状态转换为打开状态。

(继承自 ICommunicationObject)
Open(TimeSpan)

使通信对象在指定的时间间隔内从创建的状态转换为打开状态。

(继承自 ICommunicationObject)

事件

名称 说明
Closed

当通信对象完成从结束状态到关闭状态的转换时发生。

(继承自 ICommunicationObject)
Closing

通信对象首次进入结束状态时发生。

(继承自 ICommunicationObject)
Faulted

通信对象首次进入错误状态时发生。

(继承自 ICommunicationObject)
Opened

当通信对象完成从打开状态到打开状态的转换时发生。

(继承自 ICommunicationObject)
Opening

通信对象首次进入打开状态时发生。

(继承自 ICommunicationObject)
UnknownMessageReceived

这是保留事件。

适用于