/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
v2.0.2
src/OneScript.Web.Server/RequestDelegateWrapper.cs
29 строк
960 B
akpaevj
Added license prefixes
13 июн 2024, 12:12
13 июн 2024, 12:12
a4fe0fd
Код
Авторство
О чём код?
/*---------------------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ----------------------------------------------------------*/ using Microsoft.AspNetCore.Http; using OneScript.Contexts; using ScriptEngine.Machine.Contexts; namespace OneScript.Web.Server { [ContextClass("ДелегатЗапроса", "RequestDelegate")] public class RequestDelegateWrapper : AutoContext<RequestDelegateWrapper> { private readonly RequestDelegate _delegate; public RequestDelegateWrapper(RequestDelegate item) { _delegate = item; } [ContextMethod("Вызвать", "Invoke")] public void Invoke(HttpContextWrapper httpContext) { _delegate.Invoke(httpContext.GetContext()); } } }