IClientChannel 接口

定义

定义出站请求的行为和客户端应用程序使用的请求/答复通道。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 IDisposable
    interface IChannel
    interface ICommunicationObject
    interface IContextChannel
    interface IExtensibleObject<IContextChannel>
type IClientChannel = interface
    interface IDisposable
    interface IContextChannel
    interface IChannel
    interface ICommunicationObject
    interface IExtensibleObject<IContextChannel>
type IClientChannel = interface
    interface IContextChannel
    interface IChannel
    interface ICommunicationObject
    interface IExtensibleObject<IContextChannel>
    interface IDisposable
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. " Svcutil.exe" 元数据实用工具()通过创建从目标服务协定和 IClientChannel继承的协定接口来导出 ClientBase<TChannel> 类和服务协定接口,使你能够将扩展协定用作服务的代理并访问客户端信道。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

获取或设置一个值,该值指示 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

获取或设置一个值,该值指示 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.

(继承自 IContextChannel)
DidInteractiveInitialization

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

Extensions

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

(继承自 IExtensibleObject<T>)
InputSession

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

(继承自 IContextChannel)
LocalAddress

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

(继承自 IContextChannel)
OperationTimeout

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

(继承自 IContextChannel)
OutputSession

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

(继承自 IContextChannel)
RemoteAddress

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

(继承自 IContextChannel)
SessionId

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

(继承自 IContextChannel)
State

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

(继承自 ICommunicationObject)
Via

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

方法

Abort()

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

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

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

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

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

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

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

BeginOpen(AsyncCallback, Object)

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

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

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

(继承自 ICommunicationObject)
Close()

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

(继承自 ICommunicationObject)
Close(TimeSpan)

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

(继承自 ICommunicationObject)
DisplayInitializationUI()

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

Dispose()

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

(继承自 IDisposable)
EndClose(IAsyncResult)

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

(继承自 ICommunicationObject)
EndDisplayInitializationUI(IAsyncResult)

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

EndOpen(IAsyncResult)

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

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

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

(继承自 IChannel)
Open()

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

(继承自 ICommunicationObject)
Open(TimeSpan)

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

(继承自 ICommunicationObject)

事件

Closed

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

(继承自 ICommunicationObject)
Closing

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

(继承自 ICommunicationObject)
Faulted

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

(继承自 ICommunicationObject)
Opened

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

(继承自 ICommunicationObject)
Opening

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

(继承自 ICommunicationObject)
UnknownMessageReceived

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

适用于