Mdl.HostedConsoleApplication 1.0.1 Prefix Reserved

Install-Package Mdl.HostedConsoleApplication -Version 1.0.1
dotnet add package Mdl.HostedConsoleApplication --version 1.0.1
<PackageReference Include="Mdl.HostedConsoleApplication" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mdl.HostedConsoleApplication --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Mdl.HostedConsoleApplication, 1.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Mdl.HostedConsoleApplication as a Cake Addin
#addin nuget:?package=Mdl.HostedConsoleApplication&version=1.0.1

// Install Mdl.HostedConsoleApplication as a Cake Tool
#tool nuget:?package=Mdl.HostedConsoleApplication&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

HostedConsoleApplication

This is a simple extension method to build console applications the same way we build web apps.

How to use

Bellow there is a basic example. More samples can be found under the dedicated folder.

using Mdl.HostedConsoleApplication;

namespace Examples
{
    public class Program
    {
        public static async Task Main(string[] args)
        {
            var builder = new HostBuilder();
            // configurations goes here

            await builder.RunConsoleApplicationAsync<Application>();
        }
    }
    
    public class Application : IHostedConsoleApplication
    {
        public async Task RunAsync(CancellationToken cancellationToken)
        {
            // inject your dependecies and code your best console app :) 
        }
    }
}

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
1.0.1 86 6/11/2021