RunicInteractionInvocation class

Namespace Runic.Application.Views · Runic.Application 0.7.0-preview.5

public sealed class RunicInteractionInvocation

The trusted origin of work which may ask a browser to handle an interaction. Generated bridges establish this scope around a command or operation. It is deliberately absent for arbitrary background work, which must use a .NET handler or opt into an explicit scope.

Properties

CancellationToken

public CancellationToken CancellationToken { get; }

Cancels interactions requested by this invocation.

ClientKey

public string? ClientKey { get; }

The trusted browser client identity, if the invocation came from one.

CommandName

public string? CommandName { get; }

The generated command that started the invocation, if any.

ConnectionKey

public string? ConnectionKey { get; }

The trusted transport connection identity, if the invocation came from one.

Current

public static RunicInteractionInvocation? Current { get; }

The invocation scope on the current asynchronous flow, or null.

Route

public string Route { get; }

The bridge route whose browser client may handle interactions.

Session

public WindowContentSession Session { get; }

The window content session that owns the invocation.

Methods

Enter

public static IDisposable Enter(WindowContentSession session, string route, IBridgeArguments arguments, CancellationToken cancellationToken = default, string? commandName = null)

Enters a trusted bridge invocation. Callers must use identity supplied by IBridgeArguments, never values supplied inside request JSON.

Enter

public static IDisposable Enter(WindowContentSession session, string route, string? clientKey, string? connectionKey, CancellationToken cancellationToken = default, string? commandName = null)

Enters an explicitly selected interaction scope.