Assembly: OptimaJet.Workflow.Api

Class HubOperationResult

OptimaJet.Workflow.Api.Configuration.HubOperationResult

A successful SignalR completion or an explicit client-visible failure.

public sealed class HubOperationResult

Properties

public bool IsSuccess { get; } #
Gets whether this completion is successful.
public object? Value { get; } #
Gets the successful return value, including null for a null/void completion.
public string? Error { get; } #
Gets the client-visible error message, or null on success.

Methods

public static HubOperationResult Success(object? value = null) #
Creates a successful completion.

Parameters

Name
Type
Description
value
Object
The value to serialize to the caller, or null.

Returns

Type
Description
HubOperationResult
The completion.
public static HubOperationResult Failure(string error) #
Creates a failed completion with a message safe to expose to the caller.

Parameters

Name
Type
Description
error
String
The client-visible error message.

Returns

Type
Description
HubOperationResult
The completion.

Remarks

Use Success(null) for a completed null/void result. A null callback return instead means continue or leave an exception unhandled.