Table of Contents

Class KasResponse

Namespace
KASserver
Assembly
KASserver.Client.dll

A parsed KAS API response (the Response map of a successful call).

public sealed class KasResponse
Inheritance
KasResponse
Inherited Members

Properties

FloodDelay

The server-advised delay before the next request, in seconds (KAS KasFloodDelay). The transport honors this automatically.

public double FloodDelay { get; init; }

Property Value

double

ReturnInfo

The action-specific payload (ReturnInfo). Depending on the action this is a IReadOnlyDictionary<TKey, TValue>, a IReadOnlyList<T>, a scalar string, or null.

public object? ReturnInfo { get; init; }

Property Value

object

ReturnString

The KAS status string, normally TRUE for a successful call.

public string? ReturnString { get; init; }

Property Value

string

Methods

AsList()

ReturnInfo as a list of maps. Returns an empty list when ReturnInfo is null or an empty list (a legitimate "no results" response). Throws KasApiException when it is a non-list scalar, so a shape mismatch is not masked.

public IReadOnlyList<IReadOnlyDictionary<string, object?>> AsList()

Returns

IReadOnlyList<IReadOnlyDictionary<string, object>>

AsMap()

ReturnInfo as a map. Returns an empty map when ReturnInfo is null. Throws KasApiException when it is present but not a map, so a shape mismatch is never silently masked as "empty".

public IReadOnlyDictionary<string, object?> AsMap()

Returns

IReadOnlyDictionary<string, object>