Share via


WcfServiceRemotingClientFactory Constructor

Definition

Initializes a new instance of the WcfServiceRemotingClientFactory class.

public WcfServiceRemotingClientFactory (System.ServiceModel.Channels.Binding clientBinding = default, Microsoft.ServiceFabric.Services.Remoting.V1.IServiceRemotingCallbackClient callbackClient = default, System.Collections.Generic.IEnumerable<Microsoft.ServiceFabric.Services.Communication.Client.IExceptionHandler> exceptionHandlers = default, Microsoft.ServiceFabric.Services.Client.IServicePartitionResolver servicePartitionResolver = default, string traceId = default, Func<System.ServiceModel.Channels.Binding,System.Collections.Generic.IEnumerable<Microsoft.ServiceFabric.Services.Communication.Client.IExceptionHandler>,Microsoft.ServiceFabric.Services.Client.IServicePartitionResolver,string,Microsoft.ServiceFabric.Services.Remoting.V1.Wcf.IServiceRemotingCallbackContract,Microsoft.ServiceFabric.Services.Communication.Wcf.Client.WcfCommunicationClientFactory<Microsoft.ServiceFabric.Services.Remoting.V1.Wcf.IServiceRemotingContract>> createWcfClientFactory = default);
new Microsoft.ServiceFabric.Services.Remoting.V1.Wcf.Client.WcfServiceRemotingClientFactory : System.ServiceModel.Channels.Binding * Microsoft.ServiceFabric.Services.Remoting.V1.IServiceRemotingCallbackClient * seq<Microsoft.ServiceFabric.Services.Communication.Client.IExceptionHandler> * Microsoft.ServiceFabric.Services.Client.IServicePartitionResolver * string * Func<System.ServiceModel.Channels.Binding, seq<Microsoft.ServiceFabric.Services.Communication.Client.IExceptionHandler>, Microsoft.ServiceFabric.Services.Client.IServicePartitionResolver, string, Microsoft.ServiceFabric.Services.Remoting.V1.Wcf.IServiceRemotingCallbackContract, Microsoft.ServiceFabric.Services.Communication.Wcf.Client.WcfCommunicationClientFactory<Microsoft.ServiceFabric.Services.Remoting.V1.Wcf.IServiceRemotingContract>> -> Microsoft.ServiceFabric.Services.Remoting.V1.Wcf.Client.WcfServiceRemotingClientFactory
Public Sub New (Optional clientBinding As Binding = Nothing, Optional callbackClient As IServiceRemotingCallbackClient = Nothing, Optional exceptionHandlers As IEnumerable(Of IExceptionHandler) = Nothing, Optional servicePartitionResolver As IServicePartitionResolver = Nothing, Optional traceId As String = Nothing, Optional createWcfClientFactory As Func(Of Binding, IEnumerable(Of IExceptionHandler), IServicePartitionResolver, String, IServiceRemotingCallbackContract, WcfCommunicationClientFactory(Of IServiceRemotingContract)) = Nothing)

Parameters

clientBinding
Binding

WCF binding to use for the client. If the client binding is not specified or null, a default client binding is created using CreateTcpClientBinding(Int64, TimeSpan, TimeSpan) method which creates a NetTcpBinding with no security.

callbackClient
Microsoft.ServiceFabric.Services.Remoting.V1.IServiceRemotingCallbackClient

The callback client that receives the callbacks from the service.

exceptionHandlers
IEnumerable<IExceptionHandler>

Exception handlers to handle the exceptions encountered in communicating with the service.

servicePartitionResolver
IServicePartitionResolver

Service partition resolver to resolve the service endpoints. If not specified, a default service partition resolver returned by GetDefault() is used.

traceId
String

Id to use in diagnostics traces from this component.

Remarks

This factory uses WcfExceptionHandler and ServiceRemotingExceptionHandler in addition to the exception handlers supplied to the constructor.

Applies to