public sealed class DialogSession<TResult>A dialog being built, and the only way it answers.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A button is a label and an answer, and there is no other kind. A dialog that closed itself from somewhere other than its own footer is one whose caller has to guess what it returned — so Answer is the single exit, and the footer's buttons are the ordinary way to reach it.
⚠ Answering does not remove anything. The click that answers is dispatched into the dialog's own subtree, and tearing that subtree down inside its own event would leave the router walking removed elements. What Answer does is record the value and close the overlay; Pump takes the element away on the next tick, which is also where the caller's continuation runs.
Fields and properties (4)
Methods (2)
public Button AddButton(string label, Func<TResult> result, ControlVariant variant = Default)Adds a button to the footer, and says what pressing it means.
public void Answer(TResult result)Answers the dialog and closes it.
Used by (4)
- AssetPickerVixen.Editor.App
- DialogServiceVixen.Editor.Ui
- DialogTestsVixen.Editor.Ui.Tests
- EditorApplicationVixen.Editor.App