mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:36:30 +00:00
14 lines
279 B
C#
14 lines
279 B
C#
using System.ComponentModel;
|
|
|
|
namespace Azaion.Annotator;
|
|
|
|
public static class SynchronizeInvokeExtensions
|
|
{
|
|
public static void InvokeEx<T>(this T t, Action<T> action) where T : ISynchronizeInvoke
|
|
{
|
|
if (t.InvokeRequired)
|
|
t.Invoke(action, [t]);
|
|
else
|
|
action(t);
|
|
}
|
|
} |