clarius - Adapter.Composition.Source 1.1.1310.2819

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.

PM> Install-Package Adapter.Composition.Source -Version 1.1.1310.2819 -Source https://www.myget.org/F/clarius/api/v3/index.json

Copy to clipboard

> nuget.exe install Adapter.Composition.Source -Version 1.1.1310.2819 -Source https://www.myget.org/F/clarius/api/v3/index.json

Copy to clipboard

> dotnet add package Adapter.Composition.Source --version 1.1.1310.2819 --source https://www.myget.org/F/clarius/api/v3/index.json

Copy to clipboard
<PackageReference Include="Adapter.Composition.Source" Version="1.1.1310.2819" />
Copy to clipboard
source https://www.myget.org/F/clarius/api/v3/index.json

nuget Adapter.Composition.Source  ~> 1.1.1310.2819
Copy to clipboard

> choco install Adapter.Composition.Source --version 1.1.1310.2819 --source https://www.myget.org/F/clarius/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "clarius" -SourceLocation "https://www.myget.org/F/clarius/api/v2"
Install-Module -Name "Adapter.Composition.Source" -RequiredVersion "1.1.1310.2819" -Repository "clarius" 
Copy to clipboard

v1.1

  • Additional support for source packages, like Adapter.Interfaces.Source, which also use token replacement and adopt the containing project root namespace.

v1.0

  • Initial version, with support for flexible matching of from and to types
  • Support for MEF in separate Adapter.Composition package
  • Proper split of: Adapter.Interfaces, Adapter.Sdk and Adapter (implementation).
  • .NETFramework 4.0: 4.0.0.0
  • .NETFramework 4.5: 4.5.0.0

Owners

Clarius Labs

Authors

Daniel Cazzulino

Project URL

https://github.org/clariuslabs/adapter

License

BSD-2-Clause

Tags

patterns adapter

Info

67 total downloads
16 downloads for version 1.1.1310.2819
Download (9.22 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
1.1.1310.2819 9.22 KB Mon, 28 Oct 2013 19:41:01 GMT 16
1.1.1301.1418 9.22 KB Mon, 14 Jan 2013 18:15:35 GMT 6
1.0.1301.1416 9.22 KB Mon, 14 Jan 2013 16:26:46 GMT 4
1.0.1212.1016 9.22 KB Mon, 10 Dec 2012 16:50:32 GMT 13
1.0.1212.0617 9.21 KB Thu, 06 Dec 2012 17:30:29 GMT 5
1.0.1212.0616 9.21 KB Thu, 06 Dec 2012 16:41:31 GMT 3
1.0.1212.0612 9.21 KB Thu, 06 Dec 2012 12:28:04 GMT 5
1.0.1212.0523 9.2 KB Wed, 05 Dec 2012 23:22:03 GMT 5
1.0.1212.0522 9.17 KB Wed, 05 Dec 2012 22:16:00 GMT 4
1.0.1212.0519 9.18 KB Wed, 05 Dec 2012 19:50:13 GMT 3
1.0.1212.0506 9.17 KB Wed, 05 Dec 2012 06:27:14 GMT 3