//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// UserRTX.NET satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using System.Reflection;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;

#if !WASM
namespace user_rtx { using u = user_rtx;
#else
namespace user_rtx.wasm { using u = user_rtx.wasm;
#endif

/// <summary>
/// Trace output helpers
/// </summary>
public static partial class trace {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[Conditional( "TRACE" )]
public static void Print() =>
   Tracer.Print();

[Conditional( "TRACE" )]
public static void Print( string message ) =>
   Tracer.Print( message );

[Conditional( "TRACE" )]
public static void Print( string messageFmt, params object?[] args ) =>
   Tracer.Print( messageFmt, args );

[Conditional( "TRACE" )]
public static void Print( object obj ) =>
   Tracer.Print( obj );

//--------------------------------------------------------------------------------------------------

[Conditional( "TRACE" )]
public static void Print( u.TraceMessageCategory messageCategory, string message ) =>
   Tracer.Print( messageCategory, message );

[Conditional( "TRACE" )]
public static void Print( u.TraceMessageCategory messageCategory,
                          string messageFmt, params object?[] args ) =>
   Tracer.Print( messageCategory, messageFmt, args );

//--------------------------------------------------------------------------------------------------

[Conditional( "TRACE" )]
public static void PrintInfo( string message ) =>
   Tracer.PrintInfo( message );

[Conditional( "TRACE" )]
public static void PrintInfo( string messageFmt, params object?[] args ) =>
   Tracer.PrintInfo( messageFmt, args );

//--------------------------------------------------------------------------------------------------

[Conditional( "TRACE" )]
public static void PrintComment( string message ) =>
   Tracer.PrintComment( message );

[Conditional( "TRACE" )]
public static void PrintComment( string messageFmt, params object?[] args ) =>
   Tracer.PrintComment( messageFmt, args );

//--------------------------------------------------------------------------------------------------

[Conditional( "TRACE" )]
public static void PrintWarning( string message ) =>
   Tracer.PrintWarning( message );

[Conditional( "TRACE" )]
public static void PrintWarning( string messageFmt, params object?[] args ) =>
   Tracer.PrintWarning( messageFmt, args );

//--------------------------------------------------------------------------------------------------

[Conditional( "TRACE" )]
public static void PrintError( string message ) =>
   Tracer.PrintError( message );

[Conditional( "TRACE" )]
public static void PrintError( string messageFmt, params object?[] args ) =>
   Tracer.PrintError( messageFmt, args );

[Conditional( "TRACE" )]
public static void PrintError( Exception e ) =>
   Tracer.PrintError( e );

//==================================================================================================

[Conditional( "TRACE" )]
public static void PrintOperation( string message ) =>
   Tracer.PrintOperation( message );

[Conditional( "TRACE" )]
public static void PrintOperation( string messageFmt, params object?[] args ) =>
   Tracer.PrintOperation( messageFmt, args );

//--------------------------------------------------------------------------------------------------

[Conditional( "TRACE" )]
public static void PrintOperation( bool informationCategory, string message ) =>
   Tracer.PrintOperation( informationCategory, message );

[Conditional( "TRACE" )]
public static void PrintOperation( bool informationCategory,
                                   string messageFmt, params object?[] args ) =>
   Tracer.PrintOperation( informationCategory, messageFmt, args );

//==================================================================================================

[Conditional( "TRACE" )]
public static void DetailedPrint( string caption, string details ) =>
   Tracer.DetailedPrint( caption, details );

[Conditional( "TRACE" )]
public static void DetailedPrint( string caption, string detailsFmt, params object?[] args ) =>
   Tracer.DetailedPrint( caption, detailsFmt, args );

//--------------------------------------------------------------------------------------------------

[Conditional( "TRACE" )]
public static void DetailedPrint( u.TraceMessageCategory messageCategory,
                                  string caption, string details ) =>
   Tracer.DetailedPrint( messageCategory, caption, details );

[Conditional( "TRACE" )]
public static void DetailedPrint( u.TraceMessageCategory messageCategory, string caption,
                                  string detailsFmt, params object?[] args ) =>
   Tracer.DetailedPrint( messageCategory, caption, detailsFmt, args );

//--------------------------------------------------------------------------------------------------

[Conditional( "TRACE" )]
public static void DetailedPrintInfo( string caption, string details ) =>
   Tracer.DetailedPrintInfo( caption, details );

[Conditional( "TRACE" )]
public static void DetailedPrintInfo( string caption, string detailsFmt, params object?[] args ) =>
   Tracer.DetailedPrintInfo( caption, detailsFmt, args );

//--------------------------------------------------------------------------------------------------

[Conditional( "TRACE" )]
public static void DetailedPrintWarning( string caption, string details ) =>
   Tracer.DetailedPrintWarning( caption, details );

[Conditional( "TRACE" )]
public static void DetailedPrintWarning( string caption,
                                         string detailsFmt, params object?[] args ) =>
   Tracer.DetailedPrintWarning( caption, detailsFmt, args );

//--------------------------------------------------------------------------------------------------

[Conditional( "TRACE" )]
public static void DetailedPrintError( string caption, string details ) =>
   Tracer.DetailedPrintError( caption, details );

[Conditional( "TRACE" )]
public static void DetailedPrintError( string caption, string detailsFmt, params object?[] args ) =>
   Tracer.DetailedPrintError( caption, detailsFmt, args );

[Conditional( "TRACE" )]
public static void DetailedPrintError( u.TraceMessageCategory messageCategory,
                                       string caption, Exception e ) =>
   Tracer.DetailedPrintError( messageCategory, caption, e );

//==================================================================================================

internal static readonly u.Tracer
   Tracer = new u.Tracer( false );

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // trace

} // user_rtx (.wasm)
