Class ControllerObservableQueryAdapter
- Namespace
- Cratis.Arc.Queries
- Assembly
- Cratis.Arc.dll
Represents an ASP.NET Core controller-specific adapter for handling observable query results.
[Singleton]
public class ControllerObservableQueryAdapter
- Inheritance
-
ControllerObservableQueryAdapter
- Inherited Members
- Extension Methods
Constructors
ControllerObservableQueryAdapter(IQueryContextManager, ILogger<ControllerObservableQueryAdapter>)
Represents an ASP.NET Core controller-specific adapter for handling observable query results.
public ControllerObservableQueryAdapter(IQueryContextManager queryContextManager, ILogger<ControllerObservableQueryAdapter> logger)
Parameters
queryContextManagerIQueryContextManagerloggerILogger<ControllerObservableQueryAdapter>ILogger for logging.
Methods
HandleControllerStreamingResult(ActionExecutingContext, ActionExecutedContext?, ObjectResult)
Handles streaming result for controller-based actions.
public Task HandleControllerStreamingResult(ActionExecutingContext context, ActionExecutedContext? actionExecutedContext, ObjectResult objectResult)
Parameters
contextActionExecutingContextactionExecutedContextActionExecutedContextThe ActionExecutedContext from the action execution.
objectResultObjectResultThe ObjectResult containing the streaming data.
Returns
ShouldHandleAsSSE(ActionExecutingContext)
Determines if the current request should be handled as a Server-Sent Events (SSE) connection.
public bool ShouldHandleAsSSE(ActionExecutingContext context)
Parameters
contextActionExecutingContext
Returns
- bool
True if the request should be handled as SSE, false otherwise.
ShouldHandleAsWebSocket(HttpContext)
Determines if the current request should be handled as a WebSocket connection.
public bool ShouldHandleAsWebSocket(HttpContext httpContext)
Parameters
httpContextHttpContextThe HttpContext.
Returns
- bool
True if the request should be handled as WebSocket, false otherwise.
ShouldHandleAsWebSocket(ActionExecutingContext)
Determines if the current request should be handled as a WebSocket connection.
public bool ShouldHandleAsWebSocket(ActionExecutingContext context)
Parameters
contextActionExecutingContext
Returns
- bool
True if the request should be handled as WebSocket, false otherwise.