Skip to main content
Version: 0.9.0 (next)

OnboardOptions class

Options of Runtime.Onboard. Choose exactly one mode: OnboardOptions.UseCode or OnboardOptions.UseInvite; the last call wins.

Namespace: Quaternar.Qaros · Assembly: Quaternar.Qaros.dll

public sealed class OnboardOptions

Properties​

OnboardingId​

Unset to create a new identity slot; an id an earlier onboard returned re-enrolls that slot.

public OnboardingId? OnboardingId { get; set; }

Value: OnboardingId?

Presentation​

public PeerPresentationOptions? Presentation { get; set; }

Value: PeerPresentationOptions

Methods​

MemberDescription
WithPresentation(PeerPresentationOptions)
UseCode(string)Onboards with a pairing code: the short code on the hub's onboarding screen, or the text of any code the hub minted (OnboardingInvite.GetCode). Without OnboardOptions.WithHost it finds this user's hub on this PC by itself.
UseInvite(OnboardingInvite)Onboards from a full invite: one a sibling instance obtained with Session.RequestOnboardingInvite, or the launch invite QAROS writes as the first stdin line of an API app it starts (OnboardingInvite.Deserialize). No discovery, no code.
WithHost(string, ushort)Code onboarding against the hub at hostname:port. The port is required: hubs claim their onboarding port from a range, so there is no default. Without WithHost, code onboarding finds this user's hub on its own.
WithPeerId(PeerId)Join the session under peerId instead of a fresh id; it is persisted with the slot and kept by every later rejoin. For a process whose peer id was planned by someone else, such as the runtime launcher.
WithGraphicsDevice(GraphicsDeviceId)Create the session's GPU devices on this adapter.
WithExtension(Structure)

WithPresentation​

public OnboardOptions WithPresentation(PeerPresentationOptions presentation)

Parameters

NameTypeDescription
presentationPeerPresentationOptions

Returns: OnboardOptions

UseCode​

Onboards with a pairing code: the short code on the hub's onboarding screen, or the text of any code the hub minted (OnboardingInvite.GetCode). Without OnboardOptions.WithHost it finds this user's hub on this PC by itself.

public OnboardOptions UseCode(string code)

Parameters

NameTypeDescription
codestring

Returns: OnboardOptions

Remarks

The code is a secret: do not log it or pass it on a command line. Replaces an earlier mode, including a OnboardOptions.WithHost made before this call.

UseInvite​

Onboards from a full invite: one a sibling instance obtained with Session.RequestOnboardingInvite, or the launch invite QAROS writes as the first stdin line of an API app it starts (OnboardingInvite.Deserialize). No discovery, no code.

public OnboardOptions UseInvite(OnboardingInvite invite)

Parameters

NameTypeDescription
inviteOnboardingInvite

Returns: OnboardOptions

Remarks

The invite is borrowed: the caller keeps ownership and must not dispose it before the onboard call has completed. Replaces an earlier mode.

WithHost​

Code onboarding against the hub at hostname:port. The port is required: hubs claim their onboarding port from a range, so there is no default. Without WithHost, code onboarding finds this user's hub on its own.

public OnboardOptions WithHost(string hostname, ushort port)

Parameters

NameTypeDescription
hostnamestring
portushort

Returns: OnboardOptions

Exceptions

ExceptionCondition
InvalidOperationExceptionThe mode is an invite (OnboardOptions.UseInvite).

WithPeerId​

Join the session under peerId instead of a fresh id; it is persisted with the slot and kept by every later rejoin. For a process whose peer id was planned by someone else, such as the runtime launcher.

public OnboardOptions WithPeerId(PeerId peerId)

Parameters

NameTypeDescription
peerIdPeerId

Returns: OnboardOptions

WithGraphicsDevice​

Create the session's GPU devices on this adapter.

public OnboardOptions WithGraphicsDevice(GraphicsDeviceId graphicsDevice)

Parameters

NameTypeDescription
graphicsDeviceGraphicsDeviceId

Returns: OnboardOptions

WithExtension​

public OnboardOptions WithExtension(Structure extension)

Parameters

NameTypeDescription
extensionStructure

Returns: OnboardOptions