ManagementResult<TBody> Class
What one management operation earned: the status code the specification assigns the outcome (SSF 1.0 Section 8.1's error tables), the body a successful read or update carries, and - for the operator's logs, never the wire, since the management API defines no error body - why a refusal refused.
public sealed record ManagementResult<TBody> : System.IEquatable<Abblix.SharedSignals.Transmitter.ManagementResult<TBody>>Type parameters
TBody
The body of a successful outcome.
Inheritance System.Object → ManagementResult<TBody>
Implements System.IEquatable<Abblix.SharedSignals.Transmitter.ManagementResult<TBody>>
Constructors
ManagementResult(HttpStatusCode, TBody, string) Constructor
What one management operation earned: the status code the specification assigns the outcome (SSF 1.0 Section 8.1's error tables), the body a successful read or update carries, and - for the operator's logs, never the wire, since the management API defines no error body - why a refusal refused.
public ManagementResult(System.Net.HttpStatusCode StatusCode, TBody? Body=default(TBody?), string? Description=null);Parameters
StatusCode System.Net.HttpStatusCode
The status code the transport answers with.
Body TBody
The response body; null for outcomes whose response is empty.
Description System.String
Why a refusal refused; null on success.
Properties
ManagementResult<TBody>.Body Property
The response body; null for outcomes whose response is empty.
public TBody? Body { get; init; }Property Value
ManagementResult<TBody>.Description Property
Why a refusal refused; null on success.
public string? Description { get; init; }Property Value
ManagementResult<TBody>.StatusCode Property
The status code the transport answers with.
public System.Net.HttpStatusCode StatusCode { get; init; }Property Value
Methods
ManagementResult<TBody>.Accepted(string) Method
The update was taken and not carried out: "202 Accepted".
public static Abblix.SharedSignals.Transmitter.ManagementResult<TBody> Accepted(string description);Parameters
description System.String
Returns
Abblix.SharedSignals.Transmitter.ManagementResult<TBody>
Remarks
The code SSF 1.0 assigns to exactly this outcome in both update tables - "accepted, but not processed. Receiver MAY try the same request later to get processing result" - and Section 8.1.2.2 states it as a MUST for a transmitter that cannot decide whether to complete the request. It tells the receiver the one thing that matters here and that no other code does: nothing changed, and repeating the call is the way forward rather than a mistake.
ManagementResult<TBody>.BadRequest(string) Method
The request is invalid: "400 Bad Request".
public static Abblix.SharedSignals.Transmitter.ManagementResult<TBody> BadRequest(string description);Parameters
description System.String
Returns
Abblix.SharedSignals.Transmitter.ManagementResult<TBody>
ManagementResult<TBody>.Conflict(string) Method
The stream already exists and the transmitter allows one per receiver: "409 Conflict".
public static Abblix.SharedSignals.Transmitter.ManagementResult<TBody> Conflict(string description);Parameters
description System.String
Returns
Abblix.SharedSignals.Transmitter.ManagementResult<TBody>
Remarks
Creation only. SSF 1.0 gives this code exactly one meaning, in the Create Stream error table of Section 8.1.1.1, and the update tables of Sections 8.1.1.3 and 8.1.2.2 do not list it at all - so answering an update with it says "you already have a stream" to a receiver reading the specification, which is the opposite of what a failed update means.
ManagementResult<TBody>.Created(TBody) Method
A successful creation: "201 Created" with the created document.
public static Abblix.SharedSignals.Transmitter.ManagementResult<TBody> Created(TBody body);Parameters
body TBody
Returns
Abblix.SharedSignals.Transmitter.ManagementResult<TBody>
ManagementResult<TBody>.NoContent() Method
A successful operation whose response is empty: "204 No Content".
public static Abblix.SharedSignals.Transmitter.ManagementResult<TBody> NoContent();Returns
Abblix.SharedSignals.Transmitter.ManagementResult<TBody>
ManagementResult<TBody>.NotFound(string) Method
No stream with the given identifier for this receiver: "404 Not Found".
public static Abblix.SharedSignals.Transmitter.ManagementResult<TBody> NotFound(string description);Parameters
description System.String
Returns
Abblix.SharedSignals.Transmitter.ManagementResult<TBody>
ManagementResult<TBody>.Ok() Method
A successful operation answered "200 OK" with an empty body - the add-subject shape (SSF 1.0 Section 8.1.3.2).
public static Abblix.SharedSignals.Transmitter.ManagementResult<TBody> Ok();Returns
Abblix.SharedSignals.Transmitter.ManagementResult<TBody>
ManagementResult<TBody>.Ok(TBody) Method
A successful read or update: "200 OK" with the body.
public static Abblix.SharedSignals.Transmitter.ManagementResult<TBody> Ok(TBody body);Parameters
body TBody
Returns
Abblix.SharedSignals.Transmitter.ManagementResult<TBody>
ManagementResult<TBody>.TooManyRequests(string) Method
The receiver asks too often: "429 Too Many Requests" (SSF 1.0 Section 8.1.4.2).
public static Abblix.SharedSignals.Transmitter.ManagementResult<TBody> TooManyRequests(string description);