public static bool TryGetFromObjEx <T>(this IActionEvent e, out T result) { if (e.IsError() && e.Target is ObjectException <T> ex) { result = ex.Target; return(true); } else { result = default; return(false); } }
public static Exception GetEx(this IActionEvent @event) => @event.IsError() ? (Exception)@event.Target : null;