Class RequireActiveSessionAttribute
- Namespace
- Hi.MachiningProcs
- Assembly
- HiNc.dll
Action filter for the session-scoped web-API surface: before a guarded action runs, verifies a machining session is active (SessionShell is non-null). When none is active it short-circuits with HTTP 409 and an NoActiveSession() envelope, so a REST / AI caller gets a helpful “call BeginSession() first” notice instead of a null-reference 500. Apply at the controller level; exempt the session lifecycle entry points (BeginSession / EndSession) with AllowNoActiveSessionAttribute.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false)]
public sealed class RequireActiveSessionAttribute : Attribute, IActionFilter, IFilterMetadata
- Inheritance
-
RequireActiveSessionAttribute
- Implements
- Inherited Members
- Extension Methods
Methods
OnActionExecuted(ActionExecutedContext)
Called after the action executes, before the action result.
public void OnActionExecuted(ActionExecutedContext context)
Parameters
contextActionExecutedContext
OnActionExecuting(ActionExecutingContext)
Called before the action executes, after model binding is complete.
public void OnActionExecuting(ActionExecutingContext context)
Parameters
contextActionExecutingContext