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 Create<TInput, TOutput>(string name, string contract, Func<object, IInteraction<TInput, TOutput>> getInteraction, Func<TInput, string> encodeInput, Func<JsonElement, TOutput> decodeOutput, TimeSpan? timeout = null) Creates the descriptor for one ReactiveUI interaction of a ViewModel.
Parameters
nameThe interaction's member name.
contractThe interaction contract that a browser handler must implement.
getInteractionReads the interaction from the model.
encodeInputEncodes interaction input for the browser.
decodeOutputDecodes the browser's answer.
timeoutHow long the browser may take to answer: by default two minutes, at most 24 hours, or
Timeout.InfiniteTimeSpanfor no deadline. The Bridge generator passes the property'sRunicInteractionTimeoutAttribute. When it passes,Interaction.HandlethrowsRunicInteractionTimeoutException.
Exceptions
ArgumentOutOfRangeExceptiontimeoutis not positive or exceeds 24 hours, and is notTimeout.InfiniteTimeSpan.