Table of Contents

Class XapiParseResult<T>

Namespace
Xapi.Json
Assembly
Xapi.Core.dll

The outcome of reading xAPI JSON: a value, or every error that was found.

public sealed class XapiParseResult<T>

Type Parameters

T

The model type.

Inheritance
XapiParseResult<T>
Inherited Members

Properties

Errors

All errors found; empty on success.

public IReadOnlyList<XapiError> Errors { get; }

Property Value

IReadOnlyList<XapiError>

IsSuccess

Whether reading (and, in strict mode, validation) succeeded.

[MemberNotNullWhen(true, "Value")]
public bool IsSuccess { get; }

Property Value

bool

Value

The value when IsSuccess is true; otherwise default.

public T? Value { get; }

Property Value

T

Methods

GetValueOrThrow()

Returns the value or throws.

public T GetValueOrThrow()

Returns

T

The value.

Exceptions

XapiValidationException

Reading failed; the exception carries Errors.