//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// CommonHelpers satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;

namespace CommonHelpers {

//**************************************************************************************************
partial class HSP {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="ArgumentNullException" />
/// <exception cref="InvalidCastException" />
/// <exception cref="ObjectDisposedException" />
/// <exception cref="HDatabaseException" />
[HAsyncStatic][HStrictResult]
public static async Task<List<RSet_Item>> DoReaderCommandVerify_A<RSet_Item>(
   [HOptional] HSPResultParameters? resultParameters, SqlCommand command )
where RSet_Item: new() =>
   VerifyRSet( await NakedDoReaderCommandX_A<RSet_Item>(
      delegate{ VerifyResultParamsIfNotNull( resultParameters ); },
      command ).ConfigureAwait(false) );

/// <exception cref="ArgumentNullException" />
/// <exception cref="InvalidCastException" />
/// <exception cref="HDatabaseException" />
[HAsyncStatic][HStrictResult]
public static async Task<List<RSet_Item>> DoReaderCommandVerify_A<RSet_Item>(
   [HOptional] HSPResultParameters? resultParameters, string commandText )
where RSet_Item: new() =>
   VerifyRSet( await NakedDoReaderCommandX_A<RSet_Item>(
      delegate{ VerifyResultParamsIfNotNull( resultParameters ); },
      commandText ).ConfigureAwait(false) );
/// <exception cref="ArgumentNullException" />
/// <exception cref="InvalidCastException" />
/// <exception cref="HDatabaseException" />
[HAsyncStatic][HStrictResult]
public static async Task<List<RSet_Item>> DoReaderCommandVerify_A<RSet_Item>(
   [HOptional] HSPResultParameters? resultParameters,
   string commandText, params SqlParameter[] sqlParams )
where RSet_Item: new() =>
   VerifyRSet( await NakedDoReaderCommandX_A<RSet_Item>(
      delegate{ VerifyResultParamsIfNotNull( resultParameters ); },
      commandText, sqlParams ).ConfigureAwait(false) );

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

/// <exception cref="ArgumentNullException" />
/// <exception cref="InvalidCastException" />
/// <exception cref="HDatabaseException" />
[HAsyncStatic][HStrictResult]
public static async Task<List<RSet_Item>> DoReaderCommandVerifyFmt_A<RSet_Item>(
   [HOptional] HSPResultParameters? resultParameters,
   string commandTextFmt, params object?[] parameters )
where RSet_Item: new() =>
   VerifyRSet( await NakedDoReaderCommandFmtX_A<RSet_Item>(
      delegate{ VerifyResultParamsIfNotNull( resultParameters ); },
      commandTextFmt, parameters ).ConfigureAwait(false) );

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HSP
//**************************************************************************************************

} // CommonHelpers
