ReactiveInteractionDescriptor class

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

public static class ReactiveInteractionDescriptor

Factory used by generated ReactiveUI bridges to expose one typed interaction to a mounted browser endpoint. It deliberately registers one ReactiveUI handler per Interaction object, regardless of how many views or windows present that object.

Methods

Create

public static BridgeInteractionDescriptor<TModel> Create<TModel, TInput, TOutput>(string name, string contract, Func<TModel, IInteraction<TInput, TOutput>> getInteraction, Func<TInput, string> encodeInput, Func<JsonElement, TOutput> decodeOutput, TimeSpan? timeout = null) where TModel : class

Creates the descriptor for one ReactiveUI interaction of TModel.

Parameters

name

The interaction's member name.

contract

The interaction contract that a browser handler must implement.

getInteraction

Reads the interaction from the model.

encodeInput

Encodes interaction input for the browser.

decodeOutput

Decodes the browser's answer.

timeout

How long the browser may take to answer; at most ten minutes.