Docs · API reference · Verso.Abstractions

PanelInteractionContext Class#

Context provided to OnPanelInteractionAsync(PanelInteractionContext) describing a panel-scoped action triggered by the user.

public sealed class PanelInteractionContext

Inheritance System.Object → PanelInteractionContext

Remarks#

Nothing here names a rendering technology. The host decides how a user triggers an action and reports the result in these terms, so the same handler serves any host that can present the panel's content.

Properties#

CancellationToken Property#

Cancellation token for the interaction operation.

public System.Threading.CancellationToken CancellationToken { get; init; }

Property Value#

System.Threading.CancellationToken

ExtensionId Property#

The owning extension's ExtensionId. Together with PanelId this forms the identity pair that scoped the action. Present for symmetry with the host surface; a handler implemented as a sibling class shares this id with its panel.

public string ExtensionId { get; init; }

Property Value#

System.String

InteractionType Property#

Application-defined action name (e.g. "accept", "refresh").

public string InteractionType { get; init; }

Property Value#

System.String

PanelId Property#

The PanelId the action targets.

public string PanelId { get; init; }

Property Value#

System.String

Payload Property#

Free-form payload from the host (e.g. JSON, form data).

public string Payload { get; init; }

Property Value#

System.String

RequestRefresh Property#

Requests that the host discard the panel's current content and ask the panel to produce it again. Call this after an action changes what the panel should show. The default is a no-op; the host installs a real receiver before dispatching the context.

public System.Action RequestRefresh { get; init; }

Property Value#

System.Action

SelectedCellId Property#

Identifier of the cell selected when the action was triggered, or null if none was selected.

public System.Nullable<System.Guid> SelectedCellId { get; init; }

Property Value#

System.Nullable<System.Guid>

TargetId Property#

Optional identifier supplied by the host to disambiguate which item within the panel the action applies to.

public string? TargetId { get; init; }

Property Value#

System.String

Verso Property#

Verso context providing access to variables, theme, notebook operations, and the extension host. The host populates this when invoking OnPanelInteractionAsync(PanelInteractionContext).

public Verso.Abstractions.IVersoContext Verso { get; init; }

Property Value#

IVersoContext