Table of Contents

Interface IResourceProviderRegistry

Namespace
Acuit.Pinpoint.ResourceManagement
Assembly
Acuit.Pinpoint.ResourceManagement.Abstractions.dll

A resource provider registry.

public interface IResourceProviderRegistry : IResourceProvider
Inherited Members

Remarks

Implementations should search registered providers in the order in which they have been added to when providing resources.

Implementations should not assume ownership of the registered providers. If a provider also implements IDisposable, then the creator of the provider is responsible for disposing of it.

Methods

RegisterResourceProvider(IRegisteredResourceProvider)

Registers a resource provider.

IDisposable RegisterResourceProvider(IRegisteredResourceProvider resourceProvider)

Parameters

resourceProvider IRegisteredResourceProvider

The resource provider.

Returns

IDisposable

A IDisposable that represents the registration. Calling Dispose() will remove the resource provider registration.

Remarks

The resource provider registry will not assume ownership of resourceProvider. For example, if resourceProvider implements IDisposable, then the creator of the provider is responsible for disposing of it after first removing the resource provider registration by disposing the IDisposable returned by this method.

Exceptions

ArgumentNullException

resourceProvider is null.

InvalidOperationException

The resourceProvider instance is already registered.