ChannelFactoryBase<TChannel> 构造函数

定义

初始化 ChannelFactoryBase<TChannel> 类的新实例。Initializes a new instance of the ChannelFactoryBase<TChannel> class.

重载

ChannelFactoryBase<TChannel>()

初始化 ChannelFactoryBase<TChannel> 类的新实例。Initializes a new instance of the ChannelFactoryBase<TChannel> class.

ChannelFactoryBase<TChannel>(IDefaultCommunicationTimeouts)

使用指定的默认通信超时初始化 ChannelFactoryBase<TChannel> 类的新实例。Initializes a new instance of the ChannelFactoryBase<TChannel> class with the default communication timeouts specified.

注解

在交换消息时,默认的 ChannelFactoryBase<TChannel>() 构造函数使用服务模型超时值对超时属性进行初始化。The default ChannelFactoryBase<TChannel>() constructor initializes timeout properties with the service model timeout values when exchanging messages. 打开、发送和关闭操作的默认值为 1 分钟,接收操作的默认值为 10 分钟。The default value is 1 minute for open, send, and close operations and 10 minutes for the receive operation. 若要为这些操作超时指定其他值,请使用 ChannelFactoryBase<TChannel>(IDefaultCommunicationTimeouts)Use ChannelFactoryBase<TChannel>(IDefaultCommunicationTimeouts) if you want to specify other values for these operation timeouts.

ChannelFactoryBase<TChannel>()

初始化 ChannelFactoryBase<TChannel> 类的新实例。Initializes a new instance of the ChannelFactoryBase<TChannel> class.

protected:
 ChannelFactoryBase();
protected ChannelFactoryBase ();
Protected Sub New ()

注解

在交换消息时,无参数的构造函数将初始化超时属性与服务模型的超时值。The parameterless constructor initializes timeout properties with the service model timeout values when exchanging messages. 打开、发送和关闭操作的默认值为 1 分钟,接收操作的默认值为 10 分钟。The default value is 1 minute for open, send, and close operations and 10 minutes for the receive operation. 若要为这些操作超时指定其他值,请使用 ChannelFactoryBase<TChannel>(IDefaultCommunicationTimeouts)Use ChannelFactoryBase<TChannel>(IDefaultCommunicationTimeouts) if you want to specify other values for these operation timeouts.

适用于

ChannelFactoryBase<TChannel>(IDefaultCommunicationTimeouts)

使用指定的默认通信超时初始化 ChannelFactoryBase<TChannel> 类的新实例。Initializes a new instance of the ChannelFactoryBase<TChannel> class with the default communication timeouts specified.

protected:
 ChannelFactoryBase(System::ServiceModel::IDefaultCommunicationTimeouts ^ timeouts);
protected ChannelFactoryBase (System.ServiceModel.IDefaultCommunicationTimeouts timeouts);
new System.ServiceModel.Channels.ChannelFactoryBase<'Channel> : System.ServiceModel.IDefaultCommunicationTimeouts -> System.ServiceModel.Channels.ChannelFactoryBase<'Channel>
Protected Sub New (timeouts As IDefaultCommunicationTimeouts)

参数

timeouts
IDefaultCommunicationTimeouts

指定交换消息时打开、发送、接收和关闭操作的默认超时的 IDefaultCommunicationTimeoutsThe IDefaultCommunicationTimeouts that specifies the default timeouts for open, send, receive, and close operations when exchanging messages.

注解

ChannelFactoryBase<TChannel>(IDefaultCommunicationTimeouts)如果要为打开、发送、接收和关闭操作超时指定自定义值(而不是使用服务模型的默认值),请使用而不是无参数构造函数。Use ChannelFactoryBase<TChannel>(IDefaultCommunicationTimeouts) instead of the parameterless constructor if you want to specify custom values for the open, send, receive, and close operation timeouts instead of using the service model default values.

适用于