/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
v1.9.0
src/ASPNETHandler/HTTPServiceContext.cs
53 строки
2 KB
EvilBeaver
Глобальная чистка неиспользуемых using
24 дек 2021, 11:01
24 дек 2021, 11:01
c343f53
Код
Авторство
О чём код?
/*---------------------------------------------------------- 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 ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; namespace ScriptEngine.HostedScript.Library.HTTPService { [ContextClass("HTTPСервисКонтекст", "HTTPServiceContext")] public class HTTPServiceContextImpl : AutoContext<HTTPServiceContextImpl> { System.Web.HttpContext _context; SessionStateImpl _sessionState; public HTTPServiceContextImpl(System.Web.HttpContext context) { _context = context; _sessionState = new SessionStateImpl(_context); } [ContextProperty("ФизическийПуть", "PhysicalPath")] public IValue PhysicalPath { get { return ValueFactory.Create(_context.Request.PhysicalPath); } } [ContextProperty("АдресКлиента", "UserHostAddress")] public IValue UserHostAddress { get { return ValueFactory.Create(_context.Request.UserHostAddress); } } [ContextProperty("Сессия", "Session")] public SessionStateImpl Session { get { return _sessionState; } } } }