mirror of
https://github.com/snltty/linker.git
synced 2025-09-27 13:32:14 +08:00
28 lines
591 B
C#
28 lines
591 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace linker.libs.web
|
|
{
|
|
/// <summary>
|
|
/// web服务
|
|
/// </summary>
|
|
public interface IWebApiServer
|
|
{
|
|
/// <summary>
|
|
/// 开始
|
|
/// </summary>
|
|
public void Start(int port);
|
|
|
|
public void AddController(IWebApiController controller);
|
|
public void AddControllers(List<IWebApiController> controllers);
|
|
}
|
|
|
|
public interface IWebApiController
|
|
{
|
|
public string Path { get; }
|
|
public Memory<byte> Handle(string query);
|
|
public void Free();
|
|
}
|
|
|
|
}
|