System.Composition.Runtime 9.0.0-rc.2.24473.5
About
System.Composition.Runtime
is part of the Managed Extensibility Framework (MEF) 2.0, a composition library for .NET that enables dependency injection through attributes or conventions.
This package enables the discovery and composition of parts in applications using MEF 2.0. It offers the runtime implementation needed for managing composable parts, resolving dependencies, and dynamically wiring components together.
Key Features
- Facilitates runtime discovery and composition of parts.
How to Use
Resolve dependencies on the fly and can be useful for dynamically loaded components or plugins.
using System.Composition;
using System.Composition.Hosting;
var configuration = new ContainerConfiguration()
.WithPart<Service>();
using CompositionHost container = configuration.CreateContainer();
var consumer = new Consumer(container);
consumer.Execute();
// Service is running.
public interface IService
{
void Run();
}
[Export(typeof(IService))]
public class Service : IService
{
public void Run() => Console.WriteLine("Service is running.");
}
public class Consumer(CompositionContext context)
{
public void Execute()
{
// Use the context to resolve the service
var service = context.GetExport<IService>();
service.Run();
}
}
Main Types
The main type provided by this library is:
System.Composition.CompositionContext
Additional Documentation
Related Packages
- System.Composition
- System.Composition.AttributedModel
- System.Composition.Convention
- System.Composition.Hosting
- System.Composition.TypedParts
Feedback & Contributing
System.Composition.Runtime is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Showing the top 20 packages that depend on System.Composition.Runtime.
Packages | Downloads |
---|---|
System.Composition
This package provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web.
Commonly Used Types:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
|
85 |
System.Composition
This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web.
Commonly Used Types:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
|
63 |
System.Composition
This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web.
Commonly Used Types:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
|
66 |
System.Composition
This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web.
Commonly Used Types:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
|
68 |
System.Composition
This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web.
Commonly Used Types:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
8321c729934c0f8be754953439b88e6e1c120c24
When using NuGet 3.x this package requires at least version 3.4.
|
67 |
System.Composition
This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web.
Commonly Used Types:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
When using NuGet 3.x this package requires at least version 3.4.
|
62 |
System.Composition
This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web.
Commonly Used Types:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
When using NuGet 3.x this package requires at least version 3.4.
|
63 |
System.Composition
This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web.
Commonly Used Types:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
When using NuGet 3.x this package requires at least version 3.4.
|
70 |
System.Composition
This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web.
Commonly Used Types:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
When using NuGet 3.x this package requires at least version 3.4.
|
74 |
System.Composition
This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web.
Commonly Used Types:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
When using NuGet 3.x this package requires at least version 3.4.
|
89 |
System.Composition.Hosting
Provides Managed Extensibility Framework types that are useful to developers of extensible applications, or hosts.
Commonly Used Types:
System.Composition.Hosting.CompositionHost
|
66 |
System.Composition.Hosting
Provides Managed Extensibility Framework types that are useful to developers of extensible applications, or hosts.
Commonly Used Types:
System.Composition.Hosting.CompositionHost
30ab651fcb4354552bd4891619a0bdd81e0ebdbf
When using NuGet 3.x this package requires at least version 3.4.
|
64 |
System.Composition.Hosting
Provides Managed Extensibility Framework types that are useful to developers of extensible applications, or hosts.
Commonly Used Types:
System.Composition.Hosting.CompositionHost
When using NuGet 3.x this package requires at least version 3.4.
|
70 |
System.Composition.Hosting
Provides Managed Extensibility Framework types that are useful to developers of extensible applications, or hosts.
Commonly Used Types:
System.Composition.Hosting.CompositionHost
When using NuGet 3.x this package requires at least version 3.4.
|
76 |
System.Composition.TypedParts
Provides some extension methods for the Managed Extensibility Framework.
Commonly Used Types:
System.Composition.CompositionContextExtensions
System.Composition.Hosting.ContainerConfiguration
|
63 |
System.Composition.TypedParts
Provides some extension methods for the Managed Extensibility Framework.
Commonly Used Types:
System.Composition.CompositionContextExtensions
System.Composition.Hosting.ContainerConfiguration
When using NuGet 3.x this package requires at least version 3.4.
|
63 |
System.Composition.TypedParts
Provides some extension methods for the Managed Extensibility Framework.
Commonly Used Types:
System.Composition.CompositionContextExtensions
System.Composition.Hosting.ContainerConfiguration
When using NuGet 3.x this package requires at least version 3.4.
|
78 |
.NET Framework 4.6.2
- No dependencies.
.NET 8.0
- No dependencies.
.NET 9.0
- No dependencies.
.NET Standard 2.0
- No dependencies.