kdheath.Application.Helper 2.0.5

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package kdheath.Application.Helper --version 2.0.5
NuGet\Install-Package kdheath.Application.Helper -Version 2.0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="kdheath.Application.Helper" Version="2.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add kdheath.Application.Helper --version 2.0.5
#r "nuget: kdheath.Application.Helper, 2.0.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install kdheath.Application.Helper as a Cake Addin
#addin nuget:?package=kdheath.Application.Helper&version=2.0.5

// Install kdheath.Application.Helper as a Cake Tool
#tool nuget:?package=kdheath.Application.Helper&version=2.0.5

About

The Application.Helper package is a light-weight platform for .NET console applications.

See Change Log for all release notes.

Key Features

  • Supports .NET Framework, .NET Core, and .NET 5.0+

It provides:

  • The title of the program from the assembly attributes.
  • The name of the configuration file (if it can be determined).
  • The elapsed time of the starting and stopping of the program.
  • Methods to suspend and resume elapse time recording are available.
  • Indication of whether the program is running in debug mode.
  • Indication of whether help was requested from the command line arguments.

Main Types

  • ConsoleApp - Helper class for Console Applications.
  • GenericException - Represents errors that occur during application execution.

See .NET Helper Packages for technical documentation.

How to Use

To provide help information about the program:

  • Create a new class and use the ConsoleApp class as the base class.
  • Override the ShowProgramInfo() method. This is called during the start process and is triggered by the user providing a question mark (?) anywhere in the first argument.

To use in a C# program:

using Application.Helper;

private static readonly ConsoleApp sApp = new();

The main entry point method would look like:

static void Main( string[] args )
{
  var result = false;
  try
  {
    sApp.StartApp( args );
    Console.WriteLine( sApp.FormatTitleLine( " Starting " + sApp.Title + " " ) );
    result = Processing();
  }
  catch( Exception ex )
  {
    // Do something to log the error
  }
  finally
  {
    sApp.StopApp( result );
  }
  Environment.Exit( Environment.ExitCode );
}

The output looks like this:

Start..: 20:16:31.8915290

------------------- Starting Test Harness [Version 1.0.1.1] --------------------

Runtime: 00:00:00.2836824
Result.: Success

Press any key to continue . . .

Feedback

This is provided as open source under the MIT license.
Bug reports and contributions are welcome in the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on kdheath.Application.Helper:

Package Downloads
kdheath.Logging.Helper The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

The logging helper is a light-weight platform for .NET with rich log routing and management capabilities provided by NLog.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.5 57 5/1/2024
2.0.4 107 4/1/2024
2.0.3 156 3/3/2024
2.0.2 211 2/17/2024
2.0.1 1,165 12/8/2023
2.0.0 620 11/30/2023
1.0.3 596 11/21/2023
1.0.2 634 11/11/2023

* Include documentation files in release build packages.