namespace NewRock.Sdk;

public partial interface INewRockClient
{
    /// <summary>
    /// 执行操作设备请求
    /// </summary>
    /// <typeparam name="TRequest"></typeparam>
    /// <typeparam name="TResponse"></typeparam>
    /// <param name="request"></param>
    /// <param name="key">设备ReceiveKey</param>
    /// <param name="expired"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task<TResponse?> ExecuteAsync<TRequest, TResponse>(
        TRequest request,
        string key,
        int expired,
        CancellationToken cancellationToken) where TRequest : INewRockRequest where TResponse : NewRockResponse;
}