DotnetInlineHost 0.4.0
This package was a small try out to write integration tests, but there are better ways to achieve integration testing in Console Applications in .NET.
dotnet add package DotnetInlineHost --version 0.4.0
NuGet\Install-Package DotnetInlineHost -Version 0.4.0
<PackageReference Include="DotnetInlineHost" Version="0.4.0" />
paket add DotnetInlineHost --version 0.4.0
#r "nuget: DotnetInlineHost, 0.4.0"
// Install DotnetInlineHost as a Cake Addin #addin nuget:?package=DotnetInlineHost&version=0.4.0 // Install DotnetInlineHost as a Cake Tool #tool nuget:?package=DotnetInlineHost&version=0.4.0
DotnetInlineHost
Introduction
DotnetInlineHost is a small utility package that allows you to quickly spin up an IHost instance with the option to pass along a custom configuration provider as simple key-values. A use-case of this utility is in Integration Tests where you can quickly spin up a host with custom configuration data without writing your own JSON appsettings.
How to use
Install the DotnetInlineHost package through the NuGet UI in Visual Studio or use the command line:
Dotnet CLI: dotnet add package DotnetInlineHost --version 0.2.0
Nuget Package manager: Install-Package DotnetInlineHost -Version 0.2.0
This tool and its README are a work-in-progress. Stay tuned for more.
Use it in code
You can now easily create an IHost object by calling InlineHost.Build();
.
Optionally pass in a Dictionary<string, string?>
for configuration data and a Dependency Injection delegate to register your services with.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.Extensions.Configuration (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Hosting (>= 7.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|