//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// UserRTX.NET satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
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>
/// Exception creator for “EOperationFailed” (helper class)
/// </summary>
public static class e_operation_failed {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public static EOperationFailed New( string messageFmt, params object?[] args ) =>
   e_impl<EOperationFailed>.New( messageFmt, args );

public static EOperationFailed New( Exception error ) =>
   e_impl<EOperationFailed>.New( error );

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

/// <exception cref="EOperationFailed" />
public static void Do( Action action ) =>
   e_impl<EOperationFailed>.Do( action );

/// <exception cref="EOperationFailed" />
public static R Do<R>( Func<R> function ) =>
   e_impl<EOperationFailed>.Do<R>( function );

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

/// <exception cref="EOperationFailed" />
public static Task Do_A( Func<Task> actionA ) =>
   e_impl<EOperationFailed>.Do_A( actionA );

/// <exception cref="EOperationFailed" />
public static Task<R> Do_A<R>( Func<Task<R>> functionA ) =>
   e_impl<EOperationFailed>.Do_A<R>( functionA );

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // e_operation_failed

} // user_rtx (.wasm)
