ข้ามไปยังเนื้อหา

Class ResultModel

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.AspNetCore.Transports.Rest
Assembly: Cephalon.AspNetCore.dll

Represents the optional Cephalon REST success envelope projected by the ASP.NET Core adapter.

public class ResultModel<TModel>

TModel

The payload type carried by the response.

objectResultModel<TModel>

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Initializes a new instance of the class.

public ResultModel()

Gets or sets the payload returned by the endpoint.

[JsonPropertyName("data")]
public TModel? Data { get; set; }

TModel?

Gets or sets the structured error details when the response is not successful.

[JsonPropertyName("errors")]
public List<ResultModelErrorDetail>? Errors { get; set; }

List<ResultModelErrorDetail>?

Gets or sets the human-readable response message.

[JsonPropertyName("message")]
public string Message { get; set; }

string

Gets or sets the effective HTTP status code associated with the response.

[JsonPropertyName("status")]
public int StatusCode { get; set; }

int

Gets or sets a value indicating whether the response is successful.

[JsonPropertyName("success")]
public bool Success { get; set; }

bool

Gets or sets the short response title.

[JsonPropertyName("title")]
public string Title { get; set; }

string

Gets or sets the optional problem type URI associated with the response.

[JsonPropertyName("type")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Type { get; set; }

string?

Success envelopes omit this value by default. Error envelopes derive the RFC problem type from unless a host or mapper supplies a more specific URI.