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

#if !WASM
namespace CommonHelpers {
#else
namespace CommonHelpers.WASM {
#endif

//**************************************************************************************************
/// <summary>
/// </summary>
public static partial class HArgTypeExceptionCreator {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="ArgumentNullException" />
public static HArgumentTypeException Create(string messageFmt,params object[] parameters)
{
   HArgChecking.VerifyNotNulls( messageFmt, parameters );
   return new HArgumentTypeException(string.Format( messageFmt, parameters ));
}
/// <exception cref="ArgumentNullException" />
public static HArgumentTypeException Create(Exception error)
{
   HArgChecking.VerifyNotNulls( error );
   return new HArgumentTypeException( HException.GetErrorMessage( error ) );
}

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

/// <exception cref="ArgumentNullException" />
public static HArgumentTypeException Create( string paramName,
                                             string messageFmt, params object[] parameters )
{
   HArgChecking.VerifyNotNulls( paramName, messageFmt, parameters );
   return new HArgumentTypeException( string.Format( messageFmt, parameters ), paramName );
}
/// <exception cref="ArgumentNullException" />
public static HArgumentTypeException Create(Exception error,string paramName)
{
   HArgChecking.VerifyNotNulls( error );
   return new HArgumentTypeException( HException.GetErrorMessage( error ), paramName );
}

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

static HArgTypeExceptionCreator()
{
   CommonHelpers_Core.Access();
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HArgTypeExceptionCreator
//**************************************************************************************************

} // CommonHelpers (.WASM)
