Skip to content

PgGucCheckResult<T>

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Contains either an accepted and possibly normalized configuration value with owned extra bytes, or rejection diagnostics.

public sealed class PgGucCheckResult<T>

Type parameters:

T

The declared setting type.

Inheritance: object

Rejects the proposed value with owned diagnostics.

public PgGucCheckResult(PgGucCheckError error)

Parameters:

error — PgGucCheckError

The rejection diagnostics.

Accepts the value, which may differ from the proposed value, with optional immutable extra data.

public PgGucCheckResult(T value, PgGucExtra? extra = null)

Parameters:

value — T

The accepted value.

extra — PgGucExtra

The owned extra bytes, or null when absent.

Gets rejection diagnostics; accepted results throw InvalidOperationException.

public PgGucCheckError Error { get; }

Value: PgGucCheckError

Gets the accepted extra bytes, possibly null; rejected results throw InvalidOperationException.

public PgGucExtra? Extra { get; }

Value: PgGucExtra

Gets whether the check accepted its value.

public bool IsAccepted { get; }

Value: bool

Gets the accepted value; rejected results throw InvalidOperationException.

public T Value { get; }

Value: T