IBrokeredServiceContainer.Proffer Method

Definition

Overloads

Proffer(ServiceRpcDescriptor, AuthorizingBrokeredServiceFactory)

Proffers a service for publication via an IServiceBroker associated with this container.

Proffer(ServiceRpcDescriptor, BrokeredServiceFactory)

Proffers a service for publication via an IServiceBroker associated with this container.

Proffer(ServiceRpcDescriptor, AuthorizingBrokeredServiceFactory)

Proffers a service for publication via an IServiceBroker associated with this container.

public IDisposable Proffer (Microsoft.ServiceHub.Framework.ServiceRpcDescriptor serviceDescriptor, Microsoft.VisualStudio.Shell.ServiceBroker.AuthorizingBrokeredServiceFactory factory);
abstract member Proffer : Microsoft.ServiceHub.Framework.ServiceRpcDescriptor * Microsoft.VisualStudio.Shell.ServiceBroker.AuthorizingBrokeredServiceFactory -> IDisposable
Public Function Proffer (serviceDescriptor As ServiceRpcDescriptor, factory As AuthorizingBrokeredServiceFactory) As IDisposable

Parameters

serviceDescriptor
ServiceRpcDescriptor

The descriptor for the service. The Moniker is used to match service requests to the factory. The ConstructRpcConnection(IDuplexPipe) method is used to convert the service returned by the factory to a pipe when the client prefers that.

factory
AuthorizingBrokeredServiceFactory

The delegate that will create new instances of the service for each client.

Returns

A value that can be disposed to remove the proffered service from availability.

Applies to

Proffer(ServiceRpcDescriptor, BrokeredServiceFactory)

Proffers a service for publication via an IServiceBroker associated with this container.

public IDisposable Proffer (Microsoft.ServiceHub.Framework.ServiceRpcDescriptor serviceDescriptor, Microsoft.VisualStudio.Shell.ServiceBroker.BrokeredServiceFactory factory);
abstract member Proffer : Microsoft.ServiceHub.Framework.ServiceRpcDescriptor * Microsoft.VisualStudio.Shell.ServiceBroker.BrokeredServiceFactory -> IDisposable
Public Function Proffer (serviceDescriptor As ServiceRpcDescriptor, factory As BrokeredServiceFactory) As IDisposable

Parameters

serviceDescriptor
ServiceRpcDescriptor

The descriptor for the service. The Moniker is used to match service requests to the factory. The ConstructRpcConnection(IDuplexPipe) method is used to convert the service returned by the factory to a pipe when the client prefers that.

factory
BrokeredServiceFactory

The delegate that will create new instances of the service for each client.

Returns

A value that can be disposed to remove the proffered service from availability.

Exceptions

Thrown if serviceDescriptor represents a ServiceMoniker that has already been proffered.

Thrown if no registration can be found for the proffered Moniker.

Remarks

The service identified by the Moniker must have been pre-registered with a ServiceAudience indicating who should have access to it and whether it might be obtained from a remote machine or user.

Applies to