clariuslabs
NuGet publisher profile
Packages (16)
Adapter.Interfaces.Source
Only two APIs are provided: the IAdapterService and its facade extension method As in the Adapters type. You can chose to use the former service directly instead of the convenience extension method. You don't lose any testability in doing either way, although you do need to pass around the adapter service in one case. ======= Example ======= // Calling code assumes there is a service always setup before invoking. // If there isn't, an InvalidOperationException is thrown automatically. // 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.
Adapter.Interfaces
Only two APIs are provided: the IAdapterService and its facade extension method As in the Adapters type. You can chose to use the former service directly instead of the convenience extension method. You don't lose any testability in doing either way, although you do need to pass around the adapter service in one case. ======= Example ======= // Calling code assumes there is a service always setup before invoking. // If there isn't, an InvalidOperationException is thrown automatically. // 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.
Adapter
The provided adapter pattern allows to convert any object to any other supported type, as provided by the registered adapters. This package is a convenience grouping of all three separate pieces, for cases where you want to deploy all of them in a single project. ======= Example ======= IProject project = GetCurrentProject(); // 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 ======= public class ProjectToMsBuildAdapter : IAdapter<IProject, IMSBuildProject> { // Implement actual conversion. } The conversion behavior is now decoupled from the usage.
Adapter.Implementation
The provided adapter pattern allows to convert any object to any other supported type, as provided by the registered adapters. This package provides the actual implementation of the service. It should only be added to the bootstrapping component of your application. ======= Example ======= IProject project = GetCurrentProject(); // 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 ======= public class ProjectToMsBuildAdapter : IAdapter<IProject, IMSBuildProject> { // Implement actual conversion. } The conversion behavior is now decoupled from the usage. Note that to create adapter implementations, you need to install the Adapter.Sdk package.
Adapter.Sdk.Source
The only contract provided by this assembly is the IAdapter interface. This is the interface that the adapter service implementation interacts with. As such, the SDK does not have any other external dependencies, since it's the adapter service that consumes this interface. The client-facing code does not need to know about adapters either. ======= Example ======= public class ProjectToMsBuildAdapter : IAdapter<IProject, IMSBuildProject> { // Implement actual conversion. }
Adapter.Implementation.Source
The provided adapter pattern allows to convert any object to any other supported type, as provided by the registered adapters. This package provides the actual implementation of the service. It should only be added to the bootstrapping component of your application. ======= Example ======= IProject project = GetCurrentProject(); // 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 ======= public class ProjectToMsBuildAdapter : IAdapter<IProject, IMSBuildProject> { // Implement actual conversion. } The conversion behavior is now decoupled from the usage. Note that to create adapter implementations, you need to install the Adapter.Sdk package.
Adapter.Sdk
The only contract provided by this assembly is the IAdapter interface. This is the interface that the adapter service implementation interacts with. As such, the SDK does not have any other external dependencies, since it's the adapter service that consumes this interface. The client-facing code does not need to know about adapters either. ======= Example ======= public class ProjectToMsBuildAdapter : IAdapter<IProject, IMSBuildProject> { // Implement actual conversion. }
Adapter.Source
The provided adapter pattern allows to convert any object to any other supported type, as provided by the registered adapters. This package is a convenience grouping of all three separate pieces, for cases where you want to deploy all of them in a single project. ======= Example ======= IProject project = GetCurrentProject(); // 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 ======= public class ProjectToMsBuildAdapter : IAdapter<IProject, IMSBuildProject> { // Implement actual conversion. } The conversion behavior is now decoupled from the usage.
CommonComposition.Autofac.Source
Provides the Common Composition bindings for Autofac.
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.
CommonComposition.Source
Portable component composition annotations, dependency injection framework agnostic. Automatically register your application components by convention with the most popular DI frameworks, while keeping your code container-agnostic.
CommonComposition.Windsor.Source
Provides the Common Composition bindings for Windsor.
CommonComposition.Ninject.Source
Provides the Common Composition bindings for Ninject.
CommonComposition.Unity.Source
Provides the Common Composition bindings for Unity.
Adapter.Composition
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.
Tracer.Realtime
A trace listener that leverages SignalR to enable remote real-time diagnostics of apps.