Vixen
02b45cc4
csharp
public readonly record struct GateAnswer<T>

An answer, and the status code it should be sent with.

Read the guide page for this →

Fields and properties (4)

  • public int Status

    The HTTP status.

  • public T? Value

    The answer, when the status says there is one.

  • public GateProblem? Problem

    What was wrong, otherwise.

  • public bool Ok

    Whether there is a value.

Methods (3)

  • public GateAnswer(int Status, T? Value, GateProblem? Problem)

    An answer, and the status code it should be sent with.

  • public static GateAnswer<T> Yes(T value, int status = 200)

    An answer.

  • public static GateAnswer<T> No(int status, string code, string detail)

    A refusal.

Used by (3)

  • GateEndpointsVixen.Live.Gate
  • GateServiceVixen.Live.Gate
  • GateServiceTestsVixen.Live.Gate.Tests