Skip to content

DotsiderResponse

Namespace: Dotsider.Core.Protocol

Assembly: Dotsider.Core.dll

JSON response from a dotsider diagnostics socket.

public sealed class DotsiderResponse

ObjectDotsiderResponse

Response payload, serialized as the appropriate type.

Returns: Object

public object? 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; }

Creates an error response with the given message.

Parameters:

Returns: DotsiderResponse

public static DotsiderResponse Fail(string error)

Creates a successful response with the given data.

Parameters:

Returns: DotsiderResponse

public static DotsiderResponse Ok(object? data = null)