- Exception handling for plugin events

- Revert: Execute `OnValueChanged` event in task
This commit is contained in:
Stone-Red-Code
2021-09-14 14:07:08 +02:00
parent e00c873bd5
commit 6e4757adea
5 changed files with 109 additions and 37 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
using System;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs
{
@@ -45,7 +44,7 @@ namespace DesktopMagicPluginAPI.Inputs
/// </summary>
public void Click()
{
_ = Task.Run(() => OnClick?.Invoke());
OnClick?.Invoke();
}
}
}
+1 -2
View File
@@ -1,5 +1,4 @@
using System;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs
{
@@ -18,7 +17,7 @@ namespace DesktopMagicPluginAPI.Inputs
/// </summary>
protected void ValueChanged()
{
_ = Task.Run(() => OnValueChanged?.Invoke());
OnValueChanged?.Invoke();
}
}
}