System.Composition 9.0.0
About
Provides the Managed Extensibility Framework (MEF) 2.0, a lightweight, attribute-driven Dependency Injection (DI) container.
MEF simplifies the composition of applications by allowing components to be loosely coupled and dynamically discovered. This package supports the development of modular and maintainable applications by enabling parts to be composed at runtime.
Key Features
- Components are discovered and composed using attributes.
- Provides dependency injection capabilities for loosely coupled modules.
How to Use
Running code from a discovered component.
using System.Composition;
using System.Composition.Hosting;
var configuration = new ContainerConfiguration().WithPart<Service>();
using var container = configuration.CreateContainer();
var service = container.GetExport<Service>();
service.Execute();
// Output: Service is running!
[Export]
public class Service
{
public void Execute() => Console.WriteLine("Service is running!");
}
Main Types
The main types provided by this library are:
System.Composition.ExportAttribute
System.Composition.ImportAttribute
System.Composition.Convention.ConventionBuilder
System.Composition.Hosting.CompositionHost
System.Composition.CompositionContext
System.Composition.CompositionContextExtensions
Additional Documentation
Related Packages
- System.Composition.AttributedModel
- System.Composition.Convention
- System.Composition.Hosting
- System.Composition.Runtime
- System.Composition.TypedParts
Feedback & Contributing
System.Composition 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.
Packages | Downloads |
---|---|
Microsoft.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.
Supported Platforms:
- .NET Framework 4.5
- Windows 8
- Windows Phone 8.1
- Windows Phone Silverlight 8
- Portable Class Libraries
|
49 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/04c76c9d58c7911e2fd199da145cd97bbf283438.
|
45 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/256d46e2333636eccd52866ca6f698f0ef4b9910.
|
43 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/1cb14195ed43eefdf7f9de59140ff6db70eea76e.
|
41 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/205504dfd0f686370cffae5df068024c8a2b427f.
|
41 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/ebbf56c257fb4d3128d3487ef525d92e9f94b412.
|
41 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/e5eb71d6714749bccf91d9268ece78cd5d4d43ea.
|
40 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/ec4841263590f5456e32728d98097e97c1605e22.
|
40 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/091091276de5136e94e4413faa87e4d4ec3a7671.
|
39 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/df45061e218c9b5813c5531bc06fb238a23e30f6.
|
39 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/9081e399a13297f6e2fd37cb06ca82ffba3eed21
|
39 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/2242fa4fb945b97680bdd49eb5dd58285e4abb1c.
|
38 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/4c7d79a254288388d97d793c4087db6ebf00d2fd.
|
38 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/7a63d79b60ffb33e919bee8056816f8f449d00ce.
|
38 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/4c32f5e4e9c0828a94fd4d1c9c0994082c85aaf3.
|
38 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/ec366687c8caead948e58704ad61ed644eb91b5b.
|
36 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/b446afd34759150c2ea3b86ab794104e12e64db1.
|
36 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/be223bbc06bdad4ee7e615ad32f18c40a10dea81.
|
36 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/182c1e333b8514ac17dc463aac26b5552977a040.
|
36 |
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/b3e69109341a1017423af7981b8b84b646f5bcce.
|
36 |
.NET Framework 4.6.2
- System.Composition.AttributedModel (>= 9.0.0)
- System.Composition.Convention (>= 9.0.0)
- System.Composition.Hosting (>= 9.0.0)
- System.Composition.Runtime (>= 9.0.0)
- System.Composition.TypedParts (>= 9.0.0)
.NET 8.0
- System.Composition.AttributedModel (>= 9.0.0)
- System.Composition.Convention (>= 9.0.0)
- System.Composition.Hosting (>= 9.0.0)
- System.Composition.Runtime (>= 9.0.0)
- System.Composition.TypedParts (>= 9.0.0)
.NET 9.0
- System.Composition.AttributedModel (>= 9.0.0)
- System.Composition.Convention (>= 9.0.0)
- System.Composition.Hosting (>= 9.0.0)
- System.Composition.Runtime (>= 9.0.0)
- System.Composition.TypedParts (>= 9.0.0)
.NET Standard 2.0
- System.Composition.AttributedModel (>= 9.0.0)
- System.Composition.Convention (>= 9.0.0)
- System.Composition.Hosting (>= 9.0.0)
- System.Composition.Runtime (>= 9.0.0)
- System.Composition.TypedParts (>= 9.0.0)