using System;
using System.Runtime.CompilerServices;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Net.Http;
using Microsoft.AspNetCore.Components;

using CommonHelpers.WASM;
using AFXUI;

namespace BookRegistry.Client {

//**************************************************************************************************
partial class XServiceBase {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="ArgumentNullException" />
/// <exception cref="UEscapeException" />
protected Task<ServiceInvocationResult<R>> ESC_Invoke_A<R>(
   object argumentsObj,
   [HRequired][CallerMemberName] string? methodName=null )
where R: GeneralApiResponse =>
   ESC_InvokeAction_A<R>( HArgChecking.NN( methodName ), argumentsObj );

/// <exception cref="ArgumentNullException" />
/// <exception cref="UEscapeException" />
protected Task<ServiceInvocationResult<R>> ESC_Invoke_A<R>(
   bool alterActionName, object argumentsObj,
   [HRequired][CallerMemberName] string? methodName=null )
where R: GeneralApiResponse =>
   ESC_InvokeAction_A<R>( alterActionName, HArgChecking.NN( methodName ), argumentsObj );

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // XServiceBase
//**************************************************************************************************

} // BookRegistry.Client
