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

queryContextManager IQueryContextManager

IQueryContextManager.

logger ILogger<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

context ActionExecutingContext

The ActionExecutingContext.

actionExecutedContext ActionExecutedContext

The ActionExecutedContext from the action execution.

objectResult ObjectResult

The ObjectResult containing the streaming data.

Returns

Task

A Task representing the asynchronous operation.

ShouldHandleAsSSE(ActionExecutingContext)

Determines if the current request should be handled as a Server-Sent Events (SSE) connection.

public bool ShouldHandleAsSSE(ActionExecutingContext context)

Parameters

context ActionExecutingContext

The ActionExecutingContext.

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

httpContext HttpContext

The 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

context ActionExecutingContext

The ActionExecutingContext.

Returns

bool

True if the request should be handled as WebSocket, false otherwise.