Skip to content

DataResponse

Inherits ResponseBlock

Public Static Functions

DataResponse

SuccessIfDefined(string key, object? value, string failMessage, = "")

Creates a success response if the value is defined (not null or empty). Returns a success response if the value is defined; otherwise, a failure response with the specified message.

DataResponse

Success(string key, object? value)

Creates a success response with the specified key and value. Returns a success response with the specified key and value.

DataResponse

Success<TValue>(string key, ReadOnlySpan value)

Creates a success response with the specified key and value. Returns a success response with the specified key and value.

DataResponse

FailTemporary(string key, string message, = "")

Creates a failure response with the specified key and message.

DataResponse

FailPermanent(string key, string message, = "")

Creates a failure response with the specified key and message.

DataResponse

DelayEstimated(string key, SITimeSpan delay, = default, string message, = "")

Creates a delay estimated response with the specified key and message.

Protected Functions

object?

Filter(object? value)

Filters the value to remove any unwanted characters. Returns the filtered value.

Public Attributes

string

Key

The key corresponding to the requested value.

JToken?

Value

The value returned by the client.

EffectStatus

Status

The status of the request.

SITimeSpan?

TimeRemaining

The due time of the request, if applicable.