/// <summary> /// Invokes the specified method in the dispatcher thread. /// </summary> /// <param name="method">The method.</param> /// <exception cref="System.InvalidOperationException">The dispatcher has already shut down.</exception> /// <remarks>Exceptions thrown by <paramref name="method"/> are passed back to the caller and are not wrapped into a <see cref="TargetInvocationException"/>.</remarks> public void Invoke([NotNull] Action method) { Contract.Requires(method != null); DispatcherExtensions.Invoke(Dispatcher, method); }
/// <summary> /// Invokes the specified method in the dispatcher thread. /// </summary> /// <param name="method">The method.</param> /// <exception cref="System.InvalidOperationException">The dispatcher has already shut down.</exception> /// <remarks>Exceptions thrown by <paramref name="method"/> are passed back to the caller and are not wrapped into a <see cref="TargetInvocationException"/>.</remarks> public void Invoke([NotNull] Action method) { DispatcherExtensions.Invoke(Dispatcher, method); }