//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// UserRTX.NET satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;

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

/// <summary>
/// Exception creator for “ArgumentNullException” (helper class)
/// </summary>
public static class e_argument_null {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public static ArgumentNullException New( string message ) =>
   NewX( null, message );

public static ArgumentNullException New( string messageFmt, params object?[] args ) =>
   NewX( null, messageFmt, args );

public static ArgumentNullException New( Exception error ) =>
   NewX( null, error );

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

public static ArgumentNullException NewWith( string paramName, string message ) =>
   NewX( paramName, message );

public static ArgumentNullException NewWith( string paramName,
                                             string messageFmt, params object?[] args ) =>
   NewX( paramName, messageFmt, args );

public static ArgumentNullException NewWith( string paramName, Exception error ) =>
   NewX( paramName, error );

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

public static ArgumentNullException NewX( string? paramName, string message ) =>
   new ArgumentNullException( paramName, message.TXT() );

public static ArgumentNullException NewX( string? paramName,
                                          string messageFmt, params object?[] args ) =>
   new ArgumentNullException( paramName, messageFmt.FMT( args ) );

public static ArgumentNullException NewX( string? paramName, Exception error ) =>
   new ArgumentNullException( paramName, error.Message );

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // e_argument_null

} // user_rtx (.wasm)
