| 1234567891011121314151617181920212223 |
- using System.Collections.Concurrent;
- namespace Terminal.Gui.App;
- /// <summary>
- /// Represents a running session created by <see cref="IApplication.Begin(IRunnable)"/>.
- /// Wraps an <see cref="IRunnable"/> instance and is stored in <see cref="IApplication.SessionStack"/>.
- /// </summary>
- public class SessionToken
- {
- internal SessionToken (IRunnable runnable) { Runnable = runnable; }
- /// <summary>
- /// Gets or sets the runnable associated with this session.
- /// Set to <see langword="null"/> by <see cref="IApplication.End(SessionToken)"/> when the session completes.
- /// </summary>
- public IRunnable? Runnable { get; internal set; }
- /// <summary>
- /// The result of the session. Typically set by the runnable in <see langword="IRunnable.IsRunningChanged"/>
- /// </summary>
- public object? Result { get; set; }
- }
|