ViewQuestionDescriptor class

Namespace Runic.Application.Views.Generated in Runic.Application.Views 0.23.0

public static class ViewQuestionDescriptor

Factory used by generated Bridges to attach a ViewQuestion member to its route.

Methods

Create

public static BridgeInteractionDescriptor Create<TInput, TOutput>(string name, string contract, Func<object, ViewQuestion<TInput, TOutput>> getQuestion, Func<TInput, string> encodeInput, Func<JsonElement, TOutput> decodeOutput)

Creates the descriptor of one view question of a ViewModel.

Parameters

name

The question's member name on the page.

contract

The interaction contract that a page handler must implement.

getQuestion

Reads the question from the model.

encodeInput

Encodes the question for the page.

decodeOutput

Decodes the page's answer.