DotsiderResponse
Namespace: Dotsider.Core.Protocol
Assembly: Dotsider.Core.dll
JSON response from a dotsider diagnostics socket.
public sealed class DotsiderResponseInheritance
Section titled “Inheritance”Object → DotsiderResponse
Constructors
Section titled “Constructors”DotsiderResponse()
Section titled “DotsiderResponse()”public DotsiderResponse()Properties
Section titled “Properties”Response payload.
Returns: Nullable<JsonElement>
public JsonElement? Data { get; set; }Error message if the request failed.
Returns: String
public string? Error { get; set; }Success
Section titled “Success”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; }Methods
Section titled “Methods”Fail(string)
Section titled “Fail(string)”Creates an error response with the given message.
Parameters:
error(String)
Returns: DotsiderResponse
public static DotsiderResponse Fail(string error)Creates a successful response without a payload.
Returns: DotsiderResponse
public static DotsiderResponse Ok()Ok(JsonElement?)
Section titled “Ok(JsonElement?)”Creates a successful response from an existing JSON payload.
Parameters:
data(Nullable<JsonElement>)
Returns: DotsiderResponse
public static DotsiderResponse Ok(JsonElement? data)Ok<T>(T, JsonTypeInfo<T>)
Section titled “Ok<T>(T, JsonTypeInfo<T>)”Creates a successful response using source-generated JSON metadata.
Parameters:
data(<T>)jsonTypeInfo(JsonTypeInfo<<T>>)
Returns: DotsiderResponse
public static DotsiderResponse Ok<T>(T data, JsonTypeInfo<T> jsonTypeInfo)Ok<T>(T)
Section titled “Ok<T>(T)”Creates a successful response using the protocol’s source-generated metadata.
Parameters:
data(<T>)
Returns: DotsiderResponse
public static DotsiderResponse Ok<T>(T data)