[fix]Config创建默认配置文件的开关Runtime.CreateConfigOnMissing,仅需对自动创建生效,而不应该阻止用户主动Save
智能大石头 authored at 2024-08-09 00:30:41 石头 committed at 2024-08-10 14:22:24
852.00 B
X
namespace NewLife.Remoting;

/// <summary>应用接口客户端接口</summary>
public interface IApiClient
{
    /// <summary>令牌。每次请求携带</summary>
    String Token { get; set; }

    /// <summary>同步调用,阻塞等待</summary>
    /// <param name="action">服务操作</param>
    /// <param name="args">参数</param>
    /// <returns></returns>
    TResult Invoke<TResult>(String action, Object args = null);

    /// <summary>异步调用,等待返回结果</summary>
    /// <typeparam name="TResult"></typeparam>
    /// <param name="action">服务操作</param>
    /// <param name="args">参数</param>
    /// <param name="cancellationToken">取消通知</param>
    /// <returns></returns>
    Task<TResult> InvokeAsync<TResult>(String action, Object args = null, CancellationToken cancellationToken = default);
}