Skip to main content
Version: 0.9.0

Library class

Process-wide library state. Library.Init comes first, before any other call of this API; then Runtime.Create, then Runtime.Onboard or Runtime.Rejoin for a Session.

Namespace: Quaternar.Qaros · Assembly: Quaternar.Qaros.dll · Source: QarLibrary.cs

public static class Library

Methods​

Init​

Initializes the library once per process, from a single thread. Calling it again without a Library.Destroy in between may fail.

public static Result<Unit> Init(LibraryOptions? options = null)

Parameters

NameTypeDescription
optionsLibraryOptions

Returns: Result<Unit>

Destroy​

Frees process-wide state. No other call of this API is allowed afterwards until the next Library.Init.

public static Result<Unit> Destroy()

Returns: Result<Unit>

Remarks

It ends every session and subscription still alive, waiting for a subscription handler running on another thread. Dispose your sessions and the runtime first, and never call it from a QAROS callback, event handler or progress report.