IWebContextService¶
Contract for reading, creating, and saving the BOL web context through the BOL Context API. WebContextService implements it.
Purpose¶
- Provide context lookup by context id or by session and application, and context persistence (BR-BOLMIDDLEWARE-001).
Context¶
- Namespace:
BolMiddleware.Services.Context - Assembly/package:
BolMiddleware
Public members¶
| Member | Signature | Purpose |
|---|---|---|
SaveContext |
bool SaveContext(ContextSaveRequest request) |
Persists the context and returns whether it succeeded. |
GetContext |
ContextResult GetContext(string contextId) |
Fetches the context stored under a context id. |
GetContext |
ContextResult GetContext(string sessionId, string applicationName) |
Fetches the latest context for the session and application. |
NewContext |
ContextResult NewContext(string sessionId, string applicationName) |
Creates a fresh context for the session and application. |
Behavioral notes¶
- Implementations swallow errors and return empty results (BR-BOLMIDDLEWARE-021).
Constraints and usage notes¶
- Registered as singleton.
Sources¶
- src/BolMiddleware/Services/Context/IWebContextService.cs