Adapter Pattern - Interfaces NuGet Package

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.




Got any Adapter Pattern - Interfaces Question?





Info

Version: 1.1.1301.1418
Author(s): Daniel Cazzulino
Last Update: Monday, January 14, 2013
.NET Fiddle: Create the first Fiddle
Project Url: https://github.org/clariuslabs/adapter
NuGet Url: https://www.nuget.org/packages/Adapter.Interfaces


Install
Install-Package Adapter.Interfaces
dotnet add package Adapter.Interfaces
paket add Adapter.Interfaces
Adapter.Interfaces Download (Unzip the "nupkg" after downloading)

1 package depend on this package.


Tags



STATS

must-have-score

.5

avg-downloads-per-day

1

days-since-last-release

4329