Udostępnij za pośrednictwem


ServiceRemotingProviderAttribute Class

Definition

This is a base type for attribute that sets the default service remoting provider to use for remoting the service interfaces defined and used in the assembly.

[System.AttributeUsage(System.AttributeTargets.Assembly)]
public abstract class ServiceRemotingProviderAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly)>]
type ServiceRemotingProviderAttribute = class
    inherit Attribute
Public MustInherit Class ServiceRemotingProviderAttribute
Inherits Attribute
Inheritance
ServiceRemotingProviderAttribute
Derived
Attributes

Remarks

On service side, implementation of this attribute is looked up by CreateServiceRemotingReplicaListeners<TStatefulService>(TStatefulService) and CreateServiceRemotingInstanceListeners<TStatelessService>(TStatelessService) methods on the runtime to create a default IServiceRemotingListener for the stateful and stateless services.

On client side, implementation of this attribute is looked up by Microsoft.ServiceFabric.Services.Remoting.V2.Client.ServiceProxyFactory constructor to create a default IServiceRemotingClientFactory when it is not specified.

Note that on client side Create<TServiceInterface>(Uri, ServicePartitionKey, TargetReplicaSelector, String) method create a default Microsoft.ServiceFabric.Services.Remoting.V2.Client.ServiceProxyFactory once and hence the provider lookup happens only for the first time, after which the same provider is used.

The order in which this attribute is looked up is as follows:

Constructors

ServiceRemotingProviderAttribute()

Initializes a new instance of the ServiceRemotingProviderAttribute class.

Properties

RemotingClientVersion

Gets or sets the version of the remoting client to use.

RemotingListenerVersion

Gets or sets the version that the remoting listener to use.

Methods

CreateServiceRemotingClientFactoryV2(IServiceRemotingCallbackMessageHandler)

Creates a V2 service remoting client factory that can be used by the Microsoft.ServiceFabric.Services.Remoting.V2.Client.ServiceProxyFactory to create a proxy for the remoted interface of the service.

CreateServiceRemotingListeners()

Returns the func method that creates the remoting listeners.

Applies to