Skip to content

DotsiderResponse

Namespace: Dotsider.Core.Protocol

Assembly: Dotsider.Core.dll

JSON response from a dotsider diagnostics socket.

public sealed class DotsiderResponse

ObjectDotsiderResponse

public DotsiderResponse()

Response payload.

Returns: Nullable<JsonElement>

public JsonElement? Data { get; set; }

Error message if the request failed.

Returns: String

public string? Error { get; set; }

Whether the request succeeded.

Returns: Boolean

public bool Success { get; set; }

Protocol version echoed in every response.

Returns: Int32

[JsonRequired]
public int V { get; set; }

Creates an error response with the given message.

Parameters:

Returns: DotsiderResponse

public static DotsiderResponse Fail(string error)

Creates a successful response without a payload.

Returns: DotsiderResponse

public static DotsiderResponse Ok()

Creates a successful response from an existing JSON payload.

Parameters:

Returns: DotsiderResponse

public static DotsiderResponse Ok(JsonElement? data)

Creates a successful response using source-generated JSON metadata.

Parameters:

Returns: DotsiderResponse

public static DotsiderResponse Ok<T>(T data, JsonTypeInfo<T> jsonTypeInfo)

Creates a successful response using the protocol’s source-generated metadata.

Parameters:

  • data (<T>)

Returns: DotsiderResponse

public static DotsiderResponse Ok<T>(T data)