Skip to content

Commit 3582866

Browse files
committed
Метод для остановки веб-сервера
1 parent 4eabe42 commit 3582866

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/OneScript.Web.Server/WebServer.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ public void Run()
7878
_app.Run();
7979
}
8080

81+
/// <summary>
82+
/// Останавливает веб-сервер
83+
/// </summary>
84+
[ContextMethod("Остановить", "Stop")]
85+
public void Stop()
86+
{
87+
_app?.StopAsync().Wait();
88+
}
89+
8190
private void ConfigureApp()
8291
{
8392
var appOptions = new WebApplicationOptions

0 commit comments

Comments
 (0)