Docs · API reference · Verso.Abstractions

CellInteractionContext Class#

Context provided to OnCellInteractionAsync(CellInteractionContext) describing the interaction that occurred in a rendered cell.

public sealed class CellInteractionContext

Inheritance System.Object → CellInteractionContext

Properties#

CancellationToken Property#

Cancellation token for the interaction operation.

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

Property Value#

System.Threading.CancellationToken

CellId Property#

The unique identifier of the cell where the interaction occurred.

public System.Guid CellId { get; init; }

Property Value#

System.Guid

ExtensionId Property#

The extension identifier of the handler that should process this interaction.

public string ExtensionId { get; init; }

Property Value#

System.String

InteractionType Property#

Application-defined interaction type (e.g. "click", "paginate", "submit").

public string InteractionType { get; init; }

Property Value#

System.String

Notebook Property#

Optional access to notebook operations (e.g. cell insertion) for interaction handlers.

public Verso.Abstractions.INotebookOperations? Notebook { get; init; }

Property Value#

INotebookOperations

NotebookModel Property#

Optional access to the notebook model for interaction handlers that modify metadata.

public Verso.Abstractions.NotebookModel? NotebookModel { get; init; }

Property Value#

NotebookModel

OutputBlockId Property#

Optional identifier of the output block to update in place.

public string? OutputBlockId { get; init; }

Property Value#

System.String

Payload Property#

Free-form payload from the client (e.g. JSON, form data, page number).

public string Payload { get; init; }

Property Value#

System.String

Region Property#

The cell region that originated the interaction.

public Verso.Abstractions.CellRegion Region { get; init; }

Property Value#

CellRegion

StateChanged Property#

Set to true by an interaction handler when it changes persisted notebook state (for example editing a parameter definition), so the host can mark the notebook as edited. Leave false for interactions that only affect transient view state (such as paging).

public bool StateChanged { get; set; }

Property Value#

System.Boolean

Variables Property#

Optional access to the notebook's variable store for interaction handlers that modify variables.

public Verso.Abstractions.IVariableStore? Variables { get; init; }

Property Value#

IVariableStore