你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

WcfCommunicationListener<TServiceContract> 构造函数

定义

重载

WcfCommunicationListener<TServiceContract>(ServiceContext, TServiceContract)

初始化使用默认绑定和默认终结点地址的 WcfCommunicationListener<TServiceContract> 类的新实例。

WcfCommunicationListener<TServiceContract>(ServiceContext, Type, Binding, EndpointAddress)

初始化 类的新实例, WcfCommunicationListener<TServiceContract> 该实例使用指定的侦听器绑定和派生自指定终结点地址的终结点地址。

WcfCommunicationListener<TServiceContract>(ServiceContext, Type, Binding, String)

初始化 类的新实例, WcfCommunicationListener<TServiceContract> 该类使用派生自指定终结点资源名称的指定侦听器绑定和终结点地址。

WcfCommunicationListener<TServiceContract>(ServiceContext, TServiceContract, Binding, EndpointAddress)

初始化 类的新实例, WcfCommunicationListener<TServiceContract> 该实例使用指定的侦听器绑定和派生自指定终结点地址的终结点地址。

WcfCommunicationListener<TServiceContract>(ServiceContext, TServiceContract, Binding, String)

初始化 类的新实例, WcfCommunicationListener<TServiceContract> 该类使用派生自指定终结点资源名称的指定侦听器绑定和终结点地址。

WcfCommunicationListener<TServiceContract>(ServiceContext, TServiceContract)

初始化使用默认绑定和默认终结点地址的 WcfCommunicationListener<TServiceContract> 类的新实例。

public WcfCommunicationListener (System.Fabric.ServiceContext serviceContext, TServiceContract wcfServiceObject);
new Microsoft.ServiceFabric.Services.Communication.Wcf.Runtime.WcfCommunicationListener<'ServiceContract> : System.Fabric.ServiceContext * 'ServiceContract -> Microsoft.ServiceFabric.Services.Communication.Wcf.Runtime.WcfCommunicationListener<'ServiceContract>
Public Sub New (serviceContext As ServiceContext, wcfServiceObject As TServiceContract)

参数

serviceContext
ServiceContext

要为其构造此通信侦听器的服务的上下文。

wcfServiceObject
TServiceContract

实现指定的 WCF 服务协定的 WCF 服务。

注解

默认侦听器绑定是使用 CreateTcpListenerBinding(Int64, TimeSpan, TimeSpan) 方法创建的。

默认终结点地址是使用服务清单中定义的终结点资源创建的。 终结点资源的名称使用 GetEndpointName(Type) 方法派生自 WCF 服务协定类型。 如果在服务清单中找不到匹配的终结点资源,则使用端口为零的默认终结点资源定义。

适用于

WcfCommunicationListener<TServiceContract>(ServiceContext, Type, Binding, EndpointAddress)

初始化 类的新实例, WcfCommunicationListener<TServiceContract> 该实例使用指定的侦听器绑定和派生自指定终结点地址的终结点地址。

public WcfCommunicationListener (System.Fabric.ServiceContext serviceContext, Type wcfServiceType, System.ServiceModel.Channels.Binding listenerBinding = default, System.ServiceModel.EndpointAddress address = default);
new Microsoft.ServiceFabric.Services.Communication.Wcf.Runtime.WcfCommunicationListener<'ServiceContract> : System.Fabric.ServiceContext * Type * System.ServiceModel.Channels.Binding * System.ServiceModel.EndpointAddress -> Microsoft.ServiceFabric.Services.Communication.Wcf.Runtime.WcfCommunicationListener<'ServiceContract>
Public Sub New (serviceContext As ServiceContext, wcfServiceType As Type, Optional listenerBinding As Binding = Nothing, Optional address As EndpointAddress = Nothing)

参数

serviceContext
ServiceContext

要为其构造此通信侦听器的服务的上下文。

wcfServiceType
Type

实现指定 WCF 服务协定的 WCF 服务的类型。

listenerBinding
Binding

要用于 WCF 终结点的绑定。 如果未指定 listenerBinding 或为 null,则使用 CreateTcpListenerBinding(Int64, TimeSpan, TimeSpan) 方法创建默认侦听器绑定。

address
EndpointAddress

WCF 终结点的侦听地址。 如果未指定地址或地址为 null,则通过从服务清单中查找终结点资源来创建默认地址。 终结点资源名称使用 GetEndpointName(Type) 方法派生自 WCF 服务协定类型。 如果在服务清单中找不到匹配的终结点资源,则使用端口为零的默认终结点资源定义。

适用于

WcfCommunicationListener<TServiceContract>(ServiceContext, Type, Binding, String)

初始化 类的新实例, WcfCommunicationListener<TServiceContract> 该类使用派生自指定终结点资源名称的指定侦听器绑定和终结点地址。

public WcfCommunicationListener (System.Fabric.ServiceContext serviceContext, Type wcfServiceType, System.ServiceModel.Channels.Binding listenerBinding = default, string endpointResourceName = default);
new Microsoft.ServiceFabric.Services.Communication.Wcf.Runtime.WcfCommunicationListener<'ServiceContract> : System.Fabric.ServiceContext * Type * System.ServiceModel.Channels.Binding * string -> Microsoft.ServiceFabric.Services.Communication.Wcf.Runtime.WcfCommunicationListener<'ServiceContract>
Public Sub New (serviceContext As ServiceContext, wcfServiceType As Type, Optional listenerBinding As Binding = Nothing, Optional endpointResourceName As String = Nothing)

参数

serviceContext
ServiceContext

要为其构造此通信侦听器的服务的上下文。

wcfServiceType
Type

实现指定 WCF 服务协定的 WCF 服务的类型。

listenerBinding
Binding

要用于 WCF 终结点的绑定。 如果未指定 listenerBinding 或为 null,则使用 CreateTcpListenerBinding(Int64, TimeSpan, TimeSpan) 方法创建默认侦听器绑定。

endpointResourceName
String

服务清单中定义的终结点资源的名称,该名称应用于创建侦听器的地址。 如果未指定 endpointResourceName 或它为 null,则其名称将使用 GetEndpointName(Type) 方法从 WCF 服务协定类型派生。 如果在服务清单中找不到匹配的终结点资源,则使用端口为零的默认终结点资源定义。

适用于

WcfCommunicationListener<TServiceContract>(ServiceContext, TServiceContract, Binding, EndpointAddress)

初始化 类的新实例, WcfCommunicationListener<TServiceContract> 该实例使用指定的侦听器绑定和派生自指定终结点地址的终结点地址。

public WcfCommunicationListener (System.Fabric.ServiceContext serviceContext, TServiceContract wcfServiceObject, System.ServiceModel.Channels.Binding listenerBinding = default, System.ServiceModel.EndpointAddress address = default);
new Microsoft.ServiceFabric.Services.Communication.Wcf.Runtime.WcfCommunicationListener<'ServiceContract> : System.Fabric.ServiceContext * 'ServiceContract * System.ServiceModel.Channels.Binding * System.ServiceModel.EndpointAddress -> Microsoft.ServiceFabric.Services.Communication.Wcf.Runtime.WcfCommunicationListener<'ServiceContract>
Public Sub New (serviceContext As ServiceContext, wcfServiceObject As TServiceContract, Optional listenerBinding As Binding = Nothing, Optional address As EndpointAddress = Nothing)

参数

serviceContext
ServiceContext

要为其构造此通信侦听器的服务的上下文。

wcfServiceObject
TServiceContract

实现指定的 WCF 服务协定的 WCF 服务。

listenerBinding
Binding

要用于 WCF 终结点的绑定。 如果未指定 listenerBinding 或为 null,则使用 CreateTcpListenerBinding(Int64, TimeSpan, TimeSpan) 方法创建默认侦听器绑定。

address
EndpointAddress

WCF 终结点的侦听地址。 如果未指定地址或地址为 null,则通过从服务清单中查找终结点资源来创建默认地址。 终结点资源名称使用 GetEndpointName(Type) 方法派生自 WCF 服务协定类型。 如果在服务清单中找不到匹配的终结点资源,则使用端口为零的默认终结点资源定义。

适用于

WcfCommunicationListener<TServiceContract>(ServiceContext, TServiceContract, Binding, String)

初始化 类的新实例, WcfCommunicationListener<TServiceContract> 该类使用派生自指定终结点资源名称的指定侦听器绑定和终结点地址。

public WcfCommunicationListener (System.Fabric.ServiceContext serviceContext, TServiceContract wcfServiceObject, System.ServiceModel.Channels.Binding listenerBinding = default, string endpointResourceName = default);
new Microsoft.ServiceFabric.Services.Communication.Wcf.Runtime.WcfCommunicationListener<'ServiceContract> : System.Fabric.ServiceContext * 'ServiceContract * System.ServiceModel.Channels.Binding * string -> Microsoft.ServiceFabric.Services.Communication.Wcf.Runtime.WcfCommunicationListener<'ServiceContract>
Public Sub New (serviceContext As ServiceContext, wcfServiceObject As TServiceContract, Optional listenerBinding As Binding = Nothing, Optional endpointResourceName As String = Nothing)

参数

serviceContext
ServiceContext

要为其构造此通信侦听器的服务的上下文。

wcfServiceObject
TServiceContract

实现指定的 WCF 服务协定的 WCF 服务。

listenerBinding
Binding

要用于 WCF 终结点的绑定。 如果未指定 listenerBinding 或为 null,则使用 CreateTcpListenerBinding(Int64, TimeSpan, TimeSpan) 方法创建默认侦听器绑定。

endpointResourceName
String

服务清单中定义的终结点资源的名称,该名称应用于创建侦听器的地址。 如果未指定 endpointResourceName 或它为 null,则其名称将使用 GetEndpointName(Type) 方法从 WCF 服务协定类型派生。 如果在服务清单中找不到匹配的终结点资源,则使用端口为零的默认终结点资源定义。

适用于