Skip to main content
Adapter.Composition.Source package icon

Adapter.Composition.Source

The provided ComposedAdapterService exports the IAdapterService interface, and "imports many" IAdapter implementations. Initialize your composition container so that it contains both the exported adapters and the adapter service, and it will be initialized automatically for use. ======= Example ======= // Initialize container with your assemblies/types/catalogs CompositionContainer container = new CompositionContainer(catalog); // Retrieve initialized adapter service IAdapterService service = container.GetExportedValue<IAdapterService>(); // Initialize the adapter facade with the service Adapters.SetService(service); // Use adapter extension method As as needed, i.e. // say we need to use it as an MSBuild project, if possible IMSBuildProject msbuild = project.As<IMSBuildProject>(); if (msbuild != null) // do MSBuild stuff with it. ======= Adapters ======= [Export(typeof(IAdapter))] public class ProjectToMsBuildAdapter : IAdapter<IProject, IMSBuildProject> { // Implement actual conversion. } Simply by exporting the right contract, the adapter service will locate it. Note that to create adapter implementations, you need to install the Adapter.Sdk package.

Total Downloads
11.3K
11,298
Published
Jan 14, 2013
Latest stable version

Install

.NET CLI
dotnet add package Adapter.Composition.Source --version 1.1.1301.1418
Package Manager Console
Install-Package Adapter.Composition.Source -Version 1.1.1301.1418
PackageReference
<PackageReference Include="Adapter.Composition.Source" Version="1.1.1301.1418" />

Frameworks

No framework metadata available.

Dependencies

No declared dependencies.

Adoption guide

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.