System.Threading.Invokers.InvokeSafe C# (CSharp) Method

InvokeSafe() public static method

As invoke, but always called on the correct thread
public static InvokeSafe ( this invoker, System.Action action ) : void
invoker this
action System.Action
return void
        public static void InvokeSafe(this ISynchronizeInvoke invoker, Action action)
        {
            if (invoker.InvokeRequired)
                invoker.Invoke(action);
            else
                action();
        }