ApiFetch
Pennington.DocSite.Api.Components.Reference
Result of Fetch: a success flag with either the value or inline error HTML.
Properties
ErrorHtmlstring- Inline error HTML when
Okisfalse; otherwisenull. Okbool- Whether the fetch succeeded.
ValueT- The fetched value when
Okistrue; otherwise the default.
Constructors
ApiFetch
#public ApiFetch`1(bool Ok, T Value, string ErrorHtml)
Result of Fetch: a success flag with either the value or inline error HTML.
Parameters
Okbool- Whether the fetch succeeded.
ValueT- The fetched value when
Okistrue; otherwise the default. ErrorHtmlstring- Inline error HTML when
Okisfalse; otherwisenull.
Pennington.DocSite.Api.Components.Reference.ApiFetch
namespace Pennington.DocSite.Api.Components.Reference;
/// Result of Fetch: a success flag with either the value or inline error HTML.
public struct ApiFetch
{
/// Result of Fetch: a success flag with either the value or inline error HTML.
public ApiFetch`1(bool Ok, T Value, string ErrorHtml)
;
/// Inline error HTML when Ok is false; otherwise null.
public string ErrorHtml { get; set; }
/// Whether the fetch succeeded.
public bool Ok { get; set; }
/// The fetched value when Ok is true; otherwise the default.
public T Value { get; set; }
}