IClientChannel IClientChannel IClientChannel IClientChannel Interface

定义

定义出站请求的行为和客户端应用程序使用的请求/答复通道。Defines the behavior of outbound request and request/reply channels used by client applications.

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 IContextChannel
    interface ICommunicationObject
    interface IDisposable
    interface IChannel
    interface IExtensibleObject<IContextChannel>
Public Interface IClientChannel
Implements IContextChannel, IDisposable, IExtensibleObject(Of IContextChannel)
派生
实现

注解

IClientChannel 接口定义通过调用 ChannelFactory<TChannel>.CreateChannel 返回的所有通道所支持的操作。The IClientChannel interface defines the operations supported by all channels returned by a call to ChannelFactory<TChannel>.CreateChannel. 使用 IClientChannel 方法和属性来检查和修改出站类型的通道。Use the IClientChannel methods and properties to inspect and modify the outbound typed channel. ServiceModel Metadata Utility Tool (Svcutil.exe)同时导出ClientBase<TChannel>类并通过创建从目标服务协定继承的协定接口的服务协定接口和IClientChannel,从而能够使用扩展的协定作为服务这两个代理,并访问客户端信道。The ServiceModel Metadata Utility Tool (Svcutil.exe) exports both a ClientBase<TChannel> class and a service contract interface by creating a contract interface that inherits from both the target service contract and IClientChannel, enabling you to use the extended contract as both the proxy to the service and to access the client channel.

有关详细信息,请参阅WCF 客户端体系结构For more information, see WCF Client Architecture. 生成的客户端代码文件中的外观的示例,请参阅了解生成的客户端代码For examples of its appearance in generated client code files, see Understanding Generated Client Code.

属性

AllowInitializationUI AllowInitializationUI AllowInitializationUI AllowInitializationUI

获取或设置一个值,该值指示 DisplayInitializationUI() 是要尝试调用 IInteractiveChannelInitializer 属性中的 InteractiveChannelInitializers 对象还是要在该集合不为空时引发对象。Gets or sets a value indicating whether DisplayInitializationUI() attempts to call the IInteractiveChannelInitializer objects in the InteractiveChannelInitializers property or throws if that collection is not empty.

AllowOutputBatching AllowOutputBatching AllowOutputBatching AllowOutputBatching

获取或设置一个值,该值指示 Windows Communication Foundation (WCF) 在给出消息以进行传输之前存储一组消息。Gets or sets a value that instructs Windows Communication Foundation (WCF) to store a set of messages before giving the messages to the transport.

(Inherited from IContextChannel)
DidInteractiveInitialization DidInteractiveInitialization DidInteractiveInitialization DidInteractiveInitialization

获取一个值,该值指示是否对用户接口执行调用以获取凭据信息。Gets a value indicating whether a call was done to a user interface to obtain credential information.

Extensions Extensions Extensions Extensions

获取此可扩展对象的扩展对象集合。Gets a collection of extension objects for this extensible object.

(Inherited from IExtensibleObject<T>)
InputSession InputSession InputSession InputSession

获取通道的输入会话。Gets the input session for the channel.

(Inherited from IContextChannel)
LocalAddress LocalAddress LocalAddress LocalAddress

获取通道的本地终结点。Gets the local endpoint for the channel.

(Inherited from IContextChannel)
OperationTimeout OperationTimeout OperationTimeout OperationTimeout

获取或设置一个时间段,操作必须在此时间段内完成否则将引发异常。Gets or sets the time period within which an operation must complete or an exception is thrown.

(Inherited from IContextChannel)
OutputSession OutputSession OutputSession OutputSession

获取与通道关联的输出会话(如果有)。Gets the output session associated with the channel, if any.

(Inherited from IContextChannel)
RemoteAddress RemoteAddress RemoteAddress RemoteAddress

获取与通道关联的远程地址。Gets the remote address associated with the channel.

(Inherited from IContextChannel)
SessionId SessionId SessionId SessionId

返回当前会话的标识符(如果有)。Returns an identifier for the current session, if any.

(Inherited from IContextChannel)
State State State State

获取面向通信的对象的当前状态。Gets the current state of the communication-oriented object.

(Inherited from ICommunicationObject)
Via Via Via Via

获取 URI,该 URI 包含客户端通道上发送的消息将要到达的传输地址。Gets the URI that contains the transport address to which messages are sent on the client channel.

方法

Abort() Abort() Abort() Abort()

使通信对象立即从其当前状态转换到关闭状态。Causes a communication object to transition immediately from its current state into the closed state.

(Inherited from ICommunicationObject)
BeginClose(AsyncCallback, Object) BeginClose(AsyncCallback, Object) BeginClose(AsyncCallback, Object) BeginClose(AsyncCallback, Object)

开始一个异步操作以关闭通信对象。Begins an asynchronous operation to close a communication object.

(Inherited from ICommunicationObject)
BeginClose(TimeSpan, AsyncCallback, Object) BeginClose(TimeSpan, AsyncCallback, Object) BeginClose(TimeSpan, AsyncCallback, Object) BeginClose(TimeSpan, AsyncCallback, Object)

开始一个异步操作以在指定超时内关闭通信对象。Begins an asynchronous operation to close a communication object with a specified timeout.

(Inherited from ICommunicationObject)
BeginDisplayInitializationUI(AsyncCallback, Object) BeginDisplayInitializationUI(AsyncCallback, Object) BeginDisplayInitializationUI(AsyncCallback, Object) BeginDisplayInitializationUI(AsyncCallback, Object)

要开始使用用户接口获取凭据信息的异步调用。An asynchronous call to begin using a user interface to obtain credential information.

BeginOpen(AsyncCallback, Object) BeginOpen(AsyncCallback, Object) BeginOpen(AsyncCallback, Object) BeginOpen(AsyncCallback, Object)

开始一个异步操作以打开通信对象。Begins an asynchronous operation to open a communication object.

(Inherited from ICommunicationObject)
BeginOpen(TimeSpan, AsyncCallback, Object) BeginOpen(TimeSpan, AsyncCallback, Object) BeginOpen(TimeSpan, AsyncCallback, Object) BeginOpen(TimeSpan, AsyncCallback, Object)

开始一个异步操作以在指定时间间隔内打开通信对象。Begins an asynchronous operation to open a communication object within a specified interval of time.

(Inherited from ICommunicationObject)
Close() Close() Close() Close()

使通信对象从其当前状态转换到关闭状态。Causes a communication object to transition from its current state into the closed state.

(Inherited from ICommunicationObject)
Close(TimeSpan) Close(TimeSpan) Close(TimeSpan) Close(TimeSpan)

使通信对象从其当前状态转换到关闭状态。Causes a communication object to transition from its current state into the closed state.

(Inherited from ICommunicationObject)
DisplayInitializationUI() DisplayInitializationUI() DisplayInitializationUI() DisplayInitializationUI()

用于获取凭据信息的用户接口的调用。A call to a user interface to obtain credential information.

Dispose() Dispose() Dispose() Dispose()

执行与释放或重置非托管资源关联的应用程序定义的任务。Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from IDisposable)
EndClose(IAsyncResult) EndClose(IAsyncResult) EndClose(IAsyncResult) EndClose(IAsyncResult)

完成一个异步操作以关闭通信对象。Completes an asynchronous operation to close a communication object.

(Inherited from ICommunicationObject)
EndDisplayInitializationUI(IAsyncResult) EndDisplayInitializationUI(IAsyncResult) EndDisplayInitializationUI(IAsyncResult) EndDisplayInitializationUI(IAsyncResult)

完成对 BeginDisplayInitializationUI(AsyncCallback, Object) 的调用后调用。Called when the call to BeginDisplayInitializationUI(AsyncCallback, Object) has finished.

EndOpen(IAsyncResult) EndOpen(IAsyncResult) EndOpen(IAsyncResult) EndOpen(IAsyncResult)

完成一个异步操作以打开通信对象。Completes an asynchronous operation to open a communication object.

(Inherited from ICommunicationObject)
GetProperty<T>() GetProperty<T>() GetProperty<T>() GetProperty<T>()

从通道堆栈的适当层返回所请求的类型化对象(如果存在)。Returns a typed object requested, if present, from the appropriate layer in the channel stack.

(Inherited from IChannel)
Open() Open() Open() Open()

使通信对象从已创建状态转换到已打开状态。Causes a communication object to transition from the created state into the opened state.

(Inherited from ICommunicationObject)
Open(TimeSpan) Open(TimeSpan) Open(TimeSpan) Open(TimeSpan)

使通信对象在指定时间间隔内从已创建状态转换到已打开状态。Causes a communication object to transition from the created state into the opened state within a specified interval of time.

(Inherited from ICommunicationObject)

事件

Closed Closed Closed Closed

当通信对象完成从正在关闭状态转换到已关闭状态时发生。Occurs when the communication object completes its transition from the closing state into the closed state.

(Inherited from ICommunicationObject)
Closing Closing Closing Closing

当通信对象首次进入正在关闭状态时发生。Occurs when the communication object first enters the closing state.

(Inherited from ICommunicationObject)
Faulted Faulted Faulted Faulted

当通信对象首次进入出错状态时发生。Occurs when the communication object first enters the faulted state.

(Inherited from ICommunicationObject)
Opened Opened Opened Opened

当通信对象完成从正在打开状态转换到已打开状态时发生。Occurs when the communication object completes its transition from the opening state into the opened state.

(Inherited from ICommunicationObject)
Opening Opening Opening Opening

当通信对象首次进入正在打开状态时发生。Occurs when the communication object first enters the opening state.

(Inherited from ICommunicationObject)
UnknownMessageReceived UnknownMessageReceived UnknownMessageReceived UnknownMessageReceived

这是保留事件。This is a reserved event.

适用于