Class InteractionContext<TInput, TOutput>
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
Contains contextual information for an interaction.
public sealed class InteractionContext<TInput, TOutput> : IOutputContext<TInput, TOutput>, IInteractionContext<TInput, TOutput>
Type Parameters
TInput
The type of the interaction's input.
TOutput
The type of the interaction's output.
- Inheritance
-
InteractionContext<TInput, TOutput>
- Implements
-
IOutputContext<TInput, TOutput>IInteractionContext<TInput, TOutput>
- Extension Methods
Remarks
Instances of this class are passed into interaction handlers. The Input property exposes the input to the interaction, whilst the SetOutput(TOutput) method allows a handler to provide the output.
Properties
Input
Gets the input for the interaction.
public TInput Input { get; }
Property Value
- TInput
IsHandled
Gets a value indicating whether the interaction is handled. That is, whether the output has been set.
public bool IsHandled { get; }
Property Value
Methods
GetOutput()
Gets the output of the interaction.
public TOutput GetOutput()
Returns
- TOutput
The output.
Exceptions
- InvalidOperationException
If the output has not been set.
SetOutput(TOutput)
Sets the output for the interaction.
public void SetOutput(TOutput output)
Parameters
output
TOutputThe output.