次の方法で共有


ServiceBrokerAggregator.NonDisposable(IServiceBroker) Method

Definition

Creates a new IServiceBroker that does not implement IDisposable and forwards all requests to a given IServiceBroker.

public static Microsoft.ServiceHub.Framework.IServiceBroker NonDisposable (Microsoft.ServiceHub.Framework.IServiceBroker serviceBroker);
static member NonDisposable : Microsoft.ServiceHub.Framework.IServiceBroker -> Microsoft.ServiceHub.Framework.IServiceBroker
Public Shared Function NonDisposable (serviceBroker As IServiceBroker) As IServiceBroker

Parameters

serviceBroker
IServiceBroker

The inner service broker to forward requests to.

Returns

The non-disposable wrapper.

Remarks

This is useful when an IServiceBroker that may implement IDisposable is being shared such that others may dispose of it if it is disposable, but the caller wants to retain exclusive control over the lifetime of the broker.

Applies to