using System.Threading.Tasks;

namespace Hua.Todo.Avalonia.Services;

/// <summary>
/// 嵌入式 Web 服务器接口
/// </summary>
public interface IEmbeddedWebServerService
{
    /// <summary>
    /// 服务器是否正在运行
    /// </summary>
    bool IsRunning { get; }

    /// <summary>
    /// 服务器基础 URL
    /// </summary>
    string BaseUrl { get; }

    /// <summary>
    /// 异步启动服务器
    /// </summary>
    Task StartAsync();

    /// <summary>
    /// 异步停止服务器
    /// </summary>
    Task StopAsync();
}
