ServiceBrokerAggregator.NonDisposable(IServiceBroker) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.