Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Invoke<U>(Action<U> action, U args)
- {
- try
- {
- Helpers.InvokeAction(this, action, args);
- }
- catch (Exception)
- {
- }
- }
- public void Invoke<U>(Action<U[]> action, U arg1, U arg2)
- {
- try
- {
- Helpers.InvokeAction(this, action, new U[] { arg1, arg2 });
- }
- catch (Exception)
- {
- }
- }
- public void Invoke<U>(Action<U[]> action, U arg1, U arg2, U arg3)
- {
- try
- {
- Helpers.InvokeAction(this, action, new U[] { arg1, arg2, arg3 });
- }
- catch (Exception)
- {
- }
- }
- public void Invoke<U>(Action<U[]> action, U arg1, U arg2, U arg3, U arg4)
- {
- try
- {
- Helpers.InvokeAction(this, action, new U[] { arg1, arg2, arg3, arg4 });
- }
- catch (Exception)
- {
- }
- }
- public void Invoke<U>(Action<U[]> action, params U[] args)
- {
- try
- {
- Helpers.InvokeAction(this, action, args);
- }
- catch (Exception)
- {
- }
- }
- public void Invoke(Action action, bool raiseError = true)
- {
- if (running)
- {
- try
- {
- Helpers.InvokeAction(this, action);
- return;
- }
- catch (ObjectDisposedException)
- {
- running = false;
- }
- catch (Exception)
- {
- if (raiseError)
- {
- throw new LasException("Выполнение приложения прервано");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement