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 · Source: OnboardingTypes.cs
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
| Member | Description |
|---|---|
| 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
| Name | Type | Description |
|---|---|---|
presentation | PeerPresentationOptions |
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
| Name | Type | Description |
|---|---|---|
code | string |
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
| Name | Type | Description |
|---|---|---|
invite | OnboardingInvite |
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
| Name | Type | Description |
|---|---|---|
hostname | string | |
port | ushort |
Returns: OnboardOptions
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | The 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
| Name | Type | Description |
|---|---|---|
peerId | PeerId |
Returns: OnboardOptions
WithGraphicsDevice
Create the session's GPU devices on this adapter.
public OnboardOptions WithGraphicsDevice(GraphicsDeviceId graphicsDevice)
Parameters
| Name | Type | Description |
|---|---|---|
graphicsDevice | GraphicsDeviceId |
Returns: OnboardOptions
WithExtension
public OnboardOptions WithExtension(Structure extension)
Parameters
| Name | Type | Description |
|---|---|---|
extension | Structure |
Returns: OnboardOptions