using System;
using u = user_rtx;

namespace Test {

class Program {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

const string
   AppSimpleName = "Test",
   MainModuleName = $"{AppSimpleName}.dll";

static int Main(string[] args)
{
   var fc = new u.FatalCfg() {
      // If the app. is started through dotnet-command, this name will be used instead of "dotnet" for report subfolder of temporary system folder in user profile:
      AppSimpleName = AppSimpleName,
      AllowProcessTermination = true,
      UseMessageDialog = true
   };
   // If the app. is started through dotnet-command, this name will be used instead of "dotnet.exe" for error message dialog and HTML-report:
   if ( Compilation.IsDebug )
      fc.MainModuleName = MainModuleName;
   fc.SetMainThreadValue();
   u.fatal.Settings = fc;
   u.fatal.RaiseOnUnhandledException = true;

   //u.program.ExplicitSimpleName = appSimpleName;
   u.program.SetMainThreadValue();

   Console.WriteLine( "Hello World!" );
   u.fatal.RaiseError( "Unrecoverable error has occured.", "Program data was corrupted." );
   u.sound.PlaySuccess();
   //u.sound.PlayError();
   u.beeper.WaitForPlaybackFinish();

   return 0;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // Program

} // Test
