Beispiel #1
0
        /// <summary>
        /// Executes the specified <see cref="Action"/> asynchronously on the UI thread.
        /// </summary>
        /// <param name="action">The delegate to invoke.</param>
        public static void BeginInvoke(Action action)
        {
            if (action.NullReference())
            {
                throw Exc.Null(nameof(action));
            }

            ThrowIfNoThread();

            // NOTE: we're not checking whether we're already on the UI thread!
            //       even if we are, this method is supposed to be asynchronous.
            uiThread.BeginInvoke(action);
        }