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.Source |
Install
Install-Package Adapter.Interfaces.Source
dotnet add package Adapter.Interfaces.Source
paket add Adapter.Interfaces.Source
Adapter.Interfaces.Source Download (Unzip the "nupkg" after downloading)
Dependencies
- netfx-Guard(1.3.3.0)
- netfx-System.AmbientSingleton(1.2.0.0)
Tags
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.