Run
Description
Helper class for running IWidget, IApplication and other objects with minimal code effort.
Use the following methods to convert objects of other classes to IWidget or IApplication objects:
Public / Constants
NonModal
A pseudo-error that indicates that an application is running in a non-modal environment.
In a typical modal environment, the application code runs its own loop, by calling ApplicationLoop.MainLoop repeatedly, until it decides to terminate. In a non-modal environment (for example, in a web browser), the application code is required to perform initialization and then register callbacks for a single main loop tick and the application shutdown. Finally, the application code must return control to the environment, which then runs the application by invoking the callbacks and terminates at its own discretion.
When a method of this class returns this pseudo-error, the calling code is expected to return control to the environment promptly, so that the application may start running. The called method will have registered callbacks with the environment, to ensure the following behaviour:
-
The application is disposed via IDisposable.Dispose.
-
The TinmanModule.Shutdown method is called.
Public / Methods
This
6 overloads
Runs the given thing in with the default settings, for debugging and testing.
This method calls Widget.Create, IWidget.Initialize and then IWidget.ToApplication, to obtain the application object to run.
Runs the given widget in with the default settings, for debugging and testing.
This method calls IWidget.Initialize and then IWidget.ToApplication, to obtain the application object to run.
Runs the given application in with the default settings, for debugging and testing.
If applicable, this method will provide an EventDelegateGeneric to ApplicationWindow.Create that calls the following method, for interoperability with .NET WinForms:
System.Windows.Forms.Application.DoEvents()
Runs the given application in.
Runs the given application in.
Runs the given application in.