Open sandboxFocus

Namespace Metalama.Framework.Engine.Services

Classes

ServiceProvider

A non-generic base class for ServiceProvider<TBase>.

ServiceProviderBuilder<TService>

A mutable builder for creating ServiceProvider<TBase> instances. Allows registering service factories that will be applied when building the final immutable service provider.

ServiceProvider<TBase>

An immutable implementation of IServiceProvider that will index services that implement the TBase interface. When a service is added to a ServiceProvider<TBase>, a mapping is created between the type of this object and the object itself, but also between the type of any interface derived from TBase and implemented by this object. Service provider instances are immutable (each WithService(TBase, bool, bool) method returns a copy of the service provider with the new service), except for the shared services, which are shared among all instances of the same family.

Structs

GlobalServiceProvider

Provides access to globally scoped services. A wrapper around ServiceProvider<TBase> for IGlobalService.

ProjectServiceProvider

Provides access to project-scoped services. A wrapper around ServiceProvider<TBase> for IProjectService.

Interfaces

IAdditionalServiceCollection

A set of mocks or services injected into the production service providers.

ICompilationServices

Provides compilation-scoped services for aspect weavers, including access to the Roslyn compilation and reflection mapping services.

IProjectServiceFactory

A factory interface that creates IProjectService instances to be added to the project's service provider. Implement this interface and export it using ExportExtensionAttribute with ServiceFactory to provide custom services that can be consumed by aspects at compile time.