Catel.Services.IDispatcherServiceExtensions.Invoke C# (CSharp) Method

Invoke() public static method

Executes the specified delegate with the specified arguments synchronously on the thread the Dispatcher is associated with.
The is null.
public static Invoke ( this dispatcherService, Delegate method ) : void
dispatcherService this The dispatcher service.
method System.Delegate A delegate to a method that takes parameters specified in args, which is pushed onto the Dispatcher event queue.
return void
        public static void Invoke(this IDispatcherService dispatcherService, Delegate method, params object[] args)
        {
            Argument.IsNotNull("method", method);

            dispatcherService.Invoke(() => method.DynamicInvoke(args));
        }