From aea4b7c2993b8886568ff9709eba20b95444d160 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 18 Oct 2023 11:43:47 +0200 Subject: [PATCH] Update code after change format of listeners --- .../Java/Awt/Datatransfer/FlavorListener.cs | 5 +- .../Awt/DesktopNs/AppForegroundListener.cs | 10 +- .../Java/Awt/DesktopNs/AppHiddenListener.cs | 10 +- .../Java/Awt/DesktopNs/AppReopenedListener.cs | 5 +- .../Java/Awt/DesktopNs/ScreenSleepListener.cs | 10 +- .../Java/Awt/DesktopNs/SystemSleepListener.cs | 10 +- .../Java/Awt/DesktopNs/UserSessionListener.cs | 10 +- .../Java/Awt/Dnd/DragGestureListener.cs | 5 +- .../Java/Awt/Dnd/DragSourceAdapter.cs | 30 ++-- .../Java/Awt/Dnd/DragSourceListener.cs | 25 ++-- .../Java/Awt/Dnd/DragSourceMotionListener.cs | 5 +- .../Java/Awt/Dnd/DropTargetAdapter.cs | 25 ++-- .../Java/Awt/Dnd/DropTargetListener.cs | 25 ++-- .../Java/Awt/EventNs/AWTEventListener.cs | 5 +- .../Java/Awt/EventNs/ActionListener.cs | 5 +- .../Java/Awt/EventNs/AdjustmentListener.cs | 5 +- .../Java/Awt/EventNs/ComponentAdapter.cs | 20 +-- .../Java/Awt/EventNs/ComponentListener.cs | 20 +-- .../Java/Awt/EventNs/ContainerAdapter.cs | 10 +- .../Java/Awt/EventNs/ContainerListener.cs | 10 +- .../Java/Awt/EventNs/FocusAdapter.cs | 10 +- .../Java/Awt/EventNs/FocusListener.cs | 10 +- .../Awt/EventNs/HierarchyBoundsAdapter.cs | 10 +- .../Awt/EventNs/HierarchyBoundsListener.cs | 10 +- .../Java/Awt/EventNs/HierarchyListener.cs | 5 +- .../Java/Awt/EventNs/InputMethodListener.cs | 10 +- .../Java/Awt/EventNs/ItemListener.cs | 5 +- .../Generated/Java/Awt/EventNs/KeyAdapter.cs | 15 +- .../Generated/Java/Awt/EventNs/KeyListener.cs | 15 +- .../Java/Awt/EventNs/MouseAdapter.cs | 40 +++--- .../Java/Awt/EventNs/MouseListener.cs | 25 ++-- .../Java/Awt/EventNs/MouseMotionAdapter.cs | 10 +- .../Java/Awt/EventNs/MouseMotionListener.cs | 10 +- .../Java/Awt/EventNs/MouseWheelListener.cs | 5 +- .../Java/Awt/EventNs/TextListener.cs | 5 +- .../Java/Awt/EventNs/WindowAdapter.cs | 50 ++++--- .../Java/Awt/EventNs/WindowFocusListener.cs | 10 +- .../Java/Awt/EventNs/WindowListener.cs | 35 +++-- .../Java/Awt/EventNs/WindowStateListener.cs | 5 +- .../BeanContextMembershipListener.cs | 10 +- .../BeanContextServiceRevokedListener.cs | 5 +- .../BeanContextServicesListener.cs | 10 +- .../Generated/Java/Beans/ExceptionListener.cs | 5 +- .../Java/Beans/PropertyChangeListener.cs | 5 +- .../Java/Beans/VetoableChangeListener.cs | 5 +- .../JNet/Generated/Java/Net/Http/WebSocket.cs | 60 ++++---- .../Java/Util/Function/BiConsumer.cs | 30 ++-- .../Java/Util/Function/BiFunction.cs | 40 +++--- .../Java/Util/Function/BiPredicate.cs | 80 +++++------ .../Java/Util/Function/BinaryOperator.cs | 40 +++--- .../Java/Util/Function/BooleanSupplier.cs | 10 +- .../Generated/Java/Util/Function/Consumer.cs | 30 ++-- .../Util/Function/DoubleBinaryOperator.cs | 10 +- .../Java/Util/Function/DoubleConsumer.cs | 15 +- .../Java/Util/Function/DoubleFunction.cs | 20 ++- .../Java/Util/Function/DoublePredicate.cs | 40 +++--- .../Java/Util/Function/DoubleSupplier.cs | 10 +- .../Java/Util/Function/DoubleToIntFunction.cs | 10 +- .../Util/Function/DoubleToLongFunction.cs | 10 +- .../Java/Util/Function/DoubleUnaryOperator.cs | 30 ++-- .../Generated/Java/Util/Function/Function.cs | 60 ++++---- .../Java/Util/Function/IntBinaryOperator.cs | 10 +- .../Java/Util/Function/IntConsumer.cs | 15 +- .../Java/Util/Function/IntFunction.cs | 20 ++- .../Java/Util/Function/IntPredicate.cs | 40 +++--- .../Java/Util/Function/IntSupplier.cs | 10 +- .../Java/Util/Function/IntToDoubleFunction.cs | 10 +- .../Java/Util/Function/IntToLongFunction.cs | 10 +- .../Java/Util/Function/IntUnaryOperator.cs | 30 ++-- .../Java/Util/Function/LongBinaryOperator.cs | 10 +- .../Java/Util/Function/LongConsumer.cs | 15 +- .../Java/Util/Function/LongFunction.cs | 20 ++- .../Java/Util/Function/LongPredicate.cs | 40 +++--- .../Java/Util/Function/LongSupplier.cs | 10 +- .../Util/Function/LongToDoubleFunction.cs | 10 +- .../Java/Util/Function/LongToIntFunction.cs | 10 +- .../Java/Util/Function/LongUnaryOperator.cs | 30 ++-- .../Java/Util/Function/ObjDoubleConsumer.cs | 10 +- .../Java/Util/Function/ObjIntConsumer.cs | 10 +- .../Java/Util/Function/ObjLongConsumer.cs | 10 +- .../Generated/Java/Util/Function/Predicate.cs | 80 +++++------ .../Generated/Java/Util/Function/Supplier.cs | 20 ++- .../Java/Util/Function/ToDoubleBiFunction.cs | 20 ++- .../Java/Util/Function/ToDoubleFunction.cs | 20 ++- .../Java/Util/Function/ToIntBiFunction.cs | 20 ++- .../Java/Util/Function/ToIntFunction.cs | 20 ++- .../Java/Util/Function/ToLongBiFunction.cs | 20 ++- .../Java/Util/Function/ToLongFunction.cs | 20 ++- .../Java/Util/Function/UnaryOperator.cs | 60 ++++---- .../Java/Util/Prefs/NodeChangeListener.cs | 10 +- .../Util/Prefs/PreferenceChangeListener.cs | 5 +- .../Imageio/Event/IIOReadProgressListener.cs | 45 +++--- .../Imageio/Event/IIOReadUpdateListener.cs | 30 ++-- .../Imageio/Event/IIOReadWarningListener.cs | 5 +- .../Imageio/Event/IIOWriteProgressListener.cs | 35 +++-- .../Imageio/Event/IIOWriteWarningListener.cs | 5 +- .../Javax/Management/NotificationFilter.cs | 10 +- .../Javax/Management/NotificationListener.cs | 5 +- .../Naming/Event/NamespaceChangeListener.cs | 20 +-- .../Javax/Naming/Event/NamingListener.cs | 5 +- .../Naming/Event/ObjectChangeListener.cs | 10 +- .../Ldap/UnsolicitedNotificationListener.cs | 10 +- .../Net/Ssl/HandshakeCompletedListener.cs | 5 +- .../Net/Ssl/SSLSessionBindingListener.cs | 10 +- .../Javax/Print/Event/PrintJobAdapter.cs | 30 ++-- .../Print/Event/PrintJobAttributeListener.cs | 5 +- .../Javax/Print/Event/PrintJobListener.cs | 30 ++-- .../Event/PrintServiceAttributeListener.cs | 5 +- .../Sound/Midi/ControllerEventListener.cs | 5 +- .../Javax/Sound/Midi/MetaEventListener.cs | 5 +- .../Javax/Sound/Sampled/LineListener.cs | 5 +- .../Javax/Sql/ConnectionEventListener.cs | 10 +- .../Generated/Javax/Sql/RowSetListener.cs | 15 +- .../Javax/Sql/StatementEventListener.cs | 10 +- src/net/JNet/Generated/Javax/Swing/Action.cs | 55 ++++--- .../Javax/Swing/Event/AncestorListener.cs | 15 +- .../Javax/Swing/Event/CaretListener.cs | 5 +- .../Javax/Swing/Event/CellEditorListener.cs | 10 +- .../Javax/Swing/Event/ChangeListener.cs | 5 +- .../Javax/Swing/Event/DocumentListener.cs | 15 +- .../Javax/Swing/Event/HyperlinkListener.cs | 5 +- .../Javax/Swing/Event/InternalFrameAdapter.cs | 35 +++-- .../Swing/Event/InternalFrameListener.cs | 35 +++-- .../Javax/Swing/Event/ListDataListener.cs | 15 +- .../Swing/Event/ListSelectionListener.cs | 5 +- .../Swing/Event/MenuDragMouseListener.cs | 20 +-- .../Javax/Swing/Event/MenuKeyListener.cs | 15 +- .../Javax/Swing/Event/MenuListener.cs | 15 +- .../Javax/Swing/Event/MouseInputAdapter.cs | 40 +++--- .../Javax/Swing/Event/MouseInputListener.cs | 35 +++-- .../Javax/Swing/Event/PopupMenuListener.cs | 15 +- .../Javax/Swing/Event/RowSorterListener.cs | 5 +- .../Swing/Event/TableColumnModelListener.cs | 25 ++-- .../Javax/Swing/Event/TableModelListener.cs | 5 +- .../Swing/Event/TreeExpansionListener.cs | 10 +- .../Javax/Swing/Event/TreeModelListener.cs | 20 +-- .../Swing/Event/TreeSelectionListener.cs | 5 +- .../Swing/Event/TreeWillExpandListener.cs | 10 +- .../Javax/Swing/Event/UndoableEditListener.cs | 5 +- .../Javax/Xml/Transform/ErrorListener.cs | 15 +- .../Org/W3c/Dom/Events/EventListener.cs | 5 +- .../Org/Xml/Sax/Helpers/ParserAdapter.cs | 135 +++++++++--------- .../Org/Xml/Sax/Helpers/XMLReaderAdapter.cs | 85 ++++++----- 143 files changed, 1375 insertions(+), 1290 deletions(-) diff --git a/src/net/JNet/Generated/Java/Awt/Datatransfer/FlavorListener.cs b/src/net/JNet/Generated/Java/Awt/Datatransfer/FlavorListener.cs index ac90505699..a4190fb1ca 100644 --- a/src/net/JNet/Generated/Java/Awt/Datatransfer/FlavorListener.cs +++ b/src/net/JNet/Generated/Java/Awt/Datatransfer/FlavorListener.cs @@ -73,7 +73,7 @@ public partial class FlavorListener : Java.Awt.Datatransfer.IFlavorListener /// protected virtual void InitializeHandlers() { - AddEventHandler("flavorsChanged", new System.EventHandler>>(FlavorsChangedEventHandler)); OnFlavorsChanged = FlavorsChanged; + AddEventHandler("flavorsChanged", new System.EventHandler>>(FlavorsChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void FlavorsChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnFlavorsChanged != null) OnFlavorsChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnFlavorsChanged != null) ? OnFlavorsChanged : FlavorsChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/DesktopNs/AppForegroundListener.cs b/src/net/JNet/Generated/Java/Awt/DesktopNs/AppForegroundListener.cs index 896dc01ba3..1889b6af98 100644 --- a/src/net/JNet/Generated/Java/Awt/DesktopNs/AppForegroundListener.cs +++ b/src/net/JNet/Generated/Java/Awt/DesktopNs/AppForegroundListener.cs @@ -78,8 +78,8 @@ public partial class AppForegroundListener : Java.Awt.DesktopNs.IAppForegroundLi /// protected virtual void InitializeHandlers() { - AddEventHandler("appMovedToBackground", new System.EventHandler>>(AppMovedToBackgroundEventHandler)); OnAppMovedToBackground = AppMovedToBackground; - AddEventHandler("appRaisedToForeground", new System.EventHandler>>(AppRaisedToForegroundEventHandler)); OnAppRaisedToForeground = AppRaisedToForeground; + AddEventHandler("appMovedToBackground", new System.EventHandler>>(AppMovedToBackgroundEventHandler)); + AddEventHandler("appRaisedToForeground", new System.EventHandler>>(AppRaisedToForegroundEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void AppMovedToBackgroundEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAppMovedToBackground != null) OnAppMovedToBackground.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAppMovedToBackground != null) ? OnAppMovedToBackground : AppMovedToBackground; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void AppMovedToBackground(Java.Awt.DesktopNs.AppForegroundEvent a void AppRaisedToForegroundEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAppRaisedToForeground != null) OnAppRaisedToForeground.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAppRaisedToForeground != null) ? OnAppRaisedToForeground : AppRaisedToForeground; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/DesktopNs/AppHiddenListener.cs b/src/net/JNet/Generated/Java/Awt/DesktopNs/AppHiddenListener.cs index e99b8f8b7e..6705127b34 100644 --- a/src/net/JNet/Generated/Java/Awt/DesktopNs/AppHiddenListener.cs +++ b/src/net/JNet/Generated/Java/Awt/DesktopNs/AppHiddenListener.cs @@ -78,8 +78,8 @@ public partial class AppHiddenListener : Java.Awt.DesktopNs.IAppHiddenListener /// protected virtual void InitializeHandlers() { - AddEventHandler("appHidden", new System.EventHandler>>(AppHiddenEventHandler)); OnAppHidden = AppHidden; - AddEventHandler("appUnhidden", new System.EventHandler>>(AppUnhiddenEventHandler)); OnAppUnhidden = AppUnhidden; + AddEventHandler("appHidden", new System.EventHandler>>(AppHiddenEventHandler)); + AddEventHandler("appUnhidden", new System.EventHandler>>(AppUnhiddenEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void AppHiddenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAppHidden != null) OnAppHidden.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAppHidden != null) ? OnAppHidden : AppHidden; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void AppHidden(Java.Awt.DesktopNs.AppHiddenEvent arg0) void AppUnhiddenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAppUnhidden != null) OnAppUnhidden.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAppUnhidden != null) ? OnAppUnhidden : AppUnhidden; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/DesktopNs/AppReopenedListener.cs b/src/net/JNet/Generated/Java/Awt/DesktopNs/AppReopenedListener.cs index 48f9fc324e..98cd4af44f 100644 --- a/src/net/JNet/Generated/Java/Awt/DesktopNs/AppReopenedListener.cs +++ b/src/net/JNet/Generated/Java/Awt/DesktopNs/AppReopenedListener.cs @@ -73,7 +73,7 @@ public partial class AppReopenedListener : Java.Awt.DesktopNs.IAppReopenedListen /// protected virtual void InitializeHandlers() { - AddEventHandler("appReopened", new System.EventHandler>>(AppReopenedEventHandler)); OnAppReopened = AppReopened; + AddEventHandler("appReopened", new System.EventHandler>>(AppReopenedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void AppReopenedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAppReopened != null) OnAppReopened.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAppReopened != null) ? OnAppReopened : AppReopened; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/DesktopNs/ScreenSleepListener.cs b/src/net/JNet/Generated/Java/Awt/DesktopNs/ScreenSleepListener.cs index 513bdff330..7b404ba9ea 100644 --- a/src/net/JNet/Generated/Java/Awt/DesktopNs/ScreenSleepListener.cs +++ b/src/net/JNet/Generated/Java/Awt/DesktopNs/ScreenSleepListener.cs @@ -78,8 +78,8 @@ public partial class ScreenSleepListener : Java.Awt.DesktopNs.IScreenSleepListen /// protected virtual void InitializeHandlers() { - AddEventHandler("screenAboutToSleep", new System.EventHandler>>(ScreenAboutToSleepEventHandler)); OnScreenAboutToSleep = ScreenAboutToSleep; - AddEventHandler("screenAwoke", new System.EventHandler>>(ScreenAwokeEventHandler)); OnScreenAwoke = ScreenAwoke; + AddEventHandler("screenAboutToSleep", new System.EventHandler>>(ScreenAboutToSleepEventHandler)); + AddEventHandler("screenAwoke", new System.EventHandler>>(ScreenAwokeEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void ScreenAboutToSleepEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnScreenAboutToSleep != null) OnScreenAboutToSleep.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnScreenAboutToSleep != null) ? OnScreenAboutToSleep : ScreenAboutToSleep; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void ScreenAboutToSleep(Java.Awt.DesktopNs.ScreenSleepEvent arg0) void ScreenAwokeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnScreenAwoke != null) OnScreenAwoke.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnScreenAwoke != null) ? OnScreenAwoke : ScreenAwoke; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/DesktopNs/SystemSleepListener.cs b/src/net/JNet/Generated/Java/Awt/DesktopNs/SystemSleepListener.cs index b918975ea7..5844874716 100644 --- a/src/net/JNet/Generated/Java/Awt/DesktopNs/SystemSleepListener.cs +++ b/src/net/JNet/Generated/Java/Awt/DesktopNs/SystemSleepListener.cs @@ -78,8 +78,8 @@ public partial class SystemSleepListener : Java.Awt.DesktopNs.ISystemSleepListen /// protected virtual void InitializeHandlers() { - AddEventHandler("systemAboutToSleep", new System.EventHandler>>(SystemAboutToSleepEventHandler)); OnSystemAboutToSleep = SystemAboutToSleep; - AddEventHandler("systemAwoke", new System.EventHandler>>(SystemAwokeEventHandler)); OnSystemAwoke = SystemAwoke; + AddEventHandler("systemAboutToSleep", new System.EventHandler>>(SystemAboutToSleepEventHandler)); + AddEventHandler("systemAwoke", new System.EventHandler>>(SystemAwokeEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void SystemAboutToSleepEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSystemAboutToSleep != null) OnSystemAboutToSleep.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSystemAboutToSleep != null) ? OnSystemAboutToSleep : SystemAboutToSleep; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void SystemAboutToSleep(Java.Awt.DesktopNs.SystemSleepEvent arg0) void SystemAwokeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSystemAwoke != null) OnSystemAwoke.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSystemAwoke != null) ? OnSystemAwoke : SystemAwoke; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/DesktopNs/UserSessionListener.cs b/src/net/JNet/Generated/Java/Awt/DesktopNs/UserSessionListener.cs index b1a605332c..95b3f3b284 100644 --- a/src/net/JNet/Generated/Java/Awt/DesktopNs/UserSessionListener.cs +++ b/src/net/JNet/Generated/Java/Awt/DesktopNs/UserSessionListener.cs @@ -78,8 +78,8 @@ public partial class UserSessionListener : Java.Awt.DesktopNs.IUserSessionListen /// protected virtual void InitializeHandlers() { - AddEventHandler("userSessionActivated", new System.EventHandler>>(UserSessionActivatedEventHandler)); OnUserSessionActivated = UserSessionActivated; - AddEventHandler("userSessionDeactivated", new System.EventHandler>>(UserSessionDeactivatedEventHandler)); OnUserSessionDeactivated = UserSessionDeactivated; + AddEventHandler("userSessionActivated", new System.EventHandler>>(UserSessionActivatedEventHandler)); + AddEventHandler("userSessionDeactivated", new System.EventHandler>>(UserSessionDeactivatedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void UserSessionActivatedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnUserSessionActivated != null) OnUserSessionActivated.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnUserSessionActivated != null) ? OnUserSessionActivated : UserSessionActivated; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void UserSessionActivated(Java.Awt.DesktopNs.UserSessionEvent arg void UserSessionDeactivatedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnUserSessionDeactivated != null) OnUserSessionDeactivated.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnUserSessionDeactivated != null) ? OnUserSessionDeactivated : UserSessionDeactivated; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/Dnd/DragGestureListener.cs b/src/net/JNet/Generated/Java/Awt/Dnd/DragGestureListener.cs index 2e74ccb4fb..adde5a0872 100644 --- a/src/net/JNet/Generated/Java/Awt/Dnd/DragGestureListener.cs +++ b/src/net/JNet/Generated/Java/Awt/Dnd/DragGestureListener.cs @@ -73,7 +73,7 @@ public partial class DragGestureListener : Java.Awt.Dnd.IDragGestureListener /// protected virtual void InitializeHandlers() { - AddEventHandler("dragGestureRecognized", new System.EventHandler>>(DragGestureRecognizedEventHandler)); OnDragGestureRecognized = DragGestureRecognized; + AddEventHandler("dragGestureRecognized", new System.EventHandler>>(DragGestureRecognizedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void DragGestureRecognizedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragGestureRecognized != null) OnDragGestureRecognized.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragGestureRecognized != null) ? OnDragGestureRecognized : DragGestureRecognized; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceAdapter.cs b/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceAdapter.cs index d3dbd26ad3..b65b4f6375 100644 --- a/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceAdapter.cs +++ b/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceAdapter.cs @@ -50,12 +50,12 @@ public partial class DragSourceAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("dragDropEnd", new System.EventHandler>>(DragDropEndEventHandler)); OnDragDropEnd = DragDropEnd; - AddEventHandler("dragEnter", new System.EventHandler>>(DragEnterEventHandler)); OnDragEnter = DragEnter; - AddEventHandler("dragExit", new System.EventHandler>>(DragExitEventHandler)); OnDragExit = DragExit; - AddEventHandler("dragMouseMoved", new System.EventHandler>>(DragMouseMovedEventHandler)); OnDragMouseMoved = DragMouseMoved; - AddEventHandler("dragOver", new System.EventHandler>>(DragOverEventHandler)); OnDragOver = DragOver; - AddEventHandler("dropActionChanged", new System.EventHandler>>(DropActionChangedEventHandler)); OnDropActionChanged = DropActionChanged; + AddEventHandler("dragDropEnd", new System.EventHandler>>(DragDropEndEventHandler)); + AddEventHandler("dragEnter", new System.EventHandler>>(DragEnterEventHandler)); + AddEventHandler("dragExit", new System.EventHandler>>(DragExitEventHandler)); + AddEventHandler("dragMouseMoved", new System.EventHandler>>(DragMouseMovedEventHandler)); + AddEventHandler("dragOver", new System.EventHandler>>(DragOverEventHandler)); + AddEventHandler("dropActionChanged", new System.EventHandler>>(DropActionChangedEventHandler)); } @@ -66,7 +66,8 @@ protected virtual void InitializeHandlers() void DragDropEndEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragDropEnd != null) OnDragDropEnd.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragDropEnd != null) ? OnDragDropEnd : DragDropEnd; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -85,7 +86,8 @@ public virtual void DragDropEnd(Java.Awt.Dnd.DragSourceDropEvent arg0) void DragEnterEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragEnter != null) OnDragEnter.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragEnter != null) ? OnDragEnter : DragEnter; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -104,7 +106,8 @@ public virtual void DragEnter(Java.Awt.Dnd.DragSourceDragEvent arg0) void DragExitEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragExit != null) OnDragExit.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragExit != null) ? OnDragExit : DragExit; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -123,7 +126,8 @@ public virtual void DragExit(Java.Awt.Dnd.DragSourceEvent arg0) void DragMouseMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragMouseMoved != null) OnDragMouseMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragMouseMoved != null) ? OnDragMouseMoved : DragMouseMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -142,7 +146,8 @@ public virtual void DragMouseMoved(Java.Awt.Dnd.DragSourceDragEvent arg0) void DragOverEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragOver != null) OnDragOver.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragOver != null) ? OnDragOver : DragOver; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -161,7 +166,8 @@ public virtual void DragOver(Java.Awt.Dnd.DragSourceDragEvent arg0) void DropActionChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDropActionChanged != null) OnDropActionChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDropActionChanged != null) ? OnDropActionChanged : DropActionChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceListener.cs b/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceListener.cs index 3582ac368b..d2bbbf2a32 100644 --- a/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceListener.cs +++ b/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceListener.cs @@ -93,11 +93,11 @@ public partial class DragSourceListener : Java.Awt.Dnd.IDragSourceListener /// protected virtual void InitializeHandlers() { - AddEventHandler("dragDropEnd", new System.EventHandler>>(DragDropEndEventHandler)); OnDragDropEnd = DragDropEnd; - AddEventHandler("dragEnter", new System.EventHandler>>(DragEnterEventHandler)); OnDragEnter = DragEnter; - AddEventHandler("dragExit", new System.EventHandler>>(DragExitEventHandler)); OnDragExit = DragExit; - AddEventHandler("dragOver", new System.EventHandler>>(DragOverEventHandler)); OnDragOver = DragOver; - AddEventHandler("dropActionChanged", new System.EventHandler>>(DropActionChangedEventHandler)); OnDropActionChanged = DropActionChanged; + AddEventHandler("dragDropEnd", new System.EventHandler>>(DragDropEndEventHandler)); + AddEventHandler("dragEnter", new System.EventHandler>>(DragEnterEventHandler)); + AddEventHandler("dragExit", new System.EventHandler>>(DragExitEventHandler)); + AddEventHandler("dragOver", new System.EventHandler>>(DragOverEventHandler)); + AddEventHandler("dropActionChanged", new System.EventHandler>>(DropActionChangedEventHandler)); } @@ -108,7 +108,8 @@ protected virtual void InitializeHandlers() void DragDropEndEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragDropEnd != null) OnDragDropEnd.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragDropEnd != null) ? OnDragDropEnd : DragDropEnd; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -127,7 +128,8 @@ public virtual void DragDropEnd(Java.Awt.Dnd.DragSourceDropEvent arg0) void DragEnterEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragEnter != null) OnDragEnter.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragEnter != null) ? OnDragEnter : DragEnter; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -146,7 +148,8 @@ public virtual void DragEnter(Java.Awt.Dnd.DragSourceDragEvent arg0) void DragExitEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragExit != null) OnDragExit.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragExit != null) ? OnDragExit : DragExit; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -165,7 +168,8 @@ public virtual void DragExit(Java.Awt.Dnd.DragSourceEvent arg0) void DragOverEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragOver != null) OnDragOver.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragOver != null) ? OnDragOver : DragOver; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -184,7 +188,8 @@ public virtual void DragOver(Java.Awt.Dnd.DragSourceDragEvent arg0) void DropActionChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDropActionChanged != null) OnDropActionChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDropActionChanged != null) ? OnDropActionChanged : DropActionChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceMotionListener.cs b/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceMotionListener.cs index 5834c26ffd..7ed2de3783 100644 --- a/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceMotionListener.cs +++ b/src/net/JNet/Generated/Java/Awt/Dnd/DragSourceMotionListener.cs @@ -73,7 +73,7 @@ public partial class DragSourceMotionListener : Java.Awt.Dnd.IDragSourceMotionLi /// protected virtual void InitializeHandlers() { - AddEventHandler("dragMouseMoved", new System.EventHandler>>(DragMouseMovedEventHandler)); OnDragMouseMoved = DragMouseMoved; + AddEventHandler("dragMouseMoved", new System.EventHandler>>(DragMouseMovedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void DragMouseMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragMouseMoved != null) OnDragMouseMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragMouseMoved != null) ? OnDragMouseMoved : DragMouseMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/Dnd/DropTargetAdapter.cs b/src/net/JNet/Generated/Java/Awt/Dnd/DropTargetAdapter.cs index 6933cd7581..1279b1bb66 100644 --- a/src/net/JNet/Generated/Java/Awt/Dnd/DropTargetAdapter.cs +++ b/src/net/JNet/Generated/Java/Awt/Dnd/DropTargetAdapter.cs @@ -50,11 +50,11 @@ public partial class DropTargetAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("drop", new System.EventHandler>>(DropEventHandler)); OnDrop = Drop; - AddEventHandler("dragEnter", new System.EventHandler>>(DragEnterEventHandler)); OnDragEnter = DragEnter; - AddEventHandler("dragExit", new System.EventHandler>>(DragExitEventHandler)); OnDragExit = DragExit; - AddEventHandler("dragOver", new System.EventHandler>>(DragOverEventHandler)); OnDragOver = DragOver; - AddEventHandler("dropActionChanged", new System.EventHandler>>(DropActionChangedEventHandler)); OnDropActionChanged = DropActionChanged; + AddEventHandler("drop", new System.EventHandler>>(DropEventHandler)); + AddEventHandler("dragEnter", new System.EventHandler>>(DragEnterEventHandler)); + AddEventHandler("dragExit", new System.EventHandler>>(DragExitEventHandler)); + AddEventHandler("dragOver", new System.EventHandler>>(DragOverEventHandler)); + AddEventHandler("dropActionChanged", new System.EventHandler>>(DropActionChangedEventHandler)); } @@ -65,7 +65,8 @@ protected virtual void InitializeHandlers() void DropEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDrop != null) OnDrop.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDrop != null) ? OnDrop : Drop; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -84,7 +85,8 @@ public virtual void Drop(Java.Awt.Dnd.DropTargetDropEvent arg0) void DragEnterEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragEnter != null) OnDragEnter.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragEnter != null) ? OnDragEnter : DragEnter; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -103,7 +105,8 @@ public virtual void DragEnter(Java.Awt.Dnd.DropTargetDragEvent arg0) void DragExitEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragExit != null) OnDragExit.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragExit != null) ? OnDragExit : DragExit; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -122,7 +125,8 @@ public virtual void DragExit(Java.Awt.Dnd.DropTargetEvent arg0) void DragOverEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragOver != null) OnDragOver.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragOver != null) ? OnDragOver : DragOver; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -141,7 +145,8 @@ public virtual void DragOver(Java.Awt.Dnd.DropTargetDragEvent arg0) void DropActionChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDropActionChanged != null) OnDropActionChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDropActionChanged != null) ? OnDropActionChanged : DropActionChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/Dnd/DropTargetListener.cs b/src/net/JNet/Generated/Java/Awt/Dnd/DropTargetListener.cs index aeab37f4e9..3e5c5cd2af 100644 --- a/src/net/JNet/Generated/Java/Awt/Dnd/DropTargetListener.cs +++ b/src/net/JNet/Generated/Java/Awt/Dnd/DropTargetListener.cs @@ -93,11 +93,11 @@ public partial class DropTargetListener : Java.Awt.Dnd.IDropTargetListener /// protected virtual void InitializeHandlers() { - AddEventHandler("dragEnter", new System.EventHandler>>(DragEnterEventHandler)); OnDragEnter = DragEnter; - AddEventHandler("dragExit", new System.EventHandler>>(DragExitEventHandler)); OnDragExit = DragExit; - AddEventHandler("dragOver", new System.EventHandler>>(DragOverEventHandler)); OnDragOver = DragOver; - AddEventHandler("drop", new System.EventHandler>>(DropEventHandler)); OnDrop = Drop; - AddEventHandler("dropActionChanged", new System.EventHandler>>(DropActionChangedEventHandler)); OnDropActionChanged = DropActionChanged; + AddEventHandler("dragEnter", new System.EventHandler>>(DragEnterEventHandler)); + AddEventHandler("dragExit", new System.EventHandler>>(DragExitEventHandler)); + AddEventHandler("dragOver", new System.EventHandler>>(DragOverEventHandler)); + AddEventHandler("drop", new System.EventHandler>>(DropEventHandler)); + AddEventHandler("dropActionChanged", new System.EventHandler>>(DropActionChangedEventHandler)); } @@ -108,7 +108,8 @@ protected virtual void InitializeHandlers() void DragEnterEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragEnter != null) OnDragEnter.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragEnter != null) ? OnDragEnter : DragEnter; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -127,7 +128,8 @@ public virtual void DragEnter(Java.Awt.Dnd.DropTargetDragEvent arg0) void DragExitEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragExit != null) OnDragExit.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragExit != null) ? OnDragExit : DragExit; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -146,7 +148,8 @@ public virtual void DragExit(Java.Awt.Dnd.DropTargetEvent arg0) void DragOverEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDragOver != null) OnDragOver.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDragOver != null) ? OnDragOver : DragOver; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -165,7 +168,8 @@ public virtual void DragOver(Java.Awt.Dnd.DropTargetDragEvent arg0) void DropEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDrop != null) OnDrop.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDrop != null) ? OnDrop : Drop; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -184,7 +188,8 @@ public virtual void Drop(Java.Awt.Dnd.DropTargetDropEvent arg0) void DropActionChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnDropActionChanged != null) OnDropActionChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnDropActionChanged != null) ? OnDropActionChanged : DropActionChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/AWTEventListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/AWTEventListener.cs index 80f18d5e2a..7c6bc3ef10 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/AWTEventListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/AWTEventListener.cs @@ -73,7 +73,7 @@ public partial class AWTEventListener : Java.Awt.EventNs.IAWTEventListener /// protected virtual void InitializeHandlers() { - AddEventHandler("eventDispatched", new System.EventHandler>>(EventDispatchedEventHandler)); OnEventDispatched = EventDispatched; + AddEventHandler("eventDispatched", new System.EventHandler>>(EventDispatchedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void EventDispatchedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnEventDispatched != null) OnEventDispatched.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnEventDispatched != null) ? OnEventDispatched : EventDispatched; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/ActionListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/ActionListener.cs index 707b768441..708d4daed2 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/ActionListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/ActionListener.cs @@ -73,7 +73,7 @@ public partial class ActionListener : Java.Awt.EventNs.IActionListener /// protected virtual void InitializeHandlers() { - AddEventHandler("actionPerformed", new System.EventHandler>>(ActionPerformedEventHandler)); OnActionPerformed = ActionPerformed; + AddEventHandler("actionPerformed", new System.EventHandler>>(ActionPerformedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void ActionPerformedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnActionPerformed != null) OnActionPerformed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnActionPerformed != null) ? OnActionPerformed : ActionPerformed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/AdjustmentListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/AdjustmentListener.cs index ba9168fde4..3eed4458f3 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/AdjustmentListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/AdjustmentListener.cs @@ -73,7 +73,7 @@ public partial class AdjustmentListener : Java.Awt.EventNs.IAdjustmentListener /// protected virtual void InitializeHandlers() { - AddEventHandler("adjustmentValueChanged", new System.EventHandler>>(AdjustmentValueChangedEventHandler)); OnAdjustmentValueChanged = AdjustmentValueChanged; + AddEventHandler("adjustmentValueChanged", new System.EventHandler>>(AdjustmentValueChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void AdjustmentValueChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAdjustmentValueChanged != null) OnAdjustmentValueChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAdjustmentValueChanged != null) ? OnAdjustmentValueChanged : AdjustmentValueChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/ComponentAdapter.cs b/src/net/JNet/Generated/Java/Awt/EventNs/ComponentAdapter.cs index dda0af7f8a..2125c3d40f 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/ComponentAdapter.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/ComponentAdapter.cs @@ -50,10 +50,10 @@ public partial class ComponentAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("componentHidden", new System.EventHandler>>(ComponentHiddenEventHandler)); OnComponentHidden = ComponentHidden; - AddEventHandler("componentMoved", new System.EventHandler>>(ComponentMovedEventHandler)); OnComponentMoved = ComponentMoved; - AddEventHandler("componentResized", new System.EventHandler>>(ComponentResizedEventHandler)); OnComponentResized = ComponentResized; - AddEventHandler("componentShown", new System.EventHandler>>(ComponentShownEventHandler)); OnComponentShown = ComponentShown; + AddEventHandler("componentHidden", new System.EventHandler>>(ComponentHiddenEventHandler)); + AddEventHandler("componentMoved", new System.EventHandler>>(ComponentMovedEventHandler)); + AddEventHandler("componentResized", new System.EventHandler>>(ComponentResizedEventHandler)); + AddEventHandler("componentShown", new System.EventHandler>>(ComponentShownEventHandler)); } @@ -64,7 +64,8 @@ protected virtual void InitializeHandlers() void ComponentHiddenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentHidden != null) OnComponentHidden.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentHidden != null) ? OnComponentHidden : ComponentHidden; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -83,7 +84,8 @@ public virtual void ComponentHidden(Java.Awt.EventNs.ComponentEvent arg0) void ComponentMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentMoved != null) OnComponentMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentMoved != null) ? OnComponentMoved : ComponentMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -102,7 +104,8 @@ public virtual void ComponentMoved(Java.Awt.EventNs.ComponentEvent arg0) void ComponentResizedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentResized != null) OnComponentResized.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentResized != null) ? OnComponentResized : ComponentResized; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -121,7 +124,8 @@ public virtual void ComponentResized(Java.Awt.EventNs.ComponentEvent arg0) void ComponentShownEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentShown != null) OnComponentShown.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentShown != null) ? OnComponentShown : ComponentShown; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/ComponentListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/ComponentListener.cs index afc954ee5a..3d19899b2d 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/ComponentListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/ComponentListener.cs @@ -88,10 +88,10 @@ public partial class ComponentListener : Java.Awt.EventNs.IComponentListener /// protected virtual void InitializeHandlers() { - AddEventHandler("componentHidden", new System.EventHandler>>(ComponentHiddenEventHandler)); OnComponentHidden = ComponentHidden; - AddEventHandler("componentMoved", new System.EventHandler>>(ComponentMovedEventHandler)); OnComponentMoved = ComponentMoved; - AddEventHandler("componentResized", new System.EventHandler>>(ComponentResizedEventHandler)); OnComponentResized = ComponentResized; - AddEventHandler("componentShown", new System.EventHandler>>(ComponentShownEventHandler)); OnComponentShown = ComponentShown; + AddEventHandler("componentHidden", new System.EventHandler>>(ComponentHiddenEventHandler)); + AddEventHandler("componentMoved", new System.EventHandler>>(ComponentMovedEventHandler)); + AddEventHandler("componentResized", new System.EventHandler>>(ComponentResizedEventHandler)); + AddEventHandler("componentShown", new System.EventHandler>>(ComponentShownEventHandler)); } @@ -102,7 +102,8 @@ protected virtual void InitializeHandlers() void ComponentHiddenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentHidden != null) OnComponentHidden.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentHidden != null) ? OnComponentHidden : ComponentHidden; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -121,7 +122,8 @@ public virtual void ComponentHidden(Java.Awt.EventNs.ComponentEvent arg0) void ComponentMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentMoved != null) OnComponentMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentMoved != null) ? OnComponentMoved : ComponentMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -140,7 +142,8 @@ public virtual void ComponentMoved(Java.Awt.EventNs.ComponentEvent arg0) void ComponentResizedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentResized != null) OnComponentResized.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentResized != null) ? OnComponentResized : ComponentResized; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -159,7 +162,8 @@ public virtual void ComponentResized(Java.Awt.EventNs.ComponentEvent arg0) void ComponentShownEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentShown != null) OnComponentShown.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentShown != null) ? OnComponentShown : ComponentShown; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/ContainerAdapter.cs b/src/net/JNet/Generated/Java/Awt/EventNs/ContainerAdapter.cs index a59c17ba18..a72a4ef874 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/ContainerAdapter.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/ContainerAdapter.cs @@ -50,8 +50,8 @@ public partial class ContainerAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("componentAdded", new System.EventHandler>>(ComponentAddedEventHandler)); OnComponentAdded = ComponentAdded; - AddEventHandler("componentRemoved", new System.EventHandler>>(ComponentRemovedEventHandler)); OnComponentRemoved = ComponentRemoved; + AddEventHandler("componentAdded", new System.EventHandler>>(ComponentAddedEventHandler)); + AddEventHandler("componentRemoved", new System.EventHandler>>(ComponentRemovedEventHandler)); } @@ -62,7 +62,8 @@ protected virtual void InitializeHandlers() void ComponentAddedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentAdded != null) OnComponentAdded.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentAdded != null) ? OnComponentAdded : ComponentAdded; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -81,7 +82,8 @@ public virtual void ComponentAdded(Java.Awt.EventNs.ContainerEvent arg0) void ComponentRemovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentRemoved != null) OnComponentRemoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentRemoved != null) ? OnComponentRemoved : ComponentRemoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/ContainerListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/ContainerListener.cs index 96b82dcb0d..881158b8b5 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/ContainerListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/ContainerListener.cs @@ -78,8 +78,8 @@ public partial class ContainerListener : Java.Awt.EventNs.IContainerListener /// protected virtual void InitializeHandlers() { - AddEventHandler("componentAdded", new System.EventHandler>>(ComponentAddedEventHandler)); OnComponentAdded = ComponentAdded; - AddEventHandler("componentRemoved", new System.EventHandler>>(ComponentRemovedEventHandler)); OnComponentRemoved = ComponentRemoved; + AddEventHandler("componentAdded", new System.EventHandler>>(ComponentAddedEventHandler)); + AddEventHandler("componentRemoved", new System.EventHandler>>(ComponentRemovedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void ComponentAddedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentAdded != null) OnComponentAdded.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentAdded != null) ? OnComponentAdded : ComponentAdded; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void ComponentAdded(Java.Awt.EventNs.ContainerEvent arg0) void ComponentRemovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnComponentRemoved != null) OnComponentRemoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnComponentRemoved != null) ? OnComponentRemoved : ComponentRemoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/FocusAdapter.cs b/src/net/JNet/Generated/Java/Awt/EventNs/FocusAdapter.cs index 3407c65854..90d9240f7d 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/FocusAdapter.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/FocusAdapter.cs @@ -50,8 +50,8 @@ public partial class FocusAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("focusGained", new System.EventHandler>>(FocusGainedEventHandler)); OnFocusGained = FocusGained; - AddEventHandler("focusLost", new System.EventHandler>>(FocusLostEventHandler)); OnFocusLost = FocusLost; + AddEventHandler("focusGained", new System.EventHandler>>(FocusGainedEventHandler)); + AddEventHandler("focusLost", new System.EventHandler>>(FocusLostEventHandler)); } @@ -62,7 +62,8 @@ protected virtual void InitializeHandlers() void FocusGainedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnFocusGained != null) OnFocusGained.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnFocusGained != null) ? OnFocusGained : FocusGained; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -81,7 +82,8 @@ public virtual void FocusGained(Java.Awt.EventNs.FocusEvent arg0) void FocusLostEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnFocusLost != null) OnFocusLost.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnFocusLost != null) ? OnFocusLost : FocusLost; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/FocusListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/FocusListener.cs index 560f7f8741..b417ddcf3a 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/FocusListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/FocusListener.cs @@ -78,8 +78,8 @@ public partial class FocusListener : Java.Awt.EventNs.IFocusListener /// protected virtual void InitializeHandlers() { - AddEventHandler("focusGained", new System.EventHandler>>(FocusGainedEventHandler)); OnFocusGained = FocusGained; - AddEventHandler("focusLost", new System.EventHandler>>(FocusLostEventHandler)); OnFocusLost = FocusLost; + AddEventHandler("focusGained", new System.EventHandler>>(FocusGainedEventHandler)); + AddEventHandler("focusLost", new System.EventHandler>>(FocusLostEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void FocusGainedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnFocusGained != null) OnFocusGained.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnFocusGained != null) ? OnFocusGained : FocusGained; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void FocusGained(Java.Awt.EventNs.FocusEvent arg0) void FocusLostEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnFocusLost != null) OnFocusLost.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnFocusLost != null) ? OnFocusLost : FocusLost; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyBoundsAdapter.cs b/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyBoundsAdapter.cs index 9d5b59c277..81e05c6a39 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyBoundsAdapter.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyBoundsAdapter.cs @@ -50,8 +50,8 @@ public partial class HierarchyBoundsAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("ancestorMoved", new System.EventHandler>>(AncestorMovedEventHandler)); OnAncestorMoved = AncestorMoved; - AddEventHandler("ancestorResized", new System.EventHandler>>(AncestorResizedEventHandler)); OnAncestorResized = AncestorResized; + AddEventHandler("ancestorMoved", new System.EventHandler>>(AncestorMovedEventHandler)); + AddEventHandler("ancestorResized", new System.EventHandler>>(AncestorResizedEventHandler)); } @@ -62,7 +62,8 @@ protected virtual void InitializeHandlers() void AncestorMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAncestorMoved != null) OnAncestorMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAncestorMoved != null) ? OnAncestorMoved : AncestorMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -81,7 +82,8 @@ public virtual void AncestorMoved(Java.Awt.EventNs.HierarchyEvent arg0) void AncestorResizedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAncestorResized != null) OnAncestorResized.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAncestorResized != null) ? OnAncestorResized : AncestorResized; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyBoundsListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyBoundsListener.cs index 67bfdefe76..eb88371f9b 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyBoundsListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyBoundsListener.cs @@ -78,8 +78,8 @@ public partial class HierarchyBoundsListener : Java.Awt.EventNs.IHierarchyBounds /// protected virtual void InitializeHandlers() { - AddEventHandler("ancestorMoved", new System.EventHandler>>(AncestorMovedEventHandler)); OnAncestorMoved = AncestorMoved; - AddEventHandler("ancestorResized", new System.EventHandler>>(AncestorResizedEventHandler)); OnAncestorResized = AncestorResized; + AddEventHandler("ancestorMoved", new System.EventHandler>>(AncestorMovedEventHandler)); + AddEventHandler("ancestorResized", new System.EventHandler>>(AncestorResizedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void AncestorMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAncestorMoved != null) OnAncestorMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAncestorMoved != null) ? OnAncestorMoved : AncestorMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void AncestorMoved(Java.Awt.EventNs.HierarchyEvent arg0) void AncestorResizedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAncestorResized != null) OnAncestorResized.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAncestorResized != null) ? OnAncestorResized : AncestorResized; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyListener.cs index e2b2142f81..45dc787dc6 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/HierarchyListener.cs @@ -73,7 +73,7 @@ public partial class HierarchyListener : Java.Awt.EventNs.IHierarchyListener /// protected virtual void InitializeHandlers() { - AddEventHandler("hierarchyChanged", new System.EventHandler>>(HierarchyChangedEventHandler)); OnHierarchyChanged = HierarchyChanged; + AddEventHandler("hierarchyChanged", new System.EventHandler>>(HierarchyChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void HierarchyChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnHierarchyChanged != null) OnHierarchyChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnHierarchyChanged != null) ? OnHierarchyChanged : HierarchyChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/InputMethodListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/InputMethodListener.cs index d270d8706e..24dd30fb9f 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/InputMethodListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/InputMethodListener.cs @@ -78,8 +78,8 @@ public partial class InputMethodListener : Java.Awt.EventNs.IInputMethodListener /// protected virtual void InitializeHandlers() { - AddEventHandler("caretPositionChanged", new System.EventHandler>>(CaretPositionChangedEventHandler)); OnCaretPositionChanged = CaretPositionChanged; - AddEventHandler("inputMethodTextChanged", new System.EventHandler>>(InputMethodTextChangedEventHandler)); OnInputMethodTextChanged = InputMethodTextChanged; + AddEventHandler("caretPositionChanged", new System.EventHandler>>(CaretPositionChangedEventHandler)); + AddEventHandler("inputMethodTextChanged", new System.EventHandler>>(InputMethodTextChangedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void CaretPositionChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnCaretPositionChanged != null) OnCaretPositionChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnCaretPositionChanged != null) ? OnCaretPositionChanged : CaretPositionChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void CaretPositionChanged(Java.Awt.EventNs.InputMethodEvent arg0) void InputMethodTextChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInputMethodTextChanged != null) OnInputMethodTextChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInputMethodTextChanged != null) ? OnInputMethodTextChanged : InputMethodTextChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/ItemListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/ItemListener.cs index a3a9352f5f..fc2fb32abe 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/ItemListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/ItemListener.cs @@ -73,7 +73,7 @@ public partial class ItemListener : Java.Awt.EventNs.IItemListener /// protected virtual void InitializeHandlers() { - AddEventHandler("itemStateChanged", new System.EventHandler>>(ItemStateChangedEventHandler)); OnItemStateChanged = ItemStateChanged; + AddEventHandler("itemStateChanged", new System.EventHandler>>(ItemStateChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void ItemStateChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnItemStateChanged != null) OnItemStateChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnItemStateChanged != null) ? OnItemStateChanged : ItemStateChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/KeyAdapter.cs b/src/net/JNet/Generated/Java/Awt/EventNs/KeyAdapter.cs index c65cd9eacc..6eb16e21b0 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/KeyAdapter.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/KeyAdapter.cs @@ -50,9 +50,9 @@ public partial class KeyAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("keyPressed", new System.EventHandler>>(KeyPressedEventHandler)); OnKeyPressed = KeyPressed; - AddEventHandler("keyReleased", new System.EventHandler>>(KeyReleasedEventHandler)); OnKeyReleased = KeyReleased; - AddEventHandler("keyTyped", new System.EventHandler>>(KeyTypedEventHandler)); OnKeyTyped = KeyTyped; + AddEventHandler("keyPressed", new System.EventHandler>>(KeyPressedEventHandler)); + AddEventHandler("keyReleased", new System.EventHandler>>(KeyReleasedEventHandler)); + AddEventHandler("keyTyped", new System.EventHandler>>(KeyTypedEventHandler)); } @@ -63,7 +63,8 @@ protected virtual void InitializeHandlers() void KeyPressedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnKeyPressed != null) OnKeyPressed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnKeyPressed != null) ? OnKeyPressed : KeyPressed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -82,7 +83,8 @@ public virtual void KeyPressed(Java.Awt.EventNs.KeyEvent arg0) void KeyReleasedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnKeyReleased != null) OnKeyReleased.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnKeyReleased != null) ? OnKeyReleased : KeyReleased; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -101,7 +103,8 @@ public virtual void KeyReleased(Java.Awt.EventNs.KeyEvent arg0) void KeyTypedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnKeyTyped != null) OnKeyTyped.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnKeyTyped != null) ? OnKeyTyped : KeyTyped; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/KeyListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/KeyListener.cs index a0f3bba5fc..e800544871 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/KeyListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/KeyListener.cs @@ -83,9 +83,9 @@ public partial class KeyListener : Java.Awt.EventNs.IKeyListener /// protected virtual void InitializeHandlers() { - AddEventHandler("keyPressed", new System.EventHandler>>(KeyPressedEventHandler)); OnKeyPressed = KeyPressed; - AddEventHandler("keyReleased", new System.EventHandler>>(KeyReleasedEventHandler)); OnKeyReleased = KeyReleased; - AddEventHandler("keyTyped", new System.EventHandler>>(KeyTypedEventHandler)); OnKeyTyped = KeyTyped; + AddEventHandler("keyPressed", new System.EventHandler>>(KeyPressedEventHandler)); + AddEventHandler("keyReleased", new System.EventHandler>>(KeyReleasedEventHandler)); + AddEventHandler("keyTyped", new System.EventHandler>>(KeyTypedEventHandler)); } @@ -96,7 +96,8 @@ protected virtual void InitializeHandlers() void KeyPressedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnKeyPressed != null) OnKeyPressed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnKeyPressed != null) ? OnKeyPressed : KeyPressed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -115,7 +116,8 @@ public virtual void KeyPressed(Java.Awt.EventNs.KeyEvent arg0) void KeyReleasedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnKeyReleased != null) OnKeyReleased.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnKeyReleased != null) ? OnKeyReleased : KeyReleased; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -134,7 +136,8 @@ public virtual void KeyReleased(Java.Awt.EventNs.KeyEvent arg0) void KeyTypedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnKeyTyped != null) OnKeyTyped.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnKeyTyped != null) ? OnKeyTyped : KeyTyped; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/MouseAdapter.cs b/src/net/JNet/Generated/Java/Awt/EventNs/MouseAdapter.cs index 5bd0a320f4..bd7f2cfc1f 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/MouseAdapter.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/MouseAdapter.cs @@ -50,14 +50,14 @@ public partial class MouseAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("mouseClicked", new System.EventHandler>>(MouseClickedEventHandler)); OnMouseClicked = MouseClicked; - AddEventHandler("mouseDragged", new System.EventHandler>>(MouseDraggedEventHandler)); OnMouseDragged = MouseDragged; - AddEventHandler("mouseEntered", new System.EventHandler>>(MouseEnteredEventHandler)); OnMouseEntered = MouseEntered; - AddEventHandler("mouseExited", new System.EventHandler>>(MouseExitedEventHandler)); OnMouseExited = MouseExited; - AddEventHandler("mouseMoved", new System.EventHandler>>(MouseMovedEventHandler)); OnMouseMoved = MouseMoved; - AddEventHandler("mousePressed", new System.EventHandler>>(MousePressedEventHandler)); OnMousePressed = MousePressed; - AddEventHandler("mouseReleased", new System.EventHandler>>(MouseReleasedEventHandler)); OnMouseReleased = MouseReleased; - AddEventHandler("mouseWheelMoved", new System.EventHandler>>(MouseWheelMovedEventHandler)); OnMouseWheelMoved = MouseWheelMoved; + AddEventHandler("mouseClicked", new System.EventHandler>>(MouseClickedEventHandler)); + AddEventHandler("mouseDragged", new System.EventHandler>>(MouseDraggedEventHandler)); + AddEventHandler("mouseEntered", new System.EventHandler>>(MouseEnteredEventHandler)); + AddEventHandler("mouseExited", new System.EventHandler>>(MouseExitedEventHandler)); + AddEventHandler("mouseMoved", new System.EventHandler>>(MouseMovedEventHandler)); + AddEventHandler("mousePressed", new System.EventHandler>>(MousePressedEventHandler)); + AddEventHandler("mouseReleased", new System.EventHandler>>(MouseReleasedEventHandler)); + AddEventHandler("mouseWheelMoved", new System.EventHandler>>(MouseWheelMovedEventHandler)); } @@ -68,7 +68,8 @@ protected virtual void InitializeHandlers() void MouseClickedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseClicked != null) OnMouseClicked.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseClicked != null) ? OnMouseClicked : MouseClicked; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -87,7 +88,8 @@ public virtual void MouseClicked(Java.Awt.EventNs.MouseEvent arg0) void MouseDraggedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseDragged != null) OnMouseDragged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseDragged != null) ? OnMouseDragged : MouseDragged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -106,7 +108,8 @@ public virtual void MouseDragged(Java.Awt.EventNs.MouseEvent arg0) void MouseEnteredEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseEntered != null) OnMouseEntered.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseEntered != null) ? OnMouseEntered : MouseEntered; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -125,7 +128,8 @@ public virtual void MouseEntered(Java.Awt.EventNs.MouseEvent arg0) void MouseExitedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseExited != null) OnMouseExited.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseExited != null) ? OnMouseExited : MouseExited; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -144,7 +148,8 @@ public virtual void MouseExited(Java.Awt.EventNs.MouseEvent arg0) void MouseMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseMoved != null) OnMouseMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseMoved != null) ? OnMouseMoved : MouseMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -163,7 +168,8 @@ public virtual void MouseMoved(Java.Awt.EventNs.MouseEvent arg0) void MousePressedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMousePressed != null) OnMousePressed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMousePressed != null) ? OnMousePressed : MousePressed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -182,7 +188,8 @@ public virtual void MousePressed(Java.Awt.EventNs.MouseEvent arg0) void MouseReleasedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseReleased != null) OnMouseReleased.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseReleased != null) ? OnMouseReleased : MouseReleased; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -201,7 +208,8 @@ public virtual void MouseReleased(Java.Awt.EventNs.MouseEvent arg0) void MouseWheelMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseWheelMoved != null) OnMouseWheelMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseWheelMoved != null) ? OnMouseWheelMoved : MouseWheelMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/MouseListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/MouseListener.cs index 913e4855f1..55a6e3c363 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/MouseListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/MouseListener.cs @@ -93,11 +93,11 @@ public partial class MouseListener : Java.Awt.EventNs.IMouseListener /// protected virtual void InitializeHandlers() { - AddEventHandler("mouseClicked", new System.EventHandler>>(MouseClickedEventHandler)); OnMouseClicked = MouseClicked; - AddEventHandler("mouseEntered", new System.EventHandler>>(MouseEnteredEventHandler)); OnMouseEntered = MouseEntered; - AddEventHandler("mouseExited", new System.EventHandler>>(MouseExitedEventHandler)); OnMouseExited = MouseExited; - AddEventHandler("mousePressed", new System.EventHandler>>(MousePressedEventHandler)); OnMousePressed = MousePressed; - AddEventHandler("mouseReleased", new System.EventHandler>>(MouseReleasedEventHandler)); OnMouseReleased = MouseReleased; + AddEventHandler("mouseClicked", new System.EventHandler>>(MouseClickedEventHandler)); + AddEventHandler("mouseEntered", new System.EventHandler>>(MouseEnteredEventHandler)); + AddEventHandler("mouseExited", new System.EventHandler>>(MouseExitedEventHandler)); + AddEventHandler("mousePressed", new System.EventHandler>>(MousePressedEventHandler)); + AddEventHandler("mouseReleased", new System.EventHandler>>(MouseReleasedEventHandler)); } @@ -108,7 +108,8 @@ protected virtual void InitializeHandlers() void MouseClickedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseClicked != null) OnMouseClicked.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseClicked != null) ? OnMouseClicked : MouseClicked; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -127,7 +128,8 @@ public virtual void MouseClicked(Java.Awt.EventNs.MouseEvent arg0) void MouseEnteredEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseEntered != null) OnMouseEntered.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseEntered != null) ? OnMouseEntered : MouseEntered; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -146,7 +148,8 @@ public virtual void MouseEntered(Java.Awt.EventNs.MouseEvent arg0) void MouseExitedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseExited != null) OnMouseExited.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseExited != null) ? OnMouseExited : MouseExited; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -165,7 +168,8 @@ public virtual void MouseExited(Java.Awt.EventNs.MouseEvent arg0) void MousePressedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMousePressed != null) OnMousePressed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMousePressed != null) ? OnMousePressed : MousePressed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -184,7 +188,8 @@ public virtual void MousePressed(Java.Awt.EventNs.MouseEvent arg0) void MouseReleasedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseReleased != null) OnMouseReleased.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseReleased != null) ? OnMouseReleased : MouseReleased; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/MouseMotionAdapter.cs b/src/net/JNet/Generated/Java/Awt/EventNs/MouseMotionAdapter.cs index 3b85345608..02f86ec0cf 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/MouseMotionAdapter.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/MouseMotionAdapter.cs @@ -50,8 +50,8 @@ public partial class MouseMotionAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("mouseDragged", new System.EventHandler>>(MouseDraggedEventHandler)); OnMouseDragged = MouseDragged; - AddEventHandler("mouseMoved", new System.EventHandler>>(MouseMovedEventHandler)); OnMouseMoved = MouseMoved; + AddEventHandler("mouseDragged", new System.EventHandler>>(MouseDraggedEventHandler)); + AddEventHandler("mouseMoved", new System.EventHandler>>(MouseMovedEventHandler)); } @@ -62,7 +62,8 @@ protected virtual void InitializeHandlers() void MouseDraggedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseDragged != null) OnMouseDragged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseDragged != null) ? OnMouseDragged : MouseDragged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -81,7 +82,8 @@ public virtual void MouseDragged(Java.Awt.EventNs.MouseEvent arg0) void MouseMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseMoved != null) OnMouseMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseMoved != null) ? OnMouseMoved : MouseMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/MouseMotionListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/MouseMotionListener.cs index bd05a8bf38..337d77feac 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/MouseMotionListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/MouseMotionListener.cs @@ -78,8 +78,8 @@ public partial class MouseMotionListener : Java.Awt.EventNs.IMouseMotionListener /// protected virtual void InitializeHandlers() { - AddEventHandler("mouseDragged", new System.EventHandler>>(MouseDraggedEventHandler)); OnMouseDragged = MouseDragged; - AddEventHandler("mouseMoved", new System.EventHandler>>(MouseMovedEventHandler)); OnMouseMoved = MouseMoved; + AddEventHandler("mouseDragged", new System.EventHandler>>(MouseDraggedEventHandler)); + AddEventHandler("mouseMoved", new System.EventHandler>>(MouseMovedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void MouseDraggedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseDragged != null) OnMouseDragged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseDragged != null) ? OnMouseDragged : MouseDragged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void MouseDragged(Java.Awt.EventNs.MouseEvent arg0) void MouseMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseMoved != null) OnMouseMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseMoved != null) ? OnMouseMoved : MouseMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/MouseWheelListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/MouseWheelListener.cs index 2d615a77da..c9e228a87d 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/MouseWheelListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/MouseWheelListener.cs @@ -73,7 +73,7 @@ public partial class MouseWheelListener : Java.Awt.EventNs.IMouseWheelListener /// protected virtual void InitializeHandlers() { - AddEventHandler("mouseWheelMoved", new System.EventHandler>>(MouseWheelMovedEventHandler)); OnMouseWheelMoved = MouseWheelMoved; + AddEventHandler("mouseWheelMoved", new System.EventHandler>>(MouseWheelMovedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void MouseWheelMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseWheelMoved != null) OnMouseWheelMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseWheelMoved != null) ? OnMouseWheelMoved : MouseWheelMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/TextListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/TextListener.cs index a325e9c4a6..6f961edbcd 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/TextListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/TextListener.cs @@ -73,7 +73,7 @@ public partial class TextListener : Java.Awt.EventNs.ITextListener /// protected virtual void InitializeHandlers() { - AddEventHandler("textValueChanged", new System.EventHandler>>(TextValueChangedEventHandler)); OnTextValueChanged = TextValueChanged; + AddEventHandler("textValueChanged", new System.EventHandler>>(TextValueChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void TextValueChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTextValueChanged != null) OnTextValueChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnTextValueChanged != null) ? OnTextValueChanged : TextValueChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/WindowAdapter.cs b/src/net/JNet/Generated/Java/Awt/EventNs/WindowAdapter.cs index 783290cb2a..c4cd56f151 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/WindowAdapter.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/WindowAdapter.cs @@ -50,16 +50,16 @@ public partial class WindowAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("windowActivated", new System.EventHandler>>(WindowActivatedEventHandler)); OnWindowActivated = WindowActivated; - AddEventHandler("windowClosed", new System.EventHandler>>(WindowClosedEventHandler)); OnWindowClosed = WindowClosed; - AddEventHandler("windowClosing", new System.EventHandler>>(WindowClosingEventHandler)); OnWindowClosing = WindowClosing; - AddEventHandler("windowDeactivated", new System.EventHandler>>(WindowDeactivatedEventHandler)); OnWindowDeactivated = WindowDeactivated; - AddEventHandler("windowDeiconified", new System.EventHandler>>(WindowDeiconifiedEventHandler)); OnWindowDeiconified = WindowDeiconified; - AddEventHandler("windowGainedFocus", new System.EventHandler>>(WindowGainedFocusEventHandler)); OnWindowGainedFocus = WindowGainedFocus; - AddEventHandler("windowIconified", new System.EventHandler>>(WindowIconifiedEventHandler)); OnWindowIconified = WindowIconified; - AddEventHandler("windowLostFocus", new System.EventHandler>>(WindowLostFocusEventHandler)); OnWindowLostFocus = WindowLostFocus; - AddEventHandler("windowOpened", new System.EventHandler>>(WindowOpenedEventHandler)); OnWindowOpened = WindowOpened; - AddEventHandler("windowStateChanged", new System.EventHandler>>(WindowStateChangedEventHandler)); OnWindowStateChanged = WindowStateChanged; + AddEventHandler("windowActivated", new System.EventHandler>>(WindowActivatedEventHandler)); + AddEventHandler("windowClosed", new System.EventHandler>>(WindowClosedEventHandler)); + AddEventHandler("windowClosing", new System.EventHandler>>(WindowClosingEventHandler)); + AddEventHandler("windowDeactivated", new System.EventHandler>>(WindowDeactivatedEventHandler)); + AddEventHandler("windowDeiconified", new System.EventHandler>>(WindowDeiconifiedEventHandler)); + AddEventHandler("windowGainedFocus", new System.EventHandler>>(WindowGainedFocusEventHandler)); + AddEventHandler("windowIconified", new System.EventHandler>>(WindowIconifiedEventHandler)); + AddEventHandler("windowLostFocus", new System.EventHandler>>(WindowLostFocusEventHandler)); + AddEventHandler("windowOpened", new System.EventHandler>>(WindowOpenedEventHandler)); + AddEventHandler("windowStateChanged", new System.EventHandler>>(WindowStateChangedEventHandler)); } @@ -70,7 +70,8 @@ protected virtual void InitializeHandlers() void WindowActivatedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowActivated != null) OnWindowActivated.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowActivated != null) ? OnWindowActivated : WindowActivated; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -89,7 +90,8 @@ public virtual void WindowActivated(Java.Awt.EventNs.WindowEvent arg0) void WindowClosedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowClosed != null) OnWindowClosed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowClosed != null) ? OnWindowClosed : WindowClosed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -108,7 +110,8 @@ public virtual void WindowClosed(Java.Awt.EventNs.WindowEvent arg0) void WindowClosingEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowClosing != null) OnWindowClosing.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowClosing != null) ? OnWindowClosing : WindowClosing; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -127,7 +130,8 @@ public virtual void WindowClosing(Java.Awt.EventNs.WindowEvent arg0) void WindowDeactivatedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowDeactivated != null) OnWindowDeactivated.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowDeactivated != null) ? OnWindowDeactivated : WindowDeactivated; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -146,7 +150,8 @@ public virtual void WindowDeactivated(Java.Awt.EventNs.WindowEvent arg0) void WindowDeiconifiedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowDeiconified != null) OnWindowDeiconified.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowDeiconified != null) ? OnWindowDeiconified : WindowDeiconified; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -165,7 +170,8 @@ public virtual void WindowDeiconified(Java.Awt.EventNs.WindowEvent arg0) void WindowGainedFocusEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowGainedFocus != null) OnWindowGainedFocus.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowGainedFocus != null) ? OnWindowGainedFocus : WindowGainedFocus; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -184,7 +190,8 @@ public virtual void WindowGainedFocus(Java.Awt.EventNs.WindowEvent arg0) void WindowIconifiedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowIconified != null) OnWindowIconified.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowIconified != null) ? OnWindowIconified : WindowIconified; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -203,7 +210,8 @@ public virtual void WindowIconified(Java.Awt.EventNs.WindowEvent arg0) void WindowLostFocusEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowLostFocus != null) OnWindowLostFocus.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowLostFocus != null) ? OnWindowLostFocus : WindowLostFocus; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -222,7 +230,8 @@ public virtual void WindowLostFocus(Java.Awt.EventNs.WindowEvent arg0) void WindowOpenedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowOpened != null) OnWindowOpened.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowOpened != null) ? OnWindowOpened : WindowOpened; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -241,7 +250,8 @@ public virtual void WindowOpened(Java.Awt.EventNs.WindowEvent arg0) void WindowStateChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowStateChanged != null) OnWindowStateChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowStateChanged != null) ? OnWindowStateChanged : WindowStateChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/WindowFocusListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/WindowFocusListener.cs index 5d01d149b9..19f8b1a4d5 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/WindowFocusListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/WindowFocusListener.cs @@ -78,8 +78,8 @@ public partial class WindowFocusListener : Java.Awt.EventNs.IWindowFocusListener /// protected virtual void InitializeHandlers() { - AddEventHandler("windowGainedFocus", new System.EventHandler>>(WindowGainedFocusEventHandler)); OnWindowGainedFocus = WindowGainedFocus; - AddEventHandler("windowLostFocus", new System.EventHandler>>(WindowLostFocusEventHandler)); OnWindowLostFocus = WindowLostFocus; + AddEventHandler("windowGainedFocus", new System.EventHandler>>(WindowGainedFocusEventHandler)); + AddEventHandler("windowLostFocus", new System.EventHandler>>(WindowLostFocusEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void WindowGainedFocusEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowGainedFocus != null) OnWindowGainedFocus.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowGainedFocus != null) ? OnWindowGainedFocus : WindowGainedFocus; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void WindowGainedFocus(Java.Awt.EventNs.WindowEvent arg0) void WindowLostFocusEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowLostFocus != null) OnWindowLostFocus.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowLostFocus != null) ? OnWindowLostFocus : WindowLostFocus; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/WindowListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/WindowListener.cs index fd899730bb..37ba9c7c82 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/WindowListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/WindowListener.cs @@ -103,13 +103,13 @@ public partial class WindowListener : Java.Awt.EventNs.IWindowListener /// protected virtual void InitializeHandlers() { - AddEventHandler("windowActivated", new System.EventHandler>>(WindowActivatedEventHandler)); OnWindowActivated = WindowActivated; - AddEventHandler("windowClosed", new System.EventHandler>>(WindowClosedEventHandler)); OnWindowClosed = WindowClosed; - AddEventHandler("windowClosing", new System.EventHandler>>(WindowClosingEventHandler)); OnWindowClosing = WindowClosing; - AddEventHandler("windowDeactivated", new System.EventHandler>>(WindowDeactivatedEventHandler)); OnWindowDeactivated = WindowDeactivated; - AddEventHandler("windowDeiconified", new System.EventHandler>>(WindowDeiconifiedEventHandler)); OnWindowDeiconified = WindowDeiconified; - AddEventHandler("windowIconified", new System.EventHandler>>(WindowIconifiedEventHandler)); OnWindowIconified = WindowIconified; - AddEventHandler("windowOpened", new System.EventHandler>>(WindowOpenedEventHandler)); OnWindowOpened = WindowOpened; + AddEventHandler("windowActivated", new System.EventHandler>>(WindowActivatedEventHandler)); + AddEventHandler("windowClosed", new System.EventHandler>>(WindowClosedEventHandler)); + AddEventHandler("windowClosing", new System.EventHandler>>(WindowClosingEventHandler)); + AddEventHandler("windowDeactivated", new System.EventHandler>>(WindowDeactivatedEventHandler)); + AddEventHandler("windowDeiconified", new System.EventHandler>>(WindowDeiconifiedEventHandler)); + AddEventHandler("windowIconified", new System.EventHandler>>(WindowIconifiedEventHandler)); + AddEventHandler("windowOpened", new System.EventHandler>>(WindowOpenedEventHandler)); } @@ -120,7 +120,8 @@ protected virtual void InitializeHandlers() void WindowActivatedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowActivated != null) OnWindowActivated.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowActivated != null) ? OnWindowActivated : WindowActivated; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -139,7 +140,8 @@ public virtual void WindowActivated(Java.Awt.EventNs.WindowEvent arg0) void WindowClosedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowClosed != null) OnWindowClosed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowClosed != null) ? OnWindowClosed : WindowClosed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -158,7 +160,8 @@ public virtual void WindowClosed(Java.Awt.EventNs.WindowEvent arg0) void WindowClosingEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowClosing != null) OnWindowClosing.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowClosing != null) ? OnWindowClosing : WindowClosing; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -177,7 +180,8 @@ public virtual void WindowClosing(Java.Awt.EventNs.WindowEvent arg0) void WindowDeactivatedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowDeactivated != null) OnWindowDeactivated.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowDeactivated != null) ? OnWindowDeactivated : WindowDeactivated; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -196,7 +200,8 @@ public virtual void WindowDeactivated(Java.Awt.EventNs.WindowEvent arg0) void WindowDeiconifiedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowDeiconified != null) OnWindowDeiconified.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowDeiconified != null) ? OnWindowDeiconified : WindowDeiconified; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -215,7 +220,8 @@ public virtual void WindowDeiconified(Java.Awt.EventNs.WindowEvent arg0) void WindowIconifiedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowIconified != null) OnWindowIconified.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowIconified != null) ? OnWindowIconified : WindowIconified; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -234,7 +240,8 @@ public virtual void WindowIconified(Java.Awt.EventNs.WindowEvent arg0) void WindowOpenedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowOpened != null) OnWindowOpened.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowOpened != null) ? OnWindowOpened : WindowOpened; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Awt/EventNs/WindowStateListener.cs b/src/net/JNet/Generated/Java/Awt/EventNs/WindowStateListener.cs index 4177647314..87c945585a 100644 --- a/src/net/JNet/Generated/Java/Awt/EventNs/WindowStateListener.cs +++ b/src/net/JNet/Generated/Java/Awt/EventNs/WindowStateListener.cs @@ -73,7 +73,7 @@ public partial class WindowStateListener : Java.Awt.EventNs.IWindowStateListener /// protected virtual void InitializeHandlers() { - AddEventHandler("windowStateChanged", new System.EventHandler>>(WindowStateChangedEventHandler)); OnWindowStateChanged = WindowStateChanged; + AddEventHandler("windowStateChanged", new System.EventHandler>>(WindowStateChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void WindowStateChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWindowStateChanged != null) OnWindowStateChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWindowStateChanged != null) ? OnWindowStateChanged : WindowStateChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextMembershipListener.cs b/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextMembershipListener.cs index 0dac3a349c..d53437effe 100644 --- a/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextMembershipListener.cs +++ b/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextMembershipListener.cs @@ -78,8 +78,8 @@ public partial class BeanContextMembershipListener : Java.Beans.Beancontext.IBea /// protected virtual void InitializeHandlers() { - AddEventHandler("childrenAdded", new System.EventHandler>>(ChildrenAddedEventHandler)); OnChildrenAdded = ChildrenAdded; - AddEventHandler("childrenRemoved", new System.EventHandler>>(ChildrenRemovedEventHandler)); OnChildrenRemoved = ChildrenRemoved; + AddEventHandler("childrenAdded", new System.EventHandler>>(ChildrenAddedEventHandler)); + AddEventHandler("childrenRemoved", new System.EventHandler>>(ChildrenRemovedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void ChildrenAddedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnChildrenAdded != null) OnChildrenAdded.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnChildrenAdded != null) ? OnChildrenAdded : ChildrenAdded; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void ChildrenAdded(Java.Beans.Beancontext.BeanContextMembershipEv void ChildrenRemovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnChildrenRemoved != null) OnChildrenRemoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnChildrenRemoved != null) ? OnChildrenRemoved : ChildrenRemoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextServiceRevokedListener.cs b/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextServiceRevokedListener.cs index 2462d2c065..b8832d6534 100644 --- a/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextServiceRevokedListener.cs +++ b/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextServiceRevokedListener.cs @@ -73,7 +73,7 @@ public partial class BeanContextServiceRevokedListener : Java.Beans.Beancontext. /// protected virtual void InitializeHandlers() { - AddEventHandler("serviceRevoked", new System.EventHandler>>(ServiceRevokedEventHandler)); OnServiceRevoked = ServiceRevoked; + AddEventHandler("serviceRevoked", new System.EventHandler>>(ServiceRevokedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void ServiceRevokedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnServiceRevoked != null) OnServiceRevoked.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnServiceRevoked != null) ? OnServiceRevoked : ServiceRevoked; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextServicesListener.cs b/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextServicesListener.cs index 61d24e9fa9..90b9837e9a 100644 --- a/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextServicesListener.cs +++ b/src/net/JNet/Generated/Java/Beans/Beancontext/BeanContextServicesListener.cs @@ -78,8 +78,8 @@ public partial class BeanContextServicesListener : Java.Beans.Beancontext.IBeanC /// protected virtual void InitializeHandlers() { - AddEventHandler("serviceRevoked", new System.EventHandler>>(ServiceRevokedEventHandler)); OnServiceRevoked = ServiceRevoked; - AddEventHandler("serviceAvailable", new System.EventHandler>>(ServiceAvailableEventHandler)); OnServiceAvailable = ServiceAvailable; + AddEventHandler("serviceRevoked", new System.EventHandler>>(ServiceRevokedEventHandler)); + AddEventHandler("serviceAvailable", new System.EventHandler>>(ServiceAvailableEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void ServiceRevokedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnServiceRevoked != null) OnServiceRevoked.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnServiceRevoked != null) ? OnServiceRevoked : ServiceRevoked; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void ServiceRevoked(Java.Beans.Beancontext.BeanContextServiceRevo void ServiceAvailableEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnServiceAvailable != null) OnServiceAvailable.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnServiceAvailable != null) ? OnServiceAvailable : ServiceAvailable; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Beans/ExceptionListener.cs b/src/net/JNet/Generated/Java/Beans/ExceptionListener.cs index 2d813cb9de..9a910cda59 100644 --- a/src/net/JNet/Generated/Java/Beans/ExceptionListener.cs +++ b/src/net/JNet/Generated/Java/Beans/ExceptionListener.cs @@ -73,7 +73,7 @@ public partial class ExceptionListener : Java.Beans.IExceptionListener /// protected virtual void InitializeHandlers() { - AddEventHandler("exceptionThrown", new System.EventHandler>(ExceptionThrownEventHandler)); OnExceptionThrown = ExceptionThrown; + AddEventHandler("exceptionThrown", new System.EventHandler>(ExceptionThrownEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void ExceptionThrownEventHandler(object sender, CLRListenerEventArgs data) { - if (OnExceptionThrown != null) OnExceptionThrown.Invoke(JVMBridgeException.New(data.EventData.EventData as MASES.JCOBridge.C2JBridge.JVMInterop.IJavaObject)); + var methodToExecute = (OnExceptionThrown != null) ? OnExceptionThrown : ExceptionThrown; + methodToExecute.Invoke(JVMBridgeException.New(data.EventData.EventData as MASES.JCOBridge.C2JBridge.JVMInterop.IJavaObject)); } /// diff --git a/src/net/JNet/Generated/Java/Beans/PropertyChangeListener.cs b/src/net/JNet/Generated/Java/Beans/PropertyChangeListener.cs index 581547750e..527049baa1 100644 --- a/src/net/JNet/Generated/Java/Beans/PropertyChangeListener.cs +++ b/src/net/JNet/Generated/Java/Beans/PropertyChangeListener.cs @@ -73,7 +73,7 @@ public partial class PropertyChangeListener : Java.Beans.IPropertyChangeListener /// protected virtual void InitializeHandlers() { - AddEventHandler("propertyChange", new System.EventHandler>>(PropertyChangeEventHandler)); OnPropertyChange = PropertyChange; + AddEventHandler("propertyChange", new System.EventHandler>>(PropertyChangeEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void PropertyChangeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPropertyChange != null) OnPropertyChange.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPropertyChange != null) ? OnPropertyChange : PropertyChange; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Beans/VetoableChangeListener.cs b/src/net/JNet/Generated/Java/Beans/VetoableChangeListener.cs index 13e925ee9c..58c6128ca1 100644 --- a/src/net/JNet/Generated/Java/Beans/VetoableChangeListener.cs +++ b/src/net/JNet/Generated/Java/Beans/VetoableChangeListener.cs @@ -74,7 +74,7 @@ public partial class VetoableChangeListener : Java.Beans.IVetoableChangeListener /// protected virtual void InitializeHandlers() { - AddEventHandler("vetoableChange", new System.EventHandler>>(VetoableChangeEventHandler)); OnVetoableChange = VetoableChange; + AddEventHandler("vetoableChange", new System.EventHandler>>(VetoableChangeEventHandler)); } @@ -85,7 +85,8 @@ protected virtual void InitializeHandlers() void VetoableChangeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnVetoableChange != null) OnVetoableChange.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnVetoableChange != null) ? OnVetoableChange : VetoableChange; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Net/Http/WebSocket.cs b/src/net/JNet/Generated/Java/Net/Http/WebSocket.cs index 69109a5091..20d776672e 100644 --- a/src/net/JNet/Generated/Java/Net/Http/WebSocket.cs +++ b/src/net/JNet/Generated/Java/Net/Http/WebSocket.cs @@ -312,13 +312,13 @@ public partial class Listener /// protected virtual void InitializeHandlers() { - AddEventHandler("onBinary", new System.EventHandler>>(OnBinaryEventHandler)); OnOnBinary = OnBinary; - AddEventHandler("onClose", new System.EventHandler>>(OnCloseEventHandler)); OnOnClose = OnClose; - AddEventHandler("onPing", new System.EventHandler>>(OnPingEventHandler)); OnOnPing = OnPing; - AddEventHandler("onPong", new System.EventHandler>>(OnPongEventHandler)); OnOnPong = OnPong; - AddEventHandler("onText", new System.EventHandler>>(OnTextEventHandler)); OnOnText = OnText; - AddEventHandler("onError", new System.EventHandler>>(OnErrorEventHandler)); OnOnError = OnError; - AddEventHandler("onOpen", new System.EventHandler>>(OnOpenEventHandler)); OnOnOpen = OnOpen; + AddEventHandler("onBinary", new System.EventHandler>>(OnBinaryEventHandler)); + AddEventHandler("onClose", new System.EventHandler>>(OnCloseEventHandler)); + AddEventHandler("onPing", new System.EventHandler>>(OnPingEventHandler)); + AddEventHandler("onPong", new System.EventHandler>>(OnPongEventHandler)); + AddEventHandler("onText", new System.EventHandler>>(OnTextEventHandler)); + AddEventHandler("onError", new System.EventHandler>>(OnErrorEventHandler)); + AddEventHandler("onOpen", new System.EventHandler>>(OnOpenEventHandler)); } @@ -329,11 +329,9 @@ protected virtual void InitializeHandlers() void OnBinaryEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOnBinary != null) - { - var executionResult = OnOnBinary.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOnBinary != null) ? OnOnBinary : OnBinary; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + data.SetReturnValue(executionResult); } /// @@ -355,11 +353,9 @@ public virtual Java.Util.Concurrent.CompletionStage OnBinary(Java.Net.Ht void OnCloseEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOnClose != null) - { - var executionResult = OnOnClose.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOnClose != null) ? OnOnClose : OnClose; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + data.SetReturnValue(executionResult); } /// @@ -381,11 +377,9 @@ public virtual Java.Util.Concurrent.CompletionStage OnClose(Java.Net.Htt void OnPingEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOnPing != null) - { - var executionResult = OnOnPing.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOnPing != null) ? OnOnPing : OnPing; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -406,11 +400,9 @@ public virtual Java.Util.Concurrent.CompletionStage OnPing(Java.Net.Http void OnPongEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOnPong != null) - { - var executionResult = OnOnPong.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOnPong != null) ? OnOnPong : OnPong; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -431,11 +423,9 @@ public virtual Java.Util.Concurrent.CompletionStage OnPong(Java.Net.Http void OnTextEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOnText != null) - { - var executionResult = OnOnText.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOnText != null) ? OnOnText : OnText; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + data.SetReturnValue(executionResult); } /// @@ -457,7 +447,8 @@ public virtual Java.Util.Concurrent.CompletionStage OnText(Java.Net.Http void OnErrorEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOnError != null) OnOnError.Invoke(data.EventData.TypedEventData, JVMBridgeException.New(data.EventData.ExtraData.Get(0) as MASES.JCOBridge.C2JBridge.JVMInterop.IJavaObject)); + var methodToExecute = (OnOnError != null) ? OnOnError : OnError; + methodToExecute.Invoke(data.EventData.TypedEventData, JVMBridgeException.New(data.EventData.ExtraData.Get(0) as MASES.JCOBridge.C2JBridge.JVMInterop.IJavaObject)); } /// @@ -477,7 +468,8 @@ public virtual void OnError(Java.Net.Http.WebSocket arg0, MASES.JCOBridge.C2JBri void OnOpenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOnOpen != null) OnOnOpen.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnOnOpen != null) ? OnOnOpen : OnOpen; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/BiConsumer.cs b/src/net/JNet/Generated/Java/Util/Function/BiConsumer.cs index 69c66fcaf6..bfc12f7a4d 100644 --- a/src/net/JNet/Generated/Java/Util/Function/BiConsumer.cs +++ b/src/net/JNet/Generated/Java/Util/Function/BiConsumer.cs @@ -50,8 +50,8 @@ public partial class BiConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); } @@ -62,7 +62,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -82,11 +83,9 @@ public virtual void Accept(object arg0, object arg1) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -166,8 +165,8 @@ public partial class BiConsumer : Java.Util.Function.IBiConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; - AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); } @@ -178,7 +177,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -198,11 +198,9 @@ public virtual void Accept(T arg0, U arg1) void AndThenEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/BiFunction.cs b/src/net/JNet/Generated/Java/Util/Function/BiFunction.cs index ee4bde155f..7e84e09964 100644 --- a/src/net/JNet/Generated/Java/Util/Function/BiFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/BiFunction.cs @@ -50,8 +50,8 @@ public partial class BiFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); } @@ -62,11 +62,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -87,11 +85,9 @@ public virtual object Apply(object arg0, object arg1) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -173,8 +169,8 @@ public partial class BiFunction : Java.Util.Function.IBiFunction protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; - AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); } @@ -185,11 +181,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -210,11 +204,9 @@ public virtual R Apply(T arg0, U arg1) void AndThenEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/BiPredicate.cs b/src/net/JNet/Generated/Java/Util/Function/BiPredicate.cs index ec1fed543e..a7fe771c9a 100644 --- a/src/net/JNet/Generated/Java/Util/Function/BiPredicate.cs +++ b/src/net/JNet/Generated/Java/Util/Function/BiPredicate.cs @@ -50,10 +50,10 @@ public partial class BiPredicate /// protected virtual void InitializeHandlers() { - AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); OnTest = Test; - AddEventHandler("and", new System.EventHandler>>(AndEventHandler)); OnAnd = And; - AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); OnNegate = Negate; - AddEventHandler("or", new System.EventHandler>>(OrEventHandler)); OnOr = Or; + AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); + AddEventHandler("and", new System.EventHandler>>(AndEventHandler)); + AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); + AddEventHandler("or", new System.EventHandler>>(OrEventHandler)); } @@ -64,11 +64,9 @@ protected virtual void InitializeHandlers() void TestEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTest != null) - { - var executionResult = OnTest.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnTest != null) ? OnTest : Test; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -89,11 +87,9 @@ public virtual bool Test(object arg0, object arg1) void AndEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAnd != null) - { - var executionResult = OnAnd.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAnd != null) ? OnAnd : And; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -113,11 +109,9 @@ public virtual Java.Util.Function.BiPredicate And(Java.Util.Function.BiPredicate void NegateEventHandler(object sender, CLRListenerEventArgs data) { - if (OnNegate != null) - { - var executionResult = OnNegate.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnNegate != null) ? OnNegate : Negate; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -137,11 +131,9 @@ public virtual Java.Util.Function.BiPredicate Negate() void OrEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOr != null) - { - var executionResult = OnOr.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOr != null) ? OnOr : Or; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -236,10 +228,10 @@ public partial class BiPredicate : Java.Util.Function.IBiPredicate /// protected virtual void InitializeHandlers() { - AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); OnTest = Test; - AddEventHandler("and", new System.EventHandler>>>(AndEventHandler)); OnAnd = And; - AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); OnNegate = Negate; - AddEventHandler("or", new System.EventHandler>>>(OrEventHandler)); OnOr = Or; + AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); + AddEventHandler("and", new System.EventHandler>>>(AndEventHandler)); + AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); + AddEventHandler("or", new System.EventHandler>>>(OrEventHandler)); } @@ -250,11 +242,9 @@ protected virtual void InitializeHandlers() void TestEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTest != null) - { - var executionResult = OnTest.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnTest != null) ? OnTest : Test; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -275,11 +265,9 @@ public virtual bool Test(T arg0, U arg1) void AndEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnAnd != null) - { - var executionResult = OnAnd.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAnd != null) ? OnAnd : And; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -301,11 +289,9 @@ public virtual Java.Util.Function.BiPredicate And data) { - if (OnNegate != null) - { - var executionResult = OnNegate.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnNegate != null) ? OnNegate : Negate; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -325,11 +311,9 @@ public virtual Java.Util.Function.BiPredicate Negate() void OrEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnOr != null) - { - var executionResult = OnOr.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOr != null) ? OnOr : Or; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/BinaryOperator.cs b/src/net/JNet/Generated/Java/Util/Function/BinaryOperator.cs index d48b29aff6..43d44da01b 100644 --- a/src/net/JNet/Generated/Java/Util/Function/BinaryOperator.cs +++ b/src/net/JNet/Generated/Java/Util/Function/BinaryOperator.cs @@ -50,8 +50,8 @@ public partial class BinaryOperator /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); } @@ -62,11 +62,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -87,11 +85,9 @@ public virtual object Apply(object arg0, object arg1) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -177,8 +173,8 @@ public partial class BinaryOperator : Java.Util.Function.IBinaryOperator /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; - AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); } @@ -189,11 +185,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -216,11 +210,9 @@ public virtual R Apply(T arg0, U arg1) void AndThenEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/BooleanSupplier.cs b/src/net/JNet/Generated/Java/Util/Function/BooleanSupplier.cs index 4efaa9d101..5f7a63b863 100644 --- a/src/net/JNet/Generated/Java/Util/Function/BooleanSupplier.cs +++ b/src/net/JNet/Generated/Java/Util/Function/BooleanSupplier.cs @@ -74,7 +74,7 @@ public partial class BooleanSupplier : Java.Util.Function.IBooleanSupplier /// protected virtual void InitializeHandlers() { - AddEventHandler("getAsBoolean", new System.EventHandler>(GetAsBooleanEventHandler)); OnGetAsBoolean = GetAsBoolean; + AddEventHandler("getAsBoolean", new System.EventHandler>(GetAsBooleanEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void GetAsBooleanEventHandler(object sender, CLRListenerEventArgs data) { - if (OnGetAsBoolean != null) - { - var executionResult = OnGetAsBoolean.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetAsBoolean != null) ? OnGetAsBoolean : GetAsBoolean; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/Consumer.cs b/src/net/JNet/Generated/Java/Util/Function/Consumer.cs index f9e0901300..6adc1cb6a5 100644 --- a/src/net/JNet/Generated/Java/Util/Function/Consumer.cs +++ b/src/net/JNet/Generated/Java/Util/Function/Consumer.cs @@ -50,8 +50,8 @@ public partial class Consumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); } @@ -62,7 +62,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -81,11 +82,9 @@ public virtual void Accept(object arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -163,8 +162,8 @@ public partial class Consumer : Java.Util.Function.IConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; - AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); } @@ -175,7 +174,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -194,11 +194,9 @@ public virtual void Accept(T arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/DoubleBinaryOperator.cs b/src/net/JNet/Generated/Java/Util/Function/DoubleBinaryOperator.cs index 6a9f7c6dcf..2fe332f66d 100644 --- a/src/net/JNet/Generated/Java/Util/Function/DoubleBinaryOperator.cs +++ b/src/net/JNet/Generated/Java/Util/Function/DoubleBinaryOperator.cs @@ -75,7 +75,7 @@ public partial class DoubleBinaryOperator : Java.Util.Function.IDoubleBinaryOper /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); OnApplyAsDouble = ApplyAsDouble; + AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); } @@ -86,11 +86,9 @@ protected virtual void InitializeHandlers() void ApplyAsDoubleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsDouble != null) - { - var executionResult = OnApplyAsDouble.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsDouble != null) ? OnApplyAsDouble : ApplyAsDouble; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/DoubleConsumer.cs b/src/net/JNet/Generated/Java/Util/Function/DoubleConsumer.cs index 3ad57a1c23..37ba681ced 100644 --- a/src/net/JNet/Generated/Java/Util/Function/DoubleConsumer.cs +++ b/src/net/JNet/Generated/Java/Util/Function/DoubleConsumer.cs @@ -79,8 +79,8 @@ public partial class DoubleConsumer : Java.Util.Function.IDoubleConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); } @@ -91,7 +91,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -110,11 +111,9 @@ public virtual void Accept(double arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/DoubleFunction.cs b/src/net/JNet/Generated/Java/Util/Function/DoubleFunction.cs index f95c7c60ba..12231922a4 100644 --- a/src/net/JNet/Generated/Java/Util/Function/DoubleFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/DoubleFunction.cs @@ -50,7 +50,7 @@ public partial class DoubleFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); } @@ -61,11 +61,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -137,7 +135,7 @@ public partial class DoubleFunction : Java.Util.Function.IDoubleFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); } @@ -148,11 +146,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/DoublePredicate.cs b/src/net/JNet/Generated/Java/Util/Function/DoublePredicate.cs index 95cf90de43..d8dee8ecca 100644 --- a/src/net/JNet/Generated/Java/Util/Function/DoublePredicate.cs +++ b/src/net/JNet/Generated/Java/Util/Function/DoublePredicate.cs @@ -92,10 +92,10 @@ public partial class DoublePredicate : Java.Util.Function.IDoublePredicate /// protected virtual void InitializeHandlers() { - AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); OnTest = Test; - AddEventHandler("and", new System.EventHandler>>(AndEventHandler)); OnAnd = And; - AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); OnNegate = Negate; - AddEventHandler("or", new System.EventHandler>>(OrEventHandler)); OnOr = Or; + AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); + AddEventHandler("and", new System.EventHandler>>(AndEventHandler)); + AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); + AddEventHandler("or", new System.EventHandler>>(OrEventHandler)); } @@ -106,11 +106,9 @@ protected virtual void InitializeHandlers() void TestEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTest != null) - { - var executionResult = OnTest.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnTest != null) ? OnTest : Test; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -130,11 +128,9 @@ public virtual bool Test(double arg0) void AndEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAnd != null) - { - var executionResult = OnAnd.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAnd != null) ? OnAnd : And; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -154,11 +150,9 @@ public virtual Java.Util.Function.DoublePredicate And(Java.Util.Function.DoubleP void NegateEventHandler(object sender, CLRListenerEventArgs data) { - if (OnNegate != null) - { - var executionResult = OnNegate.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnNegate != null) ? OnNegate : Negate; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -178,11 +172,9 @@ public virtual Java.Util.Function.DoublePredicate Negate() void OrEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOr != null) - { - var executionResult = OnOr.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOr != null) ? OnOr : Or; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/DoubleSupplier.cs b/src/net/JNet/Generated/Java/Util/Function/DoubleSupplier.cs index c2044978b5..b00f99d514 100644 --- a/src/net/JNet/Generated/Java/Util/Function/DoubleSupplier.cs +++ b/src/net/JNet/Generated/Java/Util/Function/DoubleSupplier.cs @@ -74,7 +74,7 @@ public partial class DoubleSupplier : Java.Util.Function.IDoubleSupplier /// protected virtual void InitializeHandlers() { - AddEventHandler("getAsDouble", new System.EventHandler>(GetAsDoubleEventHandler)); OnGetAsDouble = GetAsDouble; + AddEventHandler("getAsDouble", new System.EventHandler>(GetAsDoubleEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void GetAsDoubleEventHandler(object sender, CLRListenerEventArgs data) { - if (OnGetAsDouble != null) - { - var executionResult = OnGetAsDouble.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetAsDouble != null) ? OnGetAsDouble : GetAsDouble; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/DoubleToIntFunction.cs b/src/net/JNet/Generated/Java/Util/Function/DoubleToIntFunction.cs index 381728c53f..08e2356c39 100644 --- a/src/net/JNet/Generated/Java/Util/Function/DoubleToIntFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/DoubleToIntFunction.cs @@ -74,7 +74,7 @@ public partial class DoubleToIntFunction : Java.Util.Function.IDoubleToIntFuncti /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); OnApplyAsInt = ApplyAsInt; + AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void ApplyAsIntEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsInt != null) - { - var executionResult = OnApplyAsInt.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsInt != null) ? OnApplyAsInt : ApplyAsInt; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/DoubleToLongFunction.cs b/src/net/JNet/Generated/Java/Util/Function/DoubleToLongFunction.cs index 4c5808685d..7aaeacc577 100644 --- a/src/net/JNet/Generated/Java/Util/Function/DoubleToLongFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/DoubleToLongFunction.cs @@ -74,7 +74,7 @@ public partial class DoubleToLongFunction : Java.Util.Function.IDoubleToLongFunc /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); OnApplyAsLong = ApplyAsLong; + AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void ApplyAsLongEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsLong != null) - { - var executionResult = OnApplyAsLong.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsLong != null) ? OnApplyAsLong : ApplyAsLong; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/DoubleUnaryOperator.cs b/src/net/JNet/Generated/Java/Util/Function/DoubleUnaryOperator.cs index 1b3e939999..1f01ca82c9 100644 --- a/src/net/JNet/Generated/Java/Util/Function/DoubleUnaryOperator.cs +++ b/src/net/JNet/Generated/Java/Util/Function/DoubleUnaryOperator.cs @@ -86,9 +86,9 @@ public partial class DoubleUnaryOperator : Java.Util.Function.IDoubleUnaryOperat /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); OnApplyAsDouble = ApplyAsDouble; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; - AddEventHandler("compose", new System.EventHandler>>(ComposeEventHandler)); OnCompose = Compose; + AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); + AddEventHandler("compose", new System.EventHandler>>(ComposeEventHandler)); } @@ -99,11 +99,9 @@ protected virtual void InitializeHandlers() void ApplyAsDoubleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsDouble != null) - { - var executionResult = OnApplyAsDouble.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsDouble != null) ? OnApplyAsDouble : ApplyAsDouble; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -123,11 +121,9 @@ public virtual double ApplyAsDouble(double arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -147,11 +143,9 @@ public virtual Java.Util.Function.DoubleUnaryOperator AndThen(Java.Util.Function void ComposeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnCompose != null) - { - var executionResult = OnCompose.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnCompose != null) ? OnCompose : Compose; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/Function.cs b/src/net/JNet/Generated/Java/Util/Function/Function.cs index d5f47ce898..cb1c7fd030 100644 --- a/src/net/JNet/Generated/Java/Util/Function/Function.cs +++ b/src/net/JNet/Generated/Java/Util/Function/Function.cs @@ -50,9 +50,9 @@ public partial class Function /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; - AddEventHandler("compose", new System.EventHandler>>(ComposeEventHandler)); OnCompose = Compose; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); + AddEventHandler("compose", new System.EventHandler>>(ComposeEventHandler)); } @@ -63,11 +63,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -87,11 +85,9 @@ public virtual object Apply(object arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -111,11 +107,9 @@ public virtual Java.Util.Function.Function AndThen(Java.Util.Function.Function a void ComposeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnCompose != null) - { - var executionResult = OnCompose.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnCompose != null) ? OnCompose : Compose; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -205,9 +199,9 @@ public partial class Function : Java.Util.Function.IFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; - AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); OnAndThen = AndThen; - AddEventHandler("compose", new System.EventHandler>>>(ComposeEventHandler)); OnCompose = Compose; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); + AddEventHandler("compose", new System.EventHandler>>>(ComposeEventHandler)); } @@ -218,11 +212,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -242,11 +234,9 @@ public virtual R Apply(T arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -269,11 +259,9 @@ public virtual Java.Util.Function.Function AndThenEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnCompose != null) - { - var executionResult = OnCompose.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnCompose != null) ? OnCompose : Compose; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/IntBinaryOperator.cs b/src/net/JNet/Generated/Java/Util/Function/IntBinaryOperator.cs index ce42c24df9..2a66c743e3 100644 --- a/src/net/JNet/Generated/Java/Util/Function/IntBinaryOperator.cs +++ b/src/net/JNet/Generated/Java/Util/Function/IntBinaryOperator.cs @@ -75,7 +75,7 @@ public partial class IntBinaryOperator : Java.Util.Function.IIntBinaryOperator /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); OnApplyAsInt = ApplyAsInt; + AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); } @@ -86,11 +86,9 @@ protected virtual void InitializeHandlers() void ApplyAsIntEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsInt != null) - { - var executionResult = OnApplyAsInt.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsInt != null) ? OnApplyAsInt : ApplyAsInt; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/IntConsumer.cs b/src/net/JNet/Generated/Java/Util/Function/IntConsumer.cs index 1319e88e0e..920d0e7bec 100644 --- a/src/net/JNet/Generated/Java/Util/Function/IntConsumer.cs +++ b/src/net/JNet/Generated/Java/Util/Function/IntConsumer.cs @@ -79,8 +79,8 @@ public partial class IntConsumer : Java.Util.Function.IIntConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); } @@ -91,7 +91,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -110,11 +111,9 @@ public virtual void Accept(int arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/IntFunction.cs b/src/net/JNet/Generated/Java/Util/Function/IntFunction.cs index b009aa3367..7cb71fd85f 100644 --- a/src/net/JNet/Generated/Java/Util/Function/IntFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/IntFunction.cs @@ -50,7 +50,7 @@ public partial class IntFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); } @@ -61,11 +61,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -137,7 +135,7 @@ public partial class IntFunction : Java.Util.Function.IIntFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); } @@ -148,11 +146,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/IntPredicate.cs b/src/net/JNet/Generated/Java/Util/Function/IntPredicate.cs index fd7a485dec..00d914244a 100644 --- a/src/net/JNet/Generated/Java/Util/Function/IntPredicate.cs +++ b/src/net/JNet/Generated/Java/Util/Function/IntPredicate.cs @@ -92,10 +92,10 @@ public partial class IntPredicate : Java.Util.Function.IIntPredicate /// protected virtual void InitializeHandlers() { - AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); OnTest = Test; - AddEventHandler("and", new System.EventHandler>>(AndEventHandler)); OnAnd = And; - AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); OnNegate = Negate; - AddEventHandler("or", new System.EventHandler>>(OrEventHandler)); OnOr = Or; + AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); + AddEventHandler("and", new System.EventHandler>>(AndEventHandler)); + AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); + AddEventHandler("or", new System.EventHandler>>(OrEventHandler)); } @@ -106,11 +106,9 @@ protected virtual void InitializeHandlers() void TestEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTest != null) - { - var executionResult = OnTest.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnTest != null) ? OnTest : Test; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -130,11 +128,9 @@ public virtual bool Test(int arg0) void AndEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAnd != null) - { - var executionResult = OnAnd.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAnd != null) ? OnAnd : And; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -154,11 +150,9 @@ public virtual Java.Util.Function.IntPredicate And(Java.Util.Function.IntPredica void NegateEventHandler(object sender, CLRListenerEventArgs data) { - if (OnNegate != null) - { - var executionResult = OnNegate.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnNegate != null) ? OnNegate : Negate; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -178,11 +172,9 @@ public virtual Java.Util.Function.IntPredicate Negate() void OrEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOr != null) - { - var executionResult = OnOr.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOr != null) ? OnOr : Or; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/IntSupplier.cs b/src/net/JNet/Generated/Java/Util/Function/IntSupplier.cs index c93e28c3fc..15bf1f07ee 100644 --- a/src/net/JNet/Generated/Java/Util/Function/IntSupplier.cs +++ b/src/net/JNet/Generated/Java/Util/Function/IntSupplier.cs @@ -74,7 +74,7 @@ public partial class IntSupplier : Java.Util.Function.IIntSupplier /// protected virtual void InitializeHandlers() { - AddEventHandler("getAsInt", new System.EventHandler>(GetAsIntEventHandler)); OnGetAsInt = GetAsInt; + AddEventHandler("getAsInt", new System.EventHandler>(GetAsIntEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void GetAsIntEventHandler(object sender, CLRListenerEventArgs data) { - if (OnGetAsInt != null) - { - var executionResult = OnGetAsInt.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetAsInt != null) ? OnGetAsInt : GetAsInt; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/IntToDoubleFunction.cs b/src/net/JNet/Generated/Java/Util/Function/IntToDoubleFunction.cs index 464bdac2d1..2b2aa01fca 100644 --- a/src/net/JNet/Generated/Java/Util/Function/IntToDoubleFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/IntToDoubleFunction.cs @@ -74,7 +74,7 @@ public partial class IntToDoubleFunction : Java.Util.Function.IIntToDoubleFuncti /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); OnApplyAsDouble = ApplyAsDouble; + AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void ApplyAsDoubleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsDouble != null) - { - var executionResult = OnApplyAsDouble.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsDouble != null) ? OnApplyAsDouble : ApplyAsDouble; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/IntToLongFunction.cs b/src/net/JNet/Generated/Java/Util/Function/IntToLongFunction.cs index c62430be2a..f70ac3f12f 100644 --- a/src/net/JNet/Generated/Java/Util/Function/IntToLongFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/IntToLongFunction.cs @@ -74,7 +74,7 @@ public partial class IntToLongFunction : Java.Util.Function.IIntToLongFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); OnApplyAsLong = ApplyAsLong; + AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void ApplyAsLongEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsLong != null) - { - var executionResult = OnApplyAsLong.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsLong != null) ? OnApplyAsLong : ApplyAsLong; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/IntUnaryOperator.cs b/src/net/JNet/Generated/Java/Util/Function/IntUnaryOperator.cs index 6952ba6f8c..dff21d14b2 100644 --- a/src/net/JNet/Generated/Java/Util/Function/IntUnaryOperator.cs +++ b/src/net/JNet/Generated/Java/Util/Function/IntUnaryOperator.cs @@ -86,9 +86,9 @@ public partial class IntUnaryOperator : Java.Util.Function.IIntUnaryOperator /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); OnApplyAsInt = ApplyAsInt; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; - AddEventHandler("compose", new System.EventHandler>>(ComposeEventHandler)); OnCompose = Compose; + AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); + AddEventHandler("compose", new System.EventHandler>>(ComposeEventHandler)); } @@ -99,11 +99,9 @@ protected virtual void InitializeHandlers() void ApplyAsIntEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsInt != null) - { - var executionResult = OnApplyAsInt.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsInt != null) ? OnApplyAsInt : ApplyAsInt; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -123,11 +121,9 @@ public virtual int ApplyAsInt(int arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -147,11 +143,9 @@ public virtual Java.Util.Function.IntUnaryOperator AndThen(Java.Util.Function.In void ComposeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnCompose != null) - { - var executionResult = OnCompose.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnCompose != null) ? OnCompose : Compose; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/LongBinaryOperator.cs b/src/net/JNet/Generated/Java/Util/Function/LongBinaryOperator.cs index 1f108767ea..09950070a9 100644 --- a/src/net/JNet/Generated/Java/Util/Function/LongBinaryOperator.cs +++ b/src/net/JNet/Generated/Java/Util/Function/LongBinaryOperator.cs @@ -75,7 +75,7 @@ public partial class LongBinaryOperator : Java.Util.Function.ILongBinaryOperator /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); OnApplyAsLong = ApplyAsLong; + AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); } @@ -86,11 +86,9 @@ protected virtual void InitializeHandlers() void ApplyAsLongEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsLong != null) - { - var executionResult = OnApplyAsLong.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsLong != null) ? OnApplyAsLong : ApplyAsLong; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/LongConsumer.cs b/src/net/JNet/Generated/Java/Util/Function/LongConsumer.cs index 26affc1327..42e9fc8535 100644 --- a/src/net/JNet/Generated/Java/Util/Function/LongConsumer.cs +++ b/src/net/JNet/Generated/Java/Util/Function/LongConsumer.cs @@ -79,8 +79,8 @@ public partial class LongConsumer : Java.Util.Function.ILongConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); } @@ -91,7 +91,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -110,11 +111,9 @@ public virtual void Accept(long arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/LongFunction.cs b/src/net/JNet/Generated/Java/Util/Function/LongFunction.cs index 77ffb75b33..3eb52ca92e 100644 --- a/src/net/JNet/Generated/Java/Util/Function/LongFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/LongFunction.cs @@ -50,7 +50,7 @@ public partial class LongFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); } @@ -61,11 +61,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -137,7 +135,7 @@ public partial class LongFunction : Java.Util.Function.ILongFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); } @@ -148,11 +146,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/LongPredicate.cs b/src/net/JNet/Generated/Java/Util/Function/LongPredicate.cs index e27a9cc23c..fc85ccf7c2 100644 --- a/src/net/JNet/Generated/Java/Util/Function/LongPredicate.cs +++ b/src/net/JNet/Generated/Java/Util/Function/LongPredicate.cs @@ -92,10 +92,10 @@ public partial class LongPredicate : Java.Util.Function.ILongPredicate /// protected virtual void InitializeHandlers() { - AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); OnTest = Test; - AddEventHandler("and", new System.EventHandler>>(AndEventHandler)); OnAnd = And; - AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); OnNegate = Negate; - AddEventHandler("or", new System.EventHandler>>(OrEventHandler)); OnOr = Or; + AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); + AddEventHandler("and", new System.EventHandler>>(AndEventHandler)); + AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); + AddEventHandler("or", new System.EventHandler>>(OrEventHandler)); } @@ -106,11 +106,9 @@ protected virtual void InitializeHandlers() void TestEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTest != null) - { - var executionResult = OnTest.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnTest != null) ? OnTest : Test; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -130,11 +128,9 @@ public virtual bool Test(long arg0) void AndEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAnd != null) - { - var executionResult = OnAnd.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAnd != null) ? OnAnd : And; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -154,11 +150,9 @@ public virtual Java.Util.Function.LongPredicate And(Java.Util.Function.LongPredi void NegateEventHandler(object sender, CLRListenerEventArgs data) { - if (OnNegate != null) - { - var executionResult = OnNegate.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnNegate != null) ? OnNegate : Negate; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -178,11 +172,9 @@ public virtual Java.Util.Function.LongPredicate Negate() void OrEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOr != null) - { - var executionResult = OnOr.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOr != null) ? OnOr : Or; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/LongSupplier.cs b/src/net/JNet/Generated/Java/Util/Function/LongSupplier.cs index 946b2b67d6..00ddca2d9b 100644 --- a/src/net/JNet/Generated/Java/Util/Function/LongSupplier.cs +++ b/src/net/JNet/Generated/Java/Util/Function/LongSupplier.cs @@ -74,7 +74,7 @@ public partial class LongSupplier : Java.Util.Function.ILongSupplier /// protected virtual void InitializeHandlers() { - AddEventHandler("getAsLong", new System.EventHandler>(GetAsLongEventHandler)); OnGetAsLong = GetAsLong; + AddEventHandler("getAsLong", new System.EventHandler>(GetAsLongEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void GetAsLongEventHandler(object sender, CLRListenerEventArgs data) { - if (OnGetAsLong != null) - { - var executionResult = OnGetAsLong.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetAsLong != null) ? OnGetAsLong : GetAsLong; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/LongToDoubleFunction.cs b/src/net/JNet/Generated/Java/Util/Function/LongToDoubleFunction.cs index 60d32db830..8f278d2cf1 100644 --- a/src/net/JNet/Generated/Java/Util/Function/LongToDoubleFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/LongToDoubleFunction.cs @@ -74,7 +74,7 @@ public partial class LongToDoubleFunction : Java.Util.Function.ILongToDoubleFunc /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); OnApplyAsDouble = ApplyAsDouble; + AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void ApplyAsDoubleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsDouble != null) - { - var executionResult = OnApplyAsDouble.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsDouble != null) ? OnApplyAsDouble : ApplyAsDouble; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/LongToIntFunction.cs b/src/net/JNet/Generated/Java/Util/Function/LongToIntFunction.cs index 2d0282b915..0c09258085 100644 --- a/src/net/JNet/Generated/Java/Util/Function/LongToIntFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/LongToIntFunction.cs @@ -74,7 +74,7 @@ public partial class LongToIntFunction : Java.Util.Function.ILongToIntFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); OnApplyAsInt = ApplyAsInt; + AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void ApplyAsIntEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsInt != null) - { - var executionResult = OnApplyAsInt.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsInt != null) ? OnApplyAsInt : ApplyAsInt; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/LongUnaryOperator.cs b/src/net/JNet/Generated/Java/Util/Function/LongUnaryOperator.cs index b5dd76181d..9539ee9a07 100644 --- a/src/net/JNet/Generated/Java/Util/Function/LongUnaryOperator.cs +++ b/src/net/JNet/Generated/Java/Util/Function/LongUnaryOperator.cs @@ -86,9 +86,9 @@ public partial class LongUnaryOperator : Java.Util.Function.ILongUnaryOperator /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); OnApplyAsLong = ApplyAsLong; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; - AddEventHandler("compose", new System.EventHandler>>(ComposeEventHandler)); OnCompose = Compose; + AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); + AddEventHandler("compose", new System.EventHandler>>(ComposeEventHandler)); } @@ -99,11 +99,9 @@ protected virtual void InitializeHandlers() void ApplyAsLongEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsLong != null) - { - var executionResult = OnApplyAsLong.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsLong != null) ? OnApplyAsLong : ApplyAsLong; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -123,11 +121,9 @@ public virtual long ApplyAsLong(long arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -147,11 +143,9 @@ public virtual Java.Util.Function.LongUnaryOperator AndThen(Java.Util.Function.L void ComposeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnCompose != null) - { - var executionResult = OnCompose.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnCompose != null) ? OnCompose : Compose; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/ObjDoubleConsumer.cs b/src/net/JNet/Generated/Java/Util/Function/ObjDoubleConsumer.cs index 878936e83f..b1116e9782 100644 --- a/src/net/JNet/Generated/Java/Util/Function/ObjDoubleConsumer.cs +++ b/src/net/JNet/Generated/Java/Util/Function/ObjDoubleConsumer.cs @@ -50,7 +50,7 @@ public partial class ObjDoubleConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); } @@ -61,7 +61,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -133,7 +134,7 @@ public partial class ObjDoubleConsumer : Java.Util.Function.IObjDoubleConsume /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); } @@ -144,7 +145,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/ObjIntConsumer.cs b/src/net/JNet/Generated/Java/Util/Function/ObjIntConsumer.cs index 0ab81a6475..0d21791e8d 100644 --- a/src/net/JNet/Generated/Java/Util/Function/ObjIntConsumer.cs +++ b/src/net/JNet/Generated/Java/Util/Function/ObjIntConsumer.cs @@ -50,7 +50,7 @@ public partial class ObjIntConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); } @@ -61,7 +61,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -133,7 +134,7 @@ public partial class ObjIntConsumer : Java.Util.Function.IObjIntConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); } @@ -144,7 +145,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/ObjLongConsumer.cs b/src/net/JNet/Generated/Java/Util/Function/ObjLongConsumer.cs index fa275819f4..2c7ef39fa2 100644 --- a/src/net/JNet/Generated/Java/Util/Function/ObjLongConsumer.cs +++ b/src/net/JNet/Generated/Java/Util/Function/ObjLongConsumer.cs @@ -50,7 +50,7 @@ public partial class ObjLongConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); } @@ -61,7 +61,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -133,7 +134,7 @@ public partial class ObjLongConsumer : Java.Util.Function.IObjLongConsumer /// protected virtual void InitializeHandlers() { - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); } @@ -144,7 +145,8 @@ protected virtual void InitializeHandlers() void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) OnAccept.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/Predicate.cs b/src/net/JNet/Generated/Java/Util/Function/Predicate.cs index fc163e75f6..496f0d91ce 100644 --- a/src/net/JNet/Generated/Java/Util/Function/Predicate.cs +++ b/src/net/JNet/Generated/Java/Util/Function/Predicate.cs @@ -50,10 +50,10 @@ public partial class Predicate /// protected virtual void InitializeHandlers() { - AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); OnTest = Test; - AddEventHandler("and", new System.EventHandler>>(AndEventHandler)); OnAnd = And; - AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); OnNegate = Negate; - AddEventHandler("or", new System.EventHandler>>(OrEventHandler)); OnOr = Or; + AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); + AddEventHandler("and", new System.EventHandler>>(AndEventHandler)); + AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); + AddEventHandler("or", new System.EventHandler>>(OrEventHandler)); } @@ -64,11 +64,9 @@ protected virtual void InitializeHandlers() void TestEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTest != null) - { - var executionResult = OnTest.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnTest != null) ? OnTest : Test; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -88,11 +86,9 @@ public virtual bool Test(object arg0) void AndEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAnd != null) - { - var executionResult = OnAnd.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAnd != null) ? OnAnd : And; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -112,11 +108,9 @@ public virtual Java.Util.Function.Predicate And(Java.Util.Function.Predicate arg void NegateEventHandler(object sender, CLRListenerEventArgs data) { - if (OnNegate != null) - { - var executionResult = OnNegate.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnNegate != null) ? OnNegate : Negate; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -136,11 +130,9 @@ public virtual Java.Util.Function.Predicate Negate() void OrEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnOr != null) - { - var executionResult = OnOr.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOr != null) ? OnOr : Or; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -232,10 +224,10 @@ public partial class Predicate : Java.Util.Function.IPredicate /// protected virtual void InitializeHandlers() { - AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); OnTest = Test; - AddEventHandler("and", new System.EventHandler>>>(AndEventHandler)); OnAnd = And; - AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); OnNegate = Negate; - AddEventHandler("or", new System.EventHandler>>>(OrEventHandler)); OnOr = Or; + AddEventHandler("test", new System.EventHandler>>(TestEventHandler)); + AddEventHandler("and", new System.EventHandler>>>(AndEventHandler)); + AddEventHandler("negate", new System.EventHandler>(NegateEventHandler)); + AddEventHandler("or", new System.EventHandler>>>(OrEventHandler)); } @@ -246,11 +238,9 @@ protected virtual void InitializeHandlers() void TestEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTest != null) - { - var executionResult = OnTest.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnTest != null) ? OnTest : Test; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -270,11 +260,9 @@ public virtual bool Test(T arg0) void AndEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnAnd != null) - { - var executionResult = OnAnd.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAnd != null) ? OnAnd : And; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -295,11 +283,9 @@ public virtual Java.Util.Function.Predicate And(Java.Util.F void NegateEventHandler(object sender, CLRListenerEventArgs data) { - if (OnNegate != null) - { - var executionResult = OnNegate.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnNegate != null) ? OnNegate : Negate; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -319,11 +305,9 @@ public virtual Java.Util.Function.Predicate Negate() void OrEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnOr != null) - { - var executionResult = OnOr.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnOr != null) ? OnOr : Or; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/Supplier.cs b/src/net/JNet/Generated/Java/Util/Function/Supplier.cs index 27cc4060a0..a5700acf83 100644 --- a/src/net/JNet/Generated/Java/Util/Function/Supplier.cs +++ b/src/net/JNet/Generated/Java/Util/Function/Supplier.cs @@ -50,7 +50,7 @@ public partial class Supplier /// protected virtual void InitializeHandlers() { - AddEventHandler("get", new System.EventHandler>(GetEventHandler)); OnGet = Get; + AddEventHandler("get", new System.EventHandler>(GetEventHandler)); } @@ -61,11 +61,9 @@ protected virtual void InitializeHandlers() void GetEventHandler(object sender, CLRListenerEventArgs data) { - if (OnGet != null) - { - var executionResult = OnGet.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGet != null) ? OnGet : Get; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -137,7 +135,7 @@ public partial class Supplier : Java.Util.Function.ISupplier /// protected virtual void InitializeHandlers() { - AddEventHandler("get", new System.EventHandler>(GetEventHandler)); OnGet = Get; + AddEventHandler("get", new System.EventHandler>(GetEventHandler)); } @@ -148,11 +146,9 @@ protected virtual void InitializeHandlers() void GetEventHandler(object sender, CLRListenerEventArgs data) { - if (OnGet != null) - { - var executionResult = OnGet.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGet != null) ? OnGet : Get; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/ToDoubleBiFunction.cs b/src/net/JNet/Generated/Java/Util/Function/ToDoubleBiFunction.cs index ec13d56f5c..e5246e7af3 100644 --- a/src/net/JNet/Generated/Java/Util/Function/ToDoubleBiFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/ToDoubleBiFunction.cs @@ -50,7 +50,7 @@ public partial class ToDoubleBiFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); OnApplyAsDouble = ApplyAsDouble; + AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); } @@ -61,11 +61,9 @@ protected virtual void InitializeHandlers() void ApplyAsDoubleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsDouble != null) - { - var executionResult = OnApplyAsDouble.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsDouble != null) ? OnApplyAsDouble : ApplyAsDouble; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -139,7 +137,7 @@ public partial class ToDoubleBiFunction : Java.Util.Function.IToDoubleBiFu /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); OnApplyAsDouble = ApplyAsDouble; + AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); } @@ -150,11 +148,9 @@ protected virtual void InitializeHandlers() void ApplyAsDoubleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsDouble != null) - { - var executionResult = OnApplyAsDouble.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsDouble != null) ? OnApplyAsDouble : ApplyAsDouble; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/ToDoubleFunction.cs b/src/net/JNet/Generated/Java/Util/Function/ToDoubleFunction.cs index 90ca69e4ce..babca570e6 100644 --- a/src/net/JNet/Generated/Java/Util/Function/ToDoubleFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/ToDoubleFunction.cs @@ -50,7 +50,7 @@ public partial class ToDoubleFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); OnApplyAsDouble = ApplyAsDouble; + AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); } @@ -61,11 +61,9 @@ protected virtual void InitializeHandlers() void ApplyAsDoubleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsDouble != null) - { - var executionResult = OnApplyAsDouble.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsDouble != null) ? OnApplyAsDouble : ApplyAsDouble; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -137,7 +135,7 @@ public partial class ToDoubleFunction : Java.Util.Function.IToDoubleFunction< /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); OnApplyAsDouble = ApplyAsDouble; + AddEventHandler("applyAsDouble", new System.EventHandler>>(ApplyAsDoubleEventHandler)); } @@ -148,11 +146,9 @@ protected virtual void InitializeHandlers() void ApplyAsDoubleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsDouble != null) - { - var executionResult = OnApplyAsDouble.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsDouble != null) ? OnApplyAsDouble : ApplyAsDouble; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/ToIntBiFunction.cs b/src/net/JNet/Generated/Java/Util/Function/ToIntBiFunction.cs index 1bea237988..7952ba5b73 100644 --- a/src/net/JNet/Generated/Java/Util/Function/ToIntBiFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/ToIntBiFunction.cs @@ -50,7 +50,7 @@ public partial class ToIntBiFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); OnApplyAsInt = ApplyAsInt; + AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); } @@ -61,11 +61,9 @@ protected virtual void InitializeHandlers() void ApplyAsIntEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsInt != null) - { - var executionResult = OnApplyAsInt.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsInt != null) ? OnApplyAsInt : ApplyAsInt; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -139,7 +137,7 @@ public partial class ToIntBiFunction : Java.Util.Function.IToIntBiFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); OnApplyAsInt = ApplyAsInt; + AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); } @@ -150,11 +148,9 @@ protected virtual void InitializeHandlers() void ApplyAsIntEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsInt != null) - { - var executionResult = OnApplyAsInt.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsInt != null) ? OnApplyAsInt : ApplyAsInt; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/ToIntFunction.cs b/src/net/JNet/Generated/Java/Util/Function/ToIntFunction.cs index c3343ccb98..e360f1f371 100644 --- a/src/net/JNet/Generated/Java/Util/Function/ToIntFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/ToIntFunction.cs @@ -50,7 +50,7 @@ public partial class ToIntFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); OnApplyAsInt = ApplyAsInt; + AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); } @@ -61,11 +61,9 @@ protected virtual void InitializeHandlers() void ApplyAsIntEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsInt != null) - { - var executionResult = OnApplyAsInt.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsInt != null) ? OnApplyAsInt : ApplyAsInt; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -137,7 +135,7 @@ public partial class ToIntFunction : Java.Util.Function.IToIntFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); OnApplyAsInt = ApplyAsInt; + AddEventHandler("applyAsInt", new System.EventHandler>>(ApplyAsIntEventHandler)); } @@ -148,11 +146,9 @@ protected virtual void InitializeHandlers() void ApplyAsIntEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsInt != null) - { - var executionResult = OnApplyAsInt.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsInt != null) ? OnApplyAsInt : ApplyAsInt; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/ToLongBiFunction.cs b/src/net/JNet/Generated/Java/Util/Function/ToLongBiFunction.cs index be8feb0999..17e9796f18 100644 --- a/src/net/JNet/Generated/Java/Util/Function/ToLongBiFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/ToLongBiFunction.cs @@ -50,7 +50,7 @@ public partial class ToLongBiFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); OnApplyAsLong = ApplyAsLong; + AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); } @@ -61,11 +61,9 @@ protected virtual void InitializeHandlers() void ApplyAsLongEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsLong != null) - { - var executionResult = OnApplyAsLong.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsLong != null) ? OnApplyAsLong : ApplyAsLong; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// @@ -139,7 +137,7 @@ public partial class ToLongBiFunction : Java.Util.Function.IToLongBiFuncti /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); OnApplyAsLong = ApplyAsLong; + AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); } @@ -150,11 +148,9 @@ protected virtual void InitializeHandlers() void ApplyAsLongEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsLong != null) - { - var executionResult = OnApplyAsLong.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsLong != null) ? OnApplyAsLong : ApplyAsLong; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/ToLongFunction.cs b/src/net/JNet/Generated/Java/Util/Function/ToLongFunction.cs index ec7e80748d..5f26a7b0d7 100644 --- a/src/net/JNet/Generated/Java/Util/Function/ToLongFunction.cs +++ b/src/net/JNet/Generated/Java/Util/Function/ToLongFunction.cs @@ -50,7 +50,7 @@ public partial class ToLongFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); OnApplyAsLong = ApplyAsLong; + AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); } @@ -61,11 +61,9 @@ protected virtual void InitializeHandlers() void ApplyAsLongEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsLong != null) - { - var executionResult = OnApplyAsLong.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsLong != null) ? OnApplyAsLong : ApplyAsLong; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -137,7 +135,7 @@ public partial class ToLongFunction : Java.Util.Function.IToLongFunction /// protected virtual void InitializeHandlers() { - AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); OnApplyAsLong = ApplyAsLong; + AddEventHandler("applyAsLong", new System.EventHandler>>(ApplyAsLongEventHandler)); } @@ -148,11 +146,9 @@ protected virtual void InitializeHandlers() void ApplyAsLongEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApplyAsLong != null) - { - var executionResult = OnApplyAsLong.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApplyAsLong != null) ? OnApplyAsLong : ApplyAsLong; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Function/UnaryOperator.cs b/src/net/JNet/Generated/Java/Util/Function/UnaryOperator.cs index 12f57004cd..e888f96655 100644 --- a/src/net/JNet/Generated/Java/Util/Function/UnaryOperator.cs +++ b/src/net/JNet/Generated/Java/Util/Function/UnaryOperator.cs @@ -50,9 +50,9 @@ public partial class UnaryOperator /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; - AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); OnAndThen = AndThen; - AddEventHandler("compose", new System.EventHandler>>(ComposeEventHandler)); OnCompose = Compose; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>(AndThenEventHandler)); + AddEventHandler("compose", new System.EventHandler>>(ComposeEventHandler)); } @@ -63,11 +63,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -87,11 +85,9 @@ public virtual object Apply(object arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -111,11 +107,9 @@ public virtual Java.Util.Function.Function AndThen(Java.Util.Function.Function a void ComposeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnCompose != null) - { - var executionResult = OnCompose.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnCompose != null) ? OnCompose : Compose; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -208,9 +202,9 @@ public partial class UnaryOperator : Java.Util.Function.IUnaryOperator /// protected virtual void InitializeHandlers() { - AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); OnApply = Apply; - AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); OnAndThen = AndThen; - AddEventHandler("compose", new System.EventHandler>>>(ComposeEventHandler)); OnCompose = Compose; + AddEventHandler("apply", new System.EventHandler>>(ApplyEventHandler)); + AddEventHandler("andThen", new System.EventHandler>>>(AndThenEventHandler)); + AddEventHandler("compose", new System.EventHandler>>>(ComposeEventHandler)); } @@ -221,11 +215,9 @@ protected virtual void InitializeHandlers() void ApplyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnApply != null) - { - var executionResult = OnApply.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnApply != null) ? OnApply : Apply; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -246,11 +238,9 @@ public virtual R Apply(T arg0) void AndThenEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnAndThen != null) - { - var executionResult = OnAndThen.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAndThen != null) ? OnAndThen : AndThen; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -274,11 +264,9 @@ public virtual Java.Util.Function.Function AndThenEventHandler(object sender, CLRListenerEventArgs>> data) { - if (OnCompose != null) - { - var executionResult = OnCompose.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnCompose != null) ? OnCompose : Compose; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Java/Util/Prefs/NodeChangeListener.cs b/src/net/JNet/Generated/Java/Util/Prefs/NodeChangeListener.cs index 83b66aa357..9ebd37f964 100644 --- a/src/net/JNet/Generated/Java/Util/Prefs/NodeChangeListener.cs +++ b/src/net/JNet/Generated/Java/Util/Prefs/NodeChangeListener.cs @@ -78,8 +78,8 @@ public partial class NodeChangeListener : Java.Util.Prefs.INodeChangeListener /// protected virtual void InitializeHandlers() { - AddEventHandler("childAdded", new System.EventHandler>>(ChildAddedEventHandler)); OnChildAdded = ChildAdded; - AddEventHandler("childRemoved", new System.EventHandler>>(ChildRemovedEventHandler)); OnChildRemoved = ChildRemoved; + AddEventHandler("childAdded", new System.EventHandler>>(ChildAddedEventHandler)); + AddEventHandler("childRemoved", new System.EventHandler>>(ChildRemovedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void ChildAddedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnChildAdded != null) OnChildAdded.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnChildAdded != null) ? OnChildAdded : ChildAdded; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void ChildAdded(Java.Util.Prefs.NodeChangeEvent arg0) void ChildRemovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnChildRemoved != null) OnChildRemoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnChildRemoved != null) ? OnChildRemoved : ChildRemoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Java/Util/Prefs/PreferenceChangeListener.cs b/src/net/JNet/Generated/Java/Util/Prefs/PreferenceChangeListener.cs index bcb1a8bbdc..aa6c66b91e 100644 --- a/src/net/JNet/Generated/Java/Util/Prefs/PreferenceChangeListener.cs +++ b/src/net/JNet/Generated/Java/Util/Prefs/PreferenceChangeListener.cs @@ -73,7 +73,7 @@ public partial class PreferenceChangeListener : Java.Util.Prefs.IPreferenceChang /// protected virtual void InitializeHandlers() { - AddEventHandler("preferenceChange", new System.EventHandler>>(PreferenceChangeEventHandler)); OnPreferenceChange = PreferenceChange; + AddEventHandler("preferenceChange", new System.EventHandler>>(PreferenceChangeEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void PreferenceChangeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPreferenceChange != null) OnPreferenceChange.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPreferenceChange != null) ? OnPreferenceChange : PreferenceChange; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadProgressListener.cs b/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadProgressListener.cs index dd5924dc4e..db173cfe6d 100644 --- a/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadProgressListener.cs +++ b/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadProgressListener.cs @@ -119,15 +119,15 @@ public partial class IIOReadProgressListener : Javax.Imageio.Event.IIIOReadProgr /// protected virtual void InitializeHandlers() { - AddEventHandler("imageComplete", new System.EventHandler>>(ImageCompleteEventHandler)); OnImageComplete = ImageComplete; - AddEventHandler("imageProgress", new System.EventHandler>>(ImageProgressEventHandler)); OnImageProgress = ImageProgress; - AddEventHandler("imageStarted", new System.EventHandler>>(ImageStartedEventHandler)); OnImageStarted = ImageStarted; - AddEventHandler("readAborted", new System.EventHandler>>(ReadAbortedEventHandler)); OnReadAborted = ReadAborted; - AddEventHandler("sequenceComplete", new System.EventHandler>>(SequenceCompleteEventHandler)); OnSequenceComplete = SequenceComplete; - AddEventHandler("sequenceStarted", new System.EventHandler>>(SequenceStartedEventHandler)); OnSequenceStarted = SequenceStarted; - AddEventHandler("thumbnailComplete", new System.EventHandler>>(ThumbnailCompleteEventHandler)); OnThumbnailComplete = ThumbnailComplete; - AddEventHandler("thumbnailProgress", new System.EventHandler>>(ThumbnailProgressEventHandler)); OnThumbnailProgress = ThumbnailProgress; - AddEventHandler("thumbnailStarted", new System.EventHandler>>(ThumbnailStartedEventHandler)); OnThumbnailStarted = ThumbnailStarted; + AddEventHandler("imageComplete", new System.EventHandler>>(ImageCompleteEventHandler)); + AddEventHandler("imageProgress", new System.EventHandler>>(ImageProgressEventHandler)); + AddEventHandler("imageStarted", new System.EventHandler>>(ImageStartedEventHandler)); + AddEventHandler("readAborted", new System.EventHandler>>(ReadAbortedEventHandler)); + AddEventHandler("sequenceComplete", new System.EventHandler>>(SequenceCompleteEventHandler)); + AddEventHandler("sequenceStarted", new System.EventHandler>>(SequenceStartedEventHandler)); + AddEventHandler("thumbnailComplete", new System.EventHandler>>(ThumbnailCompleteEventHandler)); + AddEventHandler("thumbnailProgress", new System.EventHandler>>(ThumbnailProgressEventHandler)); + AddEventHandler("thumbnailStarted", new System.EventHandler>>(ThumbnailStartedEventHandler)); } @@ -138,7 +138,8 @@ protected virtual void InitializeHandlers() void ImageCompleteEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnImageComplete != null) OnImageComplete.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnImageComplete != null) ? OnImageComplete : ImageComplete; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -157,7 +158,8 @@ public virtual void ImageComplete(Javax.Imageio.ImageReader arg0) void ImageProgressEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnImageProgress != null) OnImageProgress.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnImageProgress != null) ? OnImageProgress : ImageProgress; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -177,7 +179,8 @@ public virtual void ImageProgress(Javax.Imageio.ImageReader arg0, float arg1) void ImageStartedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnImageStarted != null) OnImageStarted.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnImageStarted != null) ? OnImageStarted : ImageStarted; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -197,7 +200,8 @@ public virtual void ImageStarted(Javax.Imageio.ImageReader arg0, int arg1) void ReadAbortedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnReadAborted != null) OnReadAborted.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnReadAborted != null) ? OnReadAborted : ReadAborted; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -216,7 +220,8 @@ public virtual void ReadAborted(Javax.Imageio.ImageReader arg0) void SequenceCompleteEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSequenceComplete != null) OnSequenceComplete.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSequenceComplete != null) ? OnSequenceComplete : SequenceComplete; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -235,7 +240,8 @@ public virtual void SequenceComplete(Javax.Imageio.ImageReader arg0) void SequenceStartedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSequenceStarted != null) OnSequenceStarted.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnSequenceStarted != null) ? OnSequenceStarted : SequenceStarted; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -255,7 +261,8 @@ public virtual void SequenceStarted(Javax.Imageio.ImageReader arg0, int arg1) void ThumbnailCompleteEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnThumbnailComplete != null) OnThumbnailComplete.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnThumbnailComplete != null) ? OnThumbnailComplete : ThumbnailComplete; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -274,7 +281,8 @@ public virtual void ThumbnailComplete(Javax.Imageio.ImageReader arg0) void ThumbnailProgressEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnThumbnailProgress != null) OnThumbnailProgress.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnThumbnailProgress != null) ? OnThumbnailProgress : ThumbnailProgress; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -294,7 +302,8 @@ public virtual void ThumbnailProgress(Javax.Imageio.ImageReader arg0, float arg1 void ThumbnailStartedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnThumbnailStarted != null) OnThumbnailStarted.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + var methodToExecute = (OnThumbnailStarted != null) ? OnThumbnailStarted : ThumbnailStarted; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); } /// diff --git a/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadUpdateListener.cs b/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadUpdateListener.cs index 1e23851435..7c70533a15 100644 --- a/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadUpdateListener.cs +++ b/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadUpdateListener.cs @@ -134,12 +134,12 @@ public partial class IIOReadUpdateListener : Javax.Imageio.Event.IIIOReadUpdateL /// protected virtual void InitializeHandlers() { - AddEventHandler("imageUpdate", new System.EventHandler>>(ImageUpdateEventHandler)); OnImageUpdate = ImageUpdate; - AddEventHandler("passComplete", new System.EventHandler>>(PassCompleteEventHandler)); OnPassComplete = PassComplete; - AddEventHandler("passStarted", new System.EventHandler>>(PassStartedEventHandler)); OnPassStarted = PassStarted; - AddEventHandler("thumbnailPassComplete", new System.EventHandler>>(ThumbnailPassCompleteEventHandler)); OnThumbnailPassComplete = ThumbnailPassComplete; - AddEventHandler("thumbnailPassStarted", new System.EventHandler>>(ThumbnailPassStartedEventHandler)); OnThumbnailPassStarted = ThumbnailPassStarted; - AddEventHandler("thumbnailUpdate", new System.EventHandler>>(ThumbnailUpdateEventHandler)); OnThumbnailUpdate = ThumbnailUpdate; + AddEventHandler("imageUpdate", new System.EventHandler>>(ImageUpdateEventHandler)); + AddEventHandler("passComplete", new System.EventHandler>>(PassCompleteEventHandler)); + AddEventHandler("passStarted", new System.EventHandler>>(PassStartedEventHandler)); + AddEventHandler("thumbnailPassComplete", new System.EventHandler>>(ThumbnailPassCompleteEventHandler)); + AddEventHandler("thumbnailPassStarted", new System.EventHandler>>(ThumbnailPassStartedEventHandler)); + AddEventHandler("thumbnailUpdate", new System.EventHandler>>(ThumbnailUpdateEventHandler)); } @@ -150,7 +150,8 @@ protected virtual void InitializeHandlers() void ImageUpdateEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnImageUpdate != null) OnImageUpdate.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1), data.EventData.GetAt(2), data.EventData.GetAt(3), data.EventData.GetAt(4), data.EventData.GetAt(5), data.EventData.GetAt(6), data.EventData.GetAt(7)); + var methodToExecute = (OnImageUpdate != null) ? OnImageUpdate : ImageUpdate; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1), data.EventData.GetAt(2), data.EventData.GetAt(3), data.EventData.GetAt(4), data.EventData.GetAt(5), data.EventData.GetAt(6), data.EventData.GetAt(7)); } /// @@ -177,7 +178,8 @@ public virtual void ImageUpdate(Javax.Imageio.ImageReader arg0, Java.Awt.ImageNs void PassCompleteEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPassComplete != null) OnPassComplete.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnPassComplete != null) ? OnPassComplete : PassComplete; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -197,7 +199,8 @@ public virtual void PassComplete(Javax.Imageio.ImageReader arg0, Java.Awt.ImageN void PassStartedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPassStarted != null) OnPassStarted.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1), data.EventData.GetAt(2), data.EventData.GetAt(3), data.EventData.GetAt(4), data.EventData.GetAt(5), data.EventData.GetAt(6), data.EventData.GetAt(7), data.EventData.GetAt(8)); + var methodToExecute = (OnPassStarted != null) ? OnPassStarted : PassStarted; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1), data.EventData.GetAt(2), data.EventData.GetAt(3), data.EventData.GetAt(4), data.EventData.GetAt(5), data.EventData.GetAt(6), data.EventData.GetAt(7), data.EventData.GetAt(8)); } /// @@ -225,7 +228,8 @@ public virtual void PassStarted(Javax.Imageio.ImageReader arg0, Java.Awt.ImageNs void ThumbnailPassCompleteEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnThumbnailPassComplete != null) OnThumbnailPassComplete.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnThumbnailPassComplete != null) ? OnThumbnailPassComplete : ThumbnailPassComplete; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -245,7 +249,8 @@ public virtual void ThumbnailPassComplete(Javax.Imageio.ImageReader arg0, Java.A void ThumbnailPassStartedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnThumbnailPassStarted != null) OnThumbnailPassStarted.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1), data.EventData.GetAt(2), data.EventData.GetAt(3), data.EventData.GetAt(4), data.EventData.GetAt(5), data.EventData.GetAt(6), data.EventData.GetAt(7), data.EventData.GetAt(8)); + var methodToExecute = (OnThumbnailPassStarted != null) ? OnThumbnailPassStarted : ThumbnailPassStarted; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1), data.EventData.GetAt(2), data.EventData.GetAt(3), data.EventData.GetAt(4), data.EventData.GetAt(5), data.EventData.GetAt(6), data.EventData.GetAt(7), data.EventData.GetAt(8)); } /// @@ -273,7 +278,8 @@ public virtual void ThumbnailPassStarted(Javax.Imageio.ImageReader arg0, Java.Aw void ThumbnailUpdateEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnThumbnailUpdate != null) OnThumbnailUpdate.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1), data.EventData.GetAt(2), data.EventData.GetAt(3), data.EventData.GetAt(4), data.EventData.GetAt(5), data.EventData.GetAt(6), data.EventData.GetAt(7)); + var methodToExecute = (OnThumbnailUpdate != null) ? OnThumbnailUpdate : ThumbnailUpdate; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1), data.EventData.GetAt(2), data.EventData.GetAt(3), data.EventData.GetAt(4), data.EventData.GetAt(5), data.EventData.GetAt(6), data.EventData.GetAt(7)); } /// diff --git a/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadWarningListener.cs b/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadWarningListener.cs index 2ed7899aee..28c98e1c05 100644 --- a/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadWarningListener.cs +++ b/src/net/JNet/Generated/Javax/Imageio/Event/IIOReadWarningListener.cs @@ -74,7 +74,7 @@ public partial class IIOReadWarningListener : Javax.Imageio.Event.IIIOReadWarnin /// protected virtual void InitializeHandlers() { - AddEventHandler("warningOccurred", new System.EventHandler>>(WarningOccurredEventHandler)); OnWarningOccurred = WarningOccurred; + AddEventHandler("warningOccurred", new System.EventHandler>>(WarningOccurredEventHandler)); } @@ -85,7 +85,8 @@ protected virtual void InitializeHandlers() void WarningOccurredEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWarningOccurred != null) OnWarningOccurred.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnWarningOccurred != null) ? OnWarningOccurred : WarningOccurred; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// diff --git a/src/net/JNet/Generated/Javax/Imageio/Event/IIOWriteProgressListener.cs b/src/net/JNet/Generated/Javax/Imageio/Event/IIOWriteProgressListener.cs index 7a5ab6627e..c7d8d6c4ab 100644 --- a/src/net/JNet/Generated/Javax/Imageio/Event/IIOWriteProgressListener.cs +++ b/src/net/JNet/Generated/Javax/Imageio/Event/IIOWriteProgressListener.cs @@ -108,13 +108,13 @@ public partial class IIOWriteProgressListener : Javax.Imageio.Event.IIIOWritePro /// protected virtual void InitializeHandlers() { - AddEventHandler("imageComplete", new System.EventHandler>>(ImageCompleteEventHandler)); OnImageComplete = ImageComplete; - AddEventHandler("imageProgress", new System.EventHandler>>(ImageProgressEventHandler)); OnImageProgress = ImageProgress; - AddEventHandler("imageStarted", new System.EventHandler>>(ImageStartedEventHandler)); OnImageStarted = ImageStarted; - AddEventHandler("thumbnailComplete", new System.EventHandler>>(ThumbnailCompleteEventHandler)); OnThumbnailComplete = ThumbnailComplete; - AddEventHandler("thumbnailProgress", new System.EventHandler>>(ThumbnailProgressEventHandler)); OnThumbnailProgress = ThumbnailProgress; - AddEventHandler("thumbnailStarted", new System.EventHandler>>(ThumbnailStartedEventHandler)); OnThumbnailStarted = ThumbnailStarted; - AddEventHandler("writeAborted", new System.EventHandler>>(WriteAbortedEventHandler)); OnWriteAborted = WriteAborted; + AddEventHandler("imageComplete", new System.EventHandler>>(ImageCompleteEventHandler)); + AddEventHandler("imageProgress", new System.EventHandler>>(ImageProgressEventHandler)); + AddEventHandler("imageStarted", new System.EventHandler>>(ImageStartedEventHandler)); + AddEventHandler("thumbnailComplete", new System.EventHandler>>(ThumbnailCompleteEventHandler)); + AddEventHandler("thumbnailProgress", new System.EventHandler>>(ThumbnailProgressEventHandler)); + AddEventHandler("thumbnailStarted", new System.EventHandler>>(ThumbnailStartedEventHandler)); + AddEventHandler("writeAborted", new System.EventHandler>>(WriteAbortedEventHandler)); } @@ -125,7 +125,8 @@ protected virtual void InitializeHandlers() void ImageCompleteEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnImageComplete != null) OnImageComplete.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnImageComplete != null) ? OnImageComplete : ImageComplete; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -144,7 +145,8 @@ public virtual void ImageComplete(Javax.Imageio.ImageWriter arg0) void ImageProgressEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnImageProgress != null) OnImageProgress.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnImageProgress != null) ? OnImageProgress : ImageProgress; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -164,7 +166,8 @@ public virtual void ImageProgress(Javax.Imageio.ImageWriter arg0, float arg1) void ImageStartedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnImageStarted != null) OnImageStarted.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnImageStarted != null) ? OnImageStarted : ImageStarted; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -184,7 +187,8 @@ public virtual void ImageStarted(Javax.Imageio.ImageWriter arg0, int arg1) void ThumbnailCompleteEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnThumbnailComplete != null) OnThumbnailComplete.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnThumbnailComplete != null) ? OnThumbnailComplete : ThumbnailComplete; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -203,7 +207,8 @@ public virtual void ThumbnailComplete(Javax.Imageio.ImageWriter arg0) void ThumbnailProgressEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnThumbnailProgress != null) OnThumbnailProgress.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnThumbnailProgress != null) ? OnThumbnailProgress : ThumbnailProgress; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -223,7 +228,8 @@ public virtual void ThumbnailProgress(Javax.Imageio.ImageWriter arg0, float arg1 void ThumbnailStartedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnThumbnailStarted != null) OnThumbnailStarted.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + var methodToExecute = (OnThumbnailStarted != null) ? OnThumbnailStarted : ThumbnailStarted; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); } /// @@ -244,7 +250,8 @@ public virtual void ThumbnailStarted(Javax.Imageio.ImageWriter arg0, int arg1, i void WriteAbortedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWriteAborted != null) OnWriteAborted.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnWriteAborted != null) ? OnWriteAborted : WriteAborted; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Imageio/Event/IIOWriteWarningListener.cs b/src/net/JNet/Generated/Javax/Imageio/Event/IIOWriteWarningListener.cs index 937f14830f..d2eea4ea9f 100644 --- a/src/net/JNet/Generated/Javax/Imageio/Event/IIOWriteWarningListener.cs +++ b/src/net/JNet/Generated/Javax/Imageio/Event/IIOWriteWarningListener.cs @@ -75,7 +75,7 @@ public partial class IIOWriteWarningListener : Javax.Imageio.Event.IIIOWriteWarn /// protected virtual void InitializeHandlers() { - AddEventHandler("warningOccurred", new System.EventHandler>>(WarningOccurredEventHandler)); OnWarningOccurred = WarningOccurred; + AddEventHandler("warningOccurred", new System.EventHandler>>(WarningOccurredEventHandler)); } @@ -86,7 +86,8 @@ protected virtual void InitializeHandlers() void WarningOccurredEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnWarningOccurred != null) OnWarningOccurred.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + var methodToExecute = (OnWarningOccurred != null) ? OnWarningOccurred : WarningOccurred; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); } /// diff --git a/src/net/JNet/Generated/Javax/Management/NotificationFilter.cs b/src/net/JNet/Generated/Javax/Management/NotificationFilter.cs index 90862d3121..b175e7a0a3 100644 --- a/src/net/JNet/Generated/Javax/Management/NotificationFilter.cs +++ b/src/net/JNet/Generated/Javax/Management/NotificationFilter.cs @@ -74,7 +74,7 @@ public partial class NotificationFilter : Javax.Management.INotificationFilter /// protected virtual void InitializeHandlers() { - AddEventHandler("isNotificationEnabled", new System.EventHandler>>(IsNotificationEnabledEventHandler)); OnIsNotificationEnabled = IsNotificationEnabled; + AddEventHandler("isNotificationEnabled", new System.EventHandler>>(IsNotificationEnabledEventHandler)); } @@ -85,11 +85,9 @@ protected virtual void InitializeHandlers() void IsNotificationEnabledEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnIsNotificationEnabled != null) - { - var executionResult = OnIsNotificationEnabled.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnIsNotificationEnabled != null) ? OnIsNotificationEnabled : IsNotificationEnabled; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Javax/Management/NotificationListener.cs b/src/net/JNet/Generated/Javax/Management/NotificationListener.cs index 08d9e10b2f..ce18656828 100644 --- a/src/net/JNet/Generated/Javax/Management/NotificationListener.cs +++ b/src/net/JNet/Generated/Javax/Management/NotificationListener.cs @@ -74,7 +74,7 @@ public partial class NotificationListener : Javax.Management.INotificationListen /// protected virtual void InitializeHandlers() { - AddEventHandler("handleNotification", new System.EventHandler>>(HandleNotificationEventHandler)); OnHandleNotification = HandleNotification; + AddEventHandler("handleNotification", new System.EventHandler>>(HandleNotificationEventHandler)); } @@ -85,7 +85,8 @@ protected virtual void InitializeHandlers() void HandleNotificationEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnHandleNotification != null) OnHandleNotification.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnHandleNotification != null) ? OnHandleNotification : HandleNotification; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// diff --git a/src/net/JNet/Generated/Javax/Naming/Event/NamespaceChangeListener.cs b/src/net/JNet/Generated/Javax/Naming/Event/NamespaceChangeListener.cs index 40d6278acd..480a18949f 100644 --- a/src/net/JNet/Generated/Javax/Naming/Event/NamespaceChangeListener.cs +++ b/src/net/JNet/Generated/Javax/Naming/Event/NamespaceChangeListener.cs @@ -88,10 +88,10 @@ public partial class NamespaceChangeListener : Javax.Naming.Event.INamespaceChan /// protected virtual void InitializeHandlers() { - AddEventHandler("objectAdded", new System.EventHandler>>(ObjectAddedEventHandler)); OnObjectAdded = ObjectAdded; - AddEventHandler("objectRemoved", new System.EventHandler>>(ObjectRemovedEventHandler)); OnObjectRemoved = ObjectRemoved; - AddEventHandler("objectRenamed", new System.EventHandler>>(ObjectRenamedEventHandler)); OnObjectRenamed = ObjectRenamed; - AddEventHandler("namingExceptionThrown", new System.EventHandler>>(NamingExceptionThrownEventHandler)); OnNamingExceptionThrown = NamingExceptionThrown; + AddEventHandler("objectAdded", new System.EventHandler>>(ObjectAddedEventHandler)); + AddEventHandler("objectRemoved", new System.EventHandler>>(ObjectRemovedEventHandler)); + AddEventHandler("objectRenamed", new System.EventHandler>>(ObjectRenamedEventHandler)); + AddEventHandler("namingExceptionThrown", new System.EventHandler>>(NamingExceptionThrownEventHandler)); } @@ -102,7 +102,8 @@ protected virtual void InitializeHandlers() void ObjectAddedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnObjectAdded != null) OnObjectAdded.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnObjectAdded != null) ? OnObjectAdded : ObjectAdded; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -121,7 +122,8 @@ public virtual void ObjectAdded(Javax.Naming.Event.NamingEvent arg0) void ObjectRemovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnObjectRemoved != null) OnObjectRemoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnObjectRemoved != null) ? OnObjectRemoved : ObjectRemoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -140,7 +142,8 @@ public virtual void ObjectRemoved(Javax.Naming.Event.NamingEvent arg0) void ObjectRenamedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnObjectRenamed != null) OnObjectRenamed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnObjectRenamed != null) ? OnObjectRenamed : ObjectRenamed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -159,7 +162,8 @@ public virtual void ObjectRenamed(Javax.Naming.Event.NamingEvent arg0) void NamingExceptionThrownEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnNamingExceptionThrown != null) OnNamingExceptionThrown.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnNamingExceptionThrown != null) ? OnNamingExceptionThrown : NamingExceptionThrown; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Naming/Event/NamingListener.cs b/src/net/JNet/Generated/Javax/Naming/Event/NamingListener.cs index bf0e07ee9b..f9a87b0aca 100644 --- a/src/net/JNet/Generated/Javax/Naming/Event/NamingListener.cs +++ b/src/net/JNet/Generated/Javax/Naming/Event/NamingListener.cs @@ -73,7 +73,7 @@ public partial class NamingListener : Javax.Naming.Event.INamingListener /// protected virtual void InitializeHandlers() { - AddEventHandler("namingExceptionThrown", new System.EventHandler>>(NamingExceptionThrownEventHandler)); OnNamingExceptionThrown = NamingExceptionThrown; + AddEventHandler("namingExceptionThrown", new System.EventHandler>>(NamingExceptionThrownEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void NamingExceptionThrownEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnNamingExceptionThrown != null) OnNamingExceptionThrown.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnNamingExceptionThrown != null) ? OnNamingExceptionThrown : NamingExceptionThrown; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Naming/Event/ObjectChangeListener.cs b/src/net/JNet/Generated/Javax/Naming/Event/ObjectChangeListener.cs index ec1982ac19..83fdfb88aa 100644 --- a/src/net/JNet/Generated/Javax/Naming/Event/ObjectChangeListener.cs +++ b/src/net/JNet/Generated/Javax/Naming/Event/ObjectChangeListener.cs @@ -78,8 +78,8 @@ public partial class ObjectChangeListener : Javax.Naming.Event.IObjectChangeList /// protected virtual void InitializeHandlers() { - AddEventHandler("namingExceptionThrown", new System.EventHandler>>(NamingExceptionThrownEventHandler)); OnNamingExceptionThrown = NamingExceptionThrown; - AddEventHandler("objectChanged", new System.EventHandler>>(ObjectChangedEventHandler)); OnObjectChanged = ObjectChanged; + AddEventHandler("namingExceptionThrown", new System.EventHandler>>(NamingExceptionThrownEventHandler)); + AddEventHandler("objectChanged", new System.EventHandler>>(ObjectChangedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void NamingExceptionThrownEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnNamingExceptionThrown != null) OnNamingExceptionThrown.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnNamingExceptionThrown != null) ? OnNamingExceptionThrown : NamingExceptionThrown; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void NamingExceptionThrown(Javax.Naming.Event.NamingExceptionEven void ObjectChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnObjectChanged != null) OnObjectChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnObjectChanged != null) ? OnObjectChanged : ObjectChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Naming/Ldap/UnsolicitedNotificationListener.cs b/src/net/JNet/Generated/Javax/Naming/Ldap/UnsolicitedNotificationListener.cs index 3d4898f8e8..b2e4d99533 100644 --- a/src/net/JNet/Generated/Javax/Naming/Ldap/UnsolicitedNotificationListener.cs +++ b/src/net/JNet/Generated/Javax/Naming/Ldap/UnsolicitedNotificationListener.cs @@ -78,8 +78,8 @@ public partial class UnsolicitedNotificationListener : Javax.Naming.Ldap.IUnsoli /// protected virtual void InitializeHandlers() { - AddEventHandler("namingExceptionThrown", new System.EventHandler>>(NamingExceptionThrownEventHandler)); OnNamingExceptionThrown = NamingExceptionThrown; - AddEventHandler("notificationReceived", new System.EventHandler>>(NotificationReceivedEventHandler)); OnNotificationReceived = NotificationReceived; + AddEventHandler("namingExceptionThrown", new System.EventHandler>>(NamingExceptionThrownEventHandler)); + AddEventHandler("notificationReceived", new System.EventHandler>>(NotificationReceivedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void NamingExceptionThrownEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnNamingExceptionThrown != null) OnNamingExceptionThrown.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnNamingExceptionThrown != null) ? OnNamingExceptionThrown : NamingExceptionThrown; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void NamingExceptionThrown(Javax.Naming.Event.NamingExceptionEven void NotificationReceivedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnNotificationReceived != null) OnNotificationReceived.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnNotificationReceived != null) ? OnNotificationReceived : NotificationReceived; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Net/Ssl/HandshakeCompletedListener.cs b/src/net/JNet/Generated/Javax/Net/Ssl/HandshakeCompletedListener.cs index d9464a02fd..507020bf08 100644 --- a/src/net/JNet/Generated/Javax/Net/Ssl/HandshakeCompletedListener.cs +++ b/src/net/JNet/Generated/Javax/Net/Ssl/HandshakeCompletedListener.cs @@ -73,7 +73,7 @@ public partial class HandshakeCompletedListener : Javax.Net.Ssl.IHandshakeComple /// protected virtual void InitializeHandlers() { - AddEventHandler("handshakeCompleted", new System.EventHandler>>(HandshakeCompletedEventHandler)); OnHandshakeCompleted = HandshakeCompleted; + AddEventHandler("handshakeCompleted", new System.EventHandler>>(HandshakeCompletedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void HandshakeCompletedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnHandshakeCompleted != null) OnHandshakeCompleted.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnHandshakeCompleted != null) ? OnHandshakeCompleted : HandshakeCompleted; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Net/Ssl/SSLSessionBindingListener.cs b/src/net/JNet/Generated/Javax/Net/Ssl/SSLSessionBindingListener.cs index ccd5106808..3e7133d5e5 100644 --- a/src/net/JNet/Generated/Javax/Net/Ssl/SSLSessionBindingListener.cs +++ b/src/net/JNet/Generated/Javax/Net/Ssl/SSLSessionBindingListener.cs @@ -78,8 +78,8 @@ public partial class SSLSessionBindingListener : Javax.Net.Ssl.ISSLSessionBindin /// protected virtual void InitializeHandlers() { - AddEventHandler("valueBound", new System.EventHandler>>(ValueBoundEventHandler)); OnValueBound = ValueBound; - AddEventHandler("valueUnbound", new System.EventHandler>>(ValueUnboundEventHandler)); OnValueUnbound = ValueUnbound; + AddEventHandler("valueBound", new System.EventHandler>>(ValueBoundEventHandler)); + AddEventHandler("valueUnbound", new System.EventHandler>>(ValueUnboundEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void ValueBoundEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnValueBound != null) OnValueBound.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnValueBound != null) ? OnValueBound : ValueBound; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void ValueBound(Javax.Net.Ssl.SSLSessionBindingEvent arg0) void ValueUnboundEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnValueUnbound != null) OnValueUnbound.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnValueUnbound != null) ? OnValueUnbound : ValueUnbound; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Print/Event/PrintJobAdapter.cs b/src/net/JNet/Generated/Javax/Print/Event/PrintJobAdapter.cs index bc2709b7bb..0ac0a72495 100644 --- a/src/net/JNet/Generated/Javax/Print/Event/PrintJobAdapter.cs +++ b/src/net/JNet/Generated/Javax/Print/Event/PrintJobAdapter.cs @@ -50,12 +50,12 @@ public partial class PrintJobAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("printDataTransferCompleted", new System.EventHandler>>(PrintDataTransferCompletedEventHandler)); OnPrintDataTransferCompleted = PrintDataTransferCompleted; - AddEventHandler("printJobCanceled", new System.EventHandler>>(PrintJobCanceledEventHandler)); OnPrintJobCanceled = PrintJobCanceled; - AddEventHandler("printJobCompleted", new System.EventHandler>>(PrintJobCompletedEventHandler)); OnPrintJobCompleted = PrintJobCompleted; - AddEventHandler("printJobFailed", new System.EventHandler>>(PrintJobFailedEventHandler)); OnPrintJobFailed = PrintJobFailed; - AddEventHandler("printJobNoMoreEvents", new System.EventHandler>>(PrintJobNoMoreEventsEventHandler)); OnPrintJobNoMoreEvents = PrintJobNoMoreEvents; - AddEventHandler("printJobRequiresAttention", new System.EventHandler>>(PrintJobRequiresAttentionEventHandler)); OnPrintJobRequiresAttention = PrintJobRequiresAttention; + AddEventHandler("printDataTransferCompleted", new System.EventHandler>>(PrintDataTransferCompletedEventHandler)); + AddEventHandler("printJobCanceled", new System.EventHandler>>(PrintJobCanceledEventHandler)); + AddEventHandler("printJobCompleted", new System.EventHandler>>(PrintJobCompletedEventHandler)); + AddEventHandler("printJobFailed", new System.EventHandler>>(PrintJobFailedEventHandler)); + AddEventHandler("printJobNoMoreEvents", new System.EventHandler>>(PrintJobNoMoreEventsEventHandler)); + AddEventHandler("printJobRequiresAttention", new System.EventHandler>>(PrintJobRequiresAttentionEventHandler)); } @@ -66,7 +66,8 @@ protected virtual void InitializeHandlers() void PrintDataTransferCompletedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintDataTransferCompleted != null) OnPrintDataTransferCompleted.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintDataTransferCompleted != null) ? OnPrintDataTransferCompleted : PrintDataTransferCompleted; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -85,7 +86,8 @@ public virtual void PrintDataTransferCompleted(Javax.Print.Event.PrintJobEvent a void PrintJobCanceledEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintJobCanceled != null) OnPrintJobCanceled.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintJobCanceled != null) ? OnPrintJobCanceled : PrintJobCanceled; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -104,7 +106,8 @@ public virtual void PrintJobCanceled(Javax.Print.Event.PrintJobEvent arg0) void PrintJobCompletedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintJobCompleted != null) OnPrintJobCompleted.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintJobCompleted != null) ? OnPrintJobCompleted : PrintJobCompleted; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -123,7 +126,8 @@ public virtual void PrintJobCompleted(Javax.Print.Event.PrintJobEvent arg0) void PrintJobFailedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintJobFailed != null) OnPrintJobFailed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintJobFailed != null) ? OnPrintJobFailed : PrintJobFailed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -142,7 +146,8 @@ public virtual void PrintJobFailed(Javax.Print.Event.PrintJobEvent arg0) void PrintJobNoMoreEventsEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintJobNoMoreEvents != null) OnPrintJobNoMoreEvents.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintJobNoMoreEvents != null) ? OnPrintJobNoMoreEvents : PrintJobNoMoreEvents; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -161,7 +166,8 @@ public virtual void PrintJobNoMoreEvents(Javax.Print.Event.PrintJobEvent arg0) void PrintJobRequiresAttentionEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintJobRequiresAttention != null) OnPrintJobRequiresAttention.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintJobRequiresAttention != null) ? OnPrintJobRequiresAttention : PrintJobRequiresAttention; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Print/Event/PrintJobAttributeListener.cs b/src/net/JNet/Generated/Javax/Print/Event/PrintJobAttributeListener.cs index 925a854963..15c4da395b 100644 --- a/src/net/JNet/Generated/Javax/Print/Event/PrintJobAttributeListener.cs +++ b/src/net/JNet/Generated/Javax/Print/Event/PrintJobAttributeListener.cs @@ -73,7 +73,7 @@ public partial class PrintJobAttributeListener : Javax.Print.Event.IPrintJobAttr /// protected virtual void InitializeHandlers() { - AddEventHandler("attributeUpdate", new System.EventHandler>>(AttributeUpdateEventHandler)); OnAttributeUpdate = AttributeUpdate; + AddEventHandler("attributeUpdate", new System.EventHandler>>(AttributeUpdateEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void AttributeUpdateEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAttributeUpdate != null) OnAttributeUpdate.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAttributeUpdate != null) ? OnAttributeUpdate : AttributeUpdate; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Print/Event/PrintJobListener.cs b/src/net/JNet/Generated/Javax/Print/Event/PrintJobListener.cs index 32f9ad5195..4ab808ef2a 100644 --- a/src/net/JNet/Generated/Javax/Print/Event/PrintJobListener.cs +++ b/src/net/JNet/Generated/Javax/Print/Event/PrintJobListener.cs @@ -98,12 +98,12 @@ public partial class PrintJobListener : Javax.Print.Event.IPrintJobListener /// protected virtual void InitializeHandlers() { - AddEventHandler("printDataTransferCompleted", new System.EventHandler>>(PrintDataTransferCompletedEventHandler)); OnPrintDataTransferCompleted = PrintDataTransferCompleted; - AddEventHandler("printJobCanceled", new System.EventHandler>>(PrintJobCanceledEventHandler)); OnPrintJobCanceled = PrintJobCanceled; - AddEventHandler("printJobCompleted", new System.EventHandler>>(PrintJobCompletedEventHandler)); OnPrintJobCompleted = PrintJobCompleted; - AddEventHandler("printJobFailed", new System.EventHandler>>(PrintJobFailedEventHandler)); OnPrintJobFailed = PrintJobFailed; - AddEventHandler("printJobNoMoreEvents", new System.EventHandler>>(PrintJobNoMoreEventsEventHandler)); OnPrintJobNoMoreEvents = PrintJobNoMoreEvents; - AddEventHandler("printJobRequiresAttention", new System.EventHandler>>(PrintJobRequiresAttentionEventHandler)); OnPrintJobRequiresAttention = PrintJobRequiresAttention; + AddEventHandler("printDataTransferCompleted", new System.EventHandler>>(PrintDataTransferCompletedEventHandler)); + AddEventHandler("printJobCanceled", new System.EventHandler>>(PrintJobCanceledEventHandler)); + AddEventHandler("printJobCompleted", new System.EventHandler>>(PrintJobCompletedEventHandler)); + AddEventHandler("printJobFailed", new System.EventHandler>>(PrintJobFailedEventHandler)); + AddEventHandler("printJobNoMoreEvents", new System.EventHandler>>(PrintJobNoMoreEventsEventHandler)); + AddEventHandler("printJobRequiresAttention", new System.EventHandler>>(PrintJobRequiresAttentionEventHandler)); } @@ -114,7 +114,8 @@ protected virtual void InitializeHandlers() void PrintDataTransferCompletedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintDataTransferCompleted != null) OnPrintDataTransferCompleted.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintDataTransferCompleted != null) ? OnPrintDataTransferCompleted : PrintDataTransferCompleted; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -133,7 +134,8 @@ public virtual void PrintDataTransferCompleted(Javax.Print.Event.PrintJobEvent a void PrintJobCanceledEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintJobCanceled != null) OnPrintJobCanceled.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintJobCanceled != null) ? OnPrintJobCanceled : PrintJobCanceled; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -152,7 +154,8 @@ public virtual void PrintJobCanceled(Javax.Print.Event.PrintJobEvent arg0) void PrintJobCompletedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintJobCompleted != null) OnPrintJobCompleted.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintJobCompleted != null) ? OnPrintJobCompleted : PrintJobCompleted; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -171,7 +174,8 @@ public virtual void PrintJobCompleted(Javax.Print.Event.PrintJobEvent arg0) void PrintJobFailedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintJobFailed != null) OnPrintJobFailed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintJobFailed != null) ? OnPrintJobFailed : PrintJobFailed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -190,7 +194,8 @@ public virtual void PrintJobFailed(Javax.Print.Event.PrintJobEvent arg0) void PrintJobNoMoreEventsEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintJobNoMoreEvents != null) OnPrintJobNoMoreEvents.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintJobNoMoreEvents != null) ? OnPrintJobNoMoreEvents : PrintJobNoMoreEvents; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -209,7 +214,8 @@ public virtual void PrintJobNoMoreEvents(Javax.Print.Event.PrintJobEvent arg0) void PrintJobRequiresAttentionEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPrintJobRequiresAttention != null) OnPrintJobRequiresAttention.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPrintJobRequiresAttention != null) ? OnPrintJobRequiresAttention : PrintJobRequiresAttention; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Print/Event/PrintServiceAttributeListener.cs b/src/net/JNet/Generated/Javax/Print/Event/PrintServiceAttributeListener.cs index 3accc17beb..7e7b059ac3 100644 --- a/src/net/JNet/Generated/Javax/Print/Event/PrintServiceAttributeListener.cs +++ b/src/net/JNet/Generated/Javax/Print/Event/PrintServiceAttributeListener.cs @@ -73,7 +73,7 @@ public partial class PrintServiceAttributeListener : Javax.Print.Event.IPrintSer /// protected virtual void InitializeHandlers() { - AddEventHandler("attributeUpdate", new System.EventHandler>>(AttributeUpdateEventHandler)); OnAttributeUpdate = AttributeUpdate; + AddEventHandler("attributeUpdate", new System.EventHandler>>(AttributeUpdateEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void AttributeUpdateEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAttributeUpdate != null) OnAttributeUpdate.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAttributeUpdate != null) ? OnAttributeUpdate : AttributeUpdate; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Sound/Midi/ControllerEventListener.cs b/src/net/JNet/Generated/Javax/Sound/Midi/ControllerEventListener.cs index e8889f3f36..752011e21b 100644 --- a/src/net/JNet/Generated/Javax/Sound/Midi/ControllerEventListener.cs +++ b/src/net/JNet/Generated/Javax/Sound/Midi/ControllerEventListener.cs @@ -73,7 +73,7 @@ public partial class ControllerEventListener : Javax.Sound.Midi.IControllerEvent /// protected virtual void InitializeHandlers() { - AddEventHandler("controlChange", new System.EventHandler>>(ControlChangeEventHandler)); OnControlChange = ControlChange; + AddEventHandler("controlChange", new System.EventHandler>>(ControlChangeEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void ControlChangeEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnControlChange != null) OnControlChange.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnControlChange != null) ? OnControlChange : ControlChange; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Sound/Midi/MetaEventListener.cs b/src/net/JNet/Generated/Javax/Sound/Midi/MetaEventListener.cs index b6b8502182..81f70a072c 100644 --- a/src/net/JNet/Generated/Javax/Sound/Midi/MetaEventListener.cs +++ b/src/net/JNet/Generated/Javax/Sound/Midi/MetaEventListener.cs @@ -73,7 +73,7 @@ public partial class MetaEventListener : Javax.Sound.Midi.IMetaEventListener /// protected virtual void InitializeHandlers() { - AddEventHandler("meta", new System.EventHandler>>(MetaEventHandler)); OnMeta = Meta; + AddEventHandler("meta", new System.EventHandler>>(MetaEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void MetaEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMeta != null) OnMeta.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMeta != null) ? OnMeta : Meta; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Sound/Sampled/LineListener.cs b/src/net/JNet/Generated/Javax/Sound/Sampled/LineListener.cs index e1be7d45b4..2bab709e34 100644 --- a/src/net/JNet/Generated/Javax/Sound/Sampled/LineListener.cs +++ b/src/net/JNet/Generated/Javax/Sound/Sampled/LineListener.cs @@ -73,7 +73,7 @@ public partial class LineListener : Javax.Sound.Sampled.ILineListener /// protected virtual void InitializeHandlers() { - AddEventHandler("update", new System.EventHandler>>(UpdateEventHandler)); OnUpdate = Update; + AddEventHandler("update", new System.EventHandler>>(UpdateEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void UpdateEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnUpdate != null) OnUpdate.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnUpdate != null) ? OnUpdate : Update; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Sql/ConnectionEventListener.cs b/src/net/JNet/Generated/Javax/Sql/ConnectionEventListener.cs index 445e2a6a25..60f5bc58c1 100644 --- a/src/net/JNet/Generated/Javax/Sql/ConnectionEventListener.cs +++ b/src/net/JNet/Generated/Javax/Sql/ConnectionEventListener.cs @@ -78,8 +78,8 @@ public partial class ConnectionEventListener : Javax.Sql.IConnectionEventListene /// protected virtual void InitializeHandlers() { - AddEventHandler("connectionClosed", new System.EventHandler>>(ConnectionClosedEventHandler)); OnConnectionClosed = ConnectionClosed; - AddEventHandler("connectionErrorOccurred", new System.EventHandler>>(ConnectionErrorOccurredEventHandler)); OnConnectionErrorOccurred = ConnectionErrorOccurred; + AddEventHandler("connectionClosed", new System.EventHandler>>(ConnectionClosedEventHandler)); + AddEventHandler("connectionErrorOccurred", new System.EventHandler>>(ConnectionErrorOccurredEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void ConnectionClosedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnConnectionClosed != null) OnConnectionClosed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnConnectionClosed != null) ? OnConnectionClosed : ConnectionClosed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void ConnectionClosed(Javax.Sql.ConnectionEvent arg0) void ConnectionErrorOccurredEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnConnectionErrorOccurred != null) OnConnectionErrorOccurred.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnConnectionErrorOccurred != null) ? OnConnectionErrorOccurred : ConnectionErrorOccurred; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Sql/RowSetListener.cs b/src/net/JNet/Generated/Javax/Sql/RowSetListener.cs index 1a48f22a23..ade69c3a23 100644 --- a/src/net/JNet/Generated/Javax/Sql/RowSetListener.cs +++ b/src/net/JNet/Generated/Javax/Sql/RowSetListener.cs @@ -83,9 +83,9 @@ public partial class RowSetListener : Javax.Sql.IRowSetListener /// protected virtual void InitializeHandlers() { - AddEventHandler("cursorMoved", new System.EventHandler>>(CursorMovedEventHandler)); OnCursorMoved = CursorMoved; - AddEventHandler("rowChanged", new System.EventHandler>>(RowChangedEventHandler)); OnRowChanged = RowChanged; - AddEventHandler("rowSetChanged", new System.EventHandler>>(RowSetChangedEventHandler)); OnRowSetChanged = RowSetChanged; + AddEventHandler("cursorMoved", new System.EventHandler>>(CursorMovedEventHandler)); + AddEventHandler("rowChanged", new System.EventHandler>>(RowChangedEventHandler)); + AddEventHandler("rowSetChanged", new System.EventHandler>>(RowSetChangedEventHandler)); } @@ -96,7 +96,8 @@ protected virtual void InitializeHandlers() void CursorMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnCursorMoved != null) OnCursorMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnCursorMoved != null) ? OnCursorMoved : CursorMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -115,7 +116,8 @@ public virtual void CursorMoved(Javax.Sql.RowSetEvent arg0) void RowChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnRowChanged != null) OnRowChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnRowChanged != null) ? OnRowChanged : RowChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -134,7 +136,8 @@ public virtual void RowChanged(Javax.Sql.RowSetEvent arg0) void RowSetChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnRowSetChanged != null) OnRowSetChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnRowSetChanged != null) ? OnRowSetChanged : RowSetChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Sql/StatementEventListener.cs b/src/net/JNet/Generated/Javax/Sql/StatementEventListener.cs index 31a7466f6a..18521e6f98 100644 --- a/src/net/JNet/Generated/Javax/Sql/StatementEventListener.cs +++ b/src/net/JNet/Generated/Javax/Sql/StatementEventListener.cs @@ -78,8 +78,8 @@ public partial class StatementEventListener : Javax.Sql.IStatementEventListener /// protected virtual void InitializeHandlers() { - AddEventHandler("statementClosed", new System.EventHandler>>(StatementClosedEventHandler)); OnStatementClosed = StatementClosed; - AddEventHandler("statementErrorOccurred", new System.EventHandler>>(StatementErrorOccurredEventHandler)); OnStatementErrorOccurred = StatementErrorOccurred; + AddEventHandler("statementClosed", new System.EventHandler>>(StatementClosedEventHandler)); + AddEventHandler("statementErrorOccurred", new System.EventHandler>>(StatementErrorOccurredEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void StatementClosedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnStatementClosed != null) OnStatementClosed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnStatementClosed != null) ? OnStatementClosed : StatementClosed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void StatementClosed(Javax.Sql.StatementEvent arg0) void StatementErrorOccurredEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnStatementErrorOccurred != null) OnStatementErrorOccurred.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnStatementErrorOccurred != null) ? OnStatementErrorOccurred : StatementErrorOccurred; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Action.cs b/src/net/JNet/Generated/Javax/Swing/Action.cs index 5392f953bf..430168cad1 100644 --- a/src/net/JNet/Generated/Javax/Swing/Action.cs +++ b/src/net/JNet/Generated/Javax/Swing/Action.cs @@ -112,14 +112,14 @@ public partial class Action : Javax.Swing.IAction /// protected virtual void InitializeHandlers() { - AddEventHandler("isEnabled", new System.EventHandler>(IsEnabledEventHandler)); OnIsEnabled = IsEnabled; - AddEventHandler("getValue", new System.EventHandler>>(GetValueEventHandler)); OnGetValue = GetValue; - AddEventHandler("actionPerformed", new System.EventHandler>>(ActionPerformedEventHandler)); OnActionPerformed = ActionPerformed; - AddEventHandler("addPropertyChangeListener", new System.EventHandler>>(AddPropertyChangeListenerEventHandler)); OnAddPropertyChangeListener = AddPropertyChangeListener; - AddEventHandler("putValue", new System.EventHandler>>(PutValueEventHandler)); OnPutValue = PutValue; - AddEventHandler("removePropertyChangeListener", new System.EventHandler>>(RemovePropertyChangeListenerEventHandler)); OnRemovePropertyChangeListener = RemovePropertyChangeListener; - AddEventHandler("setEnabled", new System.EventHandler>>(SetEnabledEventHandler)); OnSetEnabled = SetEnabled; - AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); OnAccept = Accept; + AddEventHandler("isEnabled", new System.EventHandler>(IsEnabledEventHandler)); + AddEventHandler("getValue", new System.EventHandler>>(GetValueEventHandler)); + AddEventHandler("actionPerformed", new System.EventHandler>>(ActionPerformedEventHandler)); + AddEventHandler("addPropertyChangeListener", new System.EventHandler>>(AddPropertyChangeListenerEventHandler)); + AddEventHandler("putValue", new System.EventHandler>>(PutValueEventHandler)); + AddEventHandler("removePropertyChangeListener", new System.EventHandler>>(RemovePropertyChangeListenerEventHandler)); + AddEventHandler("setEnabled", new System.EventHandler>>(SetEnabledEventHandler)); + AddEventHandler("accept", new System.EventHandler>>(AcceptEventHandler)); } @@ -130,11 +130,9 @@ protected virtual void InitializeHandlers() void IsEnabledEventHandler(object sender, CLRListenerEventArgs data) { - if (OnIsEnabled != null) - { - var executionResult = OnIsEnabled.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnIsEnabled != null) ? OnIsEnabled : IsEnabled; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -154,11 +152,9 @@ public virtual bool IsEnabled() void GetValueEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnGetValue != null) - { - var executionResult = OnGetValue.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetValue != null) ? OnGetValue : GetValue; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -178,7 +174,8 @@ public virtual object GetValue(string arg0) void ActionPerformedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnActionPerformed != null) OnActionPerformed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnActionPerformed != null) ? OnActionPerformed : ActionPerformed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -197,7 +194,8 @@ public virtual void ActionPerformed(Java.Awt.EventNs.ActionEvent arg0) void AddPropertyChangeListenerEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAddPropertyChangeListener != null) OnAddPropertyChangeListener.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAddPropertyChangeListener != null) ? OnAddPropertyChangeListener : AddPropertyChangeListener; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -216,7 +214,8 @@ public virtual void AddPropertyChangeListener(Java.Beans.PropertyChangeListener void PutValueEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPutValue != null) OnPutValue.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnPutValue != null) ? OnPutValue : PutValue; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -236,7 +235,8 @@ public virtual void PutValue(string arg0, object arg1) void RemovePropertyChangeListenerEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnRemovePropertyChangeListener != null) OnRemovePropertyChangeListener.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnRemovePropertyChangeListener != null) ? OnRemovePropertyChangeListener : RemovePropertyChangeListener; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -255,7 +255,8 @@ public virtual void RemovePropertyChangeListener(Java.Beans.PropertyChangeListen void SetEnabledEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetEnabled != null) OnSetEnabled.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetEnabled != null) ? OnSetEnabled : SetEnabled; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -274,11 +275,9 @@ public virtual void SetEnabled(bool arg0) void AcceptEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAccept != null) - { - var executionResult = OnAccept.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnAccept != null) ? OnAccept : Accept; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/AncestorListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/AncestorListener.cs index a58c969712..0f9f9c7af4 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/AncestorListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/AncestorListener.cs @@ -83,9 +83,9 @@ public partial class AncestorListener : Javax.Swing.Event.IAncestorListener /// protected virtual void InitializeHandlers() { - AddEventHandler("ancestorAdded", new System.EventHandler>>(AncestorAddedEventHandler)); OnAncestorAdded = AncestorAdded; - AddEventHandler("ancestorMoved", new System.EventHandler>>(AncestorMovedEventHandler)); OnAncestorMoved = AncestorMoved; - AddEventHandler("ancestorRemoved", new System.EventHandler>>(AncestorRemovedEventHandler)); OnAncestorRemoved = AncestorRemoved; + AddEventHandler("ancestorAdded", new System.EventHandler>>(AncestorAddedEventHandler)); + AddEventHandler("ancestorMoved", new System.EventHandler>>(AncestorMovedEventHandler)); + AddEventHandler("ancestorRemoved", new System.EventHandler>>(AncestorRemovedEventHandler)); } @@ -96,7 +96,8 @@ protected virtual void InitializeHandlers() void AncestorAddedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAncestorAdded != null) OnAncestorAdded.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAncestorAdded != null) ? OnAncestorAdded : AncestorAdded; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -115,7 +116,8 @@ public virtual void AncestorAdded(Javax.Swing.Event.AncestorEvent arg0) void AncestorMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAncestorMoved != null) OnAncestorMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAncestorMoved != null) ? OnAncestorMoved : AncestorMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -134,7 +136,8 @@ public virtual void AncestorMoved(Javax.Swing.Event.AncestorEvent arg0) void AncestorRemovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnAncestorRemoved != null) OnAncestorRemoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnAncestorRemoved != null) ? OnAncestorRemoved : AncestorRemoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/CaretListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/CaretListener.cs index af0ede1852..0d888cfd4a 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/CaretListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/CaretListener.cs @@ -73,7 +73,7 @@ public partial class CaretListener : Javax.Swing.Event.ICaretListener /// protected virtual void InitializeHandlers() { - AddEventHandler("caretUpdate", new System.EventHandler>>(CaretUpdateEventHandler)); OnCaretUpdate = CaretUpdate; + AddEventHandler("caretUpdate", new System.EventHandler>>(CaretUpdateEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void CaretUpdateEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnCaretUpdate != null) OnCaretUpdate.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnCaretUpdate != null) ? OnCaretUpdate : CaretUpdate; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/CellEditorListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/CellEditorListener.cs index 5fa7a22531..d67b947697 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/CellEditorListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/CellEditorListener.cs @@ -78,8 +78,8 @@ public partial class CellEditorListener : Javax.Swing.Event.ICellEditorListener /// protected virtual void InitializeHandlers() { - AddEventHandler("editingCanceled", new System.EventHandler>>(EditingCanceledEventHandler)); OnEditingCanceled = EditingCanceled; - AddEventHandler("editingStopped", new System.EventHandler>>(EditingStoppedEventHandler)); OnEditingStopped = EditingStopped; + AddEventHandler("editingCanceled", new System.EventHandler>>(EditingCanceledEventHandler)); + AddEventHandler("editingStopped", new System.EventHandler>>(EditingStoppedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void EditingCanceledEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnEditingCanceled != null) OnEditingCanceled.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnEditingCanceled != null) ? OnEditingCanceled : EditingCanceled; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void EditingCanceled(Javax.Swing.Event.ChangeEvent arg0) void EditingStoppedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnEditingStopped != null) OnEditingStopped.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnEditingStopped != null) ? OnEditingStopped : EditingStopped; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/ChangeListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/ChangeListener.cs index daf5166e2e..9f2e44c14d 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/ChangeListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/ChangeListener.cs @@ -73,7 +73,7 @@ public partial class ChangeListener : Javax.Swing.Event.IChangeListener /// protected virtual void InitializeHandlers() { - AddEventHandler("stateChanged", new System.EventHandler>>(StateChangedEventHandler)); OnStateChanged = StateChanged; + AddEventHandler("stateChanged", new System.EventHandler>>(StateChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void StateChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnStateChanged != null) OnStateChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnStateChanged != null) ? OnStateChanged : StateChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/DocumentListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/DocumentListener.cs index 6454b7c653..dee659d6df 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/DocumentListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/DocumentListener.cs @@ -83,9 +83,9 @@ public partial class DocumentListener : Javax.Swing.Event.IDocumentListener /// protected virtual void InitializeHandlers() { - AddEventHandler("changedUpdate", new System.EventHandler>>(ChangedUpdateEventHandler)); OnChangedUpdate = ChangedUpdate; - AddEventHandler("insertUpdate", new System.EventHandler>>(InsertUpdateEventHandler)); OnInsertUpdate = InsertUpdate; - AddEventHandler("removeUpdate", new System.EventHandler>>(RemoveUpdateEventHandler)); OnRemoveUpdate = RemoveUpdate; + AddEventHandler("changedUpdate", new System.EventHandler>>(ChangedUpdateEventHandler)); + AddEventHandler("insertUpdate", new System.EventHandler>>(InsertUpdateEventHandler)); + AddEventHandler("removeUpdate", new System.EventHandler>>(RemoveUpdateEventHandler)); } @@ -96,7 +96,8 @@ protected virtual void InitializeHandlers() void ChangedUpdateEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnChangedUpdate != null) OnChangedUpdate.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnChangedUpdate != null) ? OnChangedUpdate : ChangedUpdate; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -115,7 +116,8 @@ public virtual void ChangedUpdate(Javax.Swing.Event.DocumentEvent arg0) void InsertUpdateEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInsertUpdate != null) OnInsertUpdate.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInsertUpdate != null) ? OnInsertUpdate : InsertUpdate; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -134,7 +136,8 @@ public virtual void InsertUpdate(Javax.Swing.Event.DocumentEvent arg0) void RemoveUpdateEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnRemoveUpdate != null) OnRemoveUpdate.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnRemoveUpdate != null) ? OnRemoveUpdate : RemoveUpdate; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/HyperlinkListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/HyperlinkListener.cs index 0c7ba5f5cb..f83e6a0bd9 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/HyperlinkListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/HyperlinkListener.cs @@ -73,7 +73,7 @@ public partial class HyperlinkListener : Javax.Swing.Event.IHyperlinkListener /// protected virtual void InitializeHandlers() { - AddEventHandler("hyperlinkUpdate", new System.EventHandler>>(HyperlinkUpdateEventHandler)); OnHyperlinkUpdate = HyperlinkUpdate; + AddEventHandler("hyperlinkUpdate", new System.EventHandler>>(HyperlinkUpdateEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void HyperlinkUpdateEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnHyperlinkUpdate != null) OnHyperlinkUpdate.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnHyperlinkUpdate != null) ? OnHyperlinkUpdate : HyperlinkUpdate; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/InternalFrameAdapter.cs b/src/net/JNet/Generated/Javax/Swing/Event/InternalFrameAdapter.cs index 13d7cfc13f..cff73d8804 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/InternalFrameAdapter.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/InternalFrameAdapter.cs @@ -50,13 +50,13 @@ public partial class InternalFrameAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("internalFrameActivated", new System.EventHandler>>(InternalFrameActivatedEventHandler)); OnInternalFrameActivated = InternalFrameActivated; - AddEventHandler("internalFrameClosed", new System.EventHandler>>(InternalFrameClosedEventHandler)); OnInternalFrameClosed = InternalFrameClosed; - AddEventHandler("internalFrameClosing", new System.EventHandler>>(InternalFrameClosingEventHandler)); OnInternalFrameClosing = InternalFrameClosing; - AddEventHandler("internalFrameDeactivated", new System.EventHandler>>(InternalFrameDeactivatedEventHandler)); OnInternalFrameDeactivated = InternalFrameDeactivated; - AddEventHandler("internalFrameDeiconified", new System.EventHandler>>(InternalFrameDeiconifiedEventHandler)); OnInternalFrameDeiconified = InternalFrameDeiconified; - AddEventHandler("internalFrameIconified", new System.EventHandler>>(InternalFrameIconifiedEventHandler)); OnInternalFrameIconified = InternalFrameIconified; - AddEventHandler("internalFrameOpened", new System.EventHandler>>(InternalFrameOpenedEventHandler)); OnInternalFrameOpened = InternalFrameOpened; + AddEventHandler("internalFrameActivated", new System.EventHandler>>(InternalFrameActivatedEventHandler)); + AddEventHandler("internalFrameClosed", new System.EventHandler>>(InternalFrameClosedEventHandler)); + AddEventHandler("internalFrameClosing", new System.EventHandler>>(InternalFrameClosingEventHandler)); + AddEventHandler("internalFrameDeactivated", new System.EventHandler>>(InternalFrameDeactivatedEventHandler)); + AddEventHandler("internalFrameDeiconified", new System.EventHandler>>(InternalFrameDeiconifiedEventHandler)); + AddEventHandler("internalFrameIconified", new System.EventHandler>>(InternalFrameIconifiedEventHandler)); + AddEventHandler("internalFrameOpened", new System.EventHandler>>(InternalFrameOpenedEventHandler)); } @@ -67,7 +67,8 @@ protected virtual void InitializeHandlers() void InternalFrameActivatedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameActivated != null) OnInternalFrameActivated.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameActivated != null) ? OnInternalFrameActivated : InternalFrameActivated; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -86,7 +87,8 @@ public virtual void InternalFrameActivated(Javax.Swing.Event.InternalFrameEvent void InternalFrameClosedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameClosed != null) OnInternalFrameClosed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameClosed != null) ? OnInternalFrameClosed : InternalFrameClosed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -105,7 +107,8 @@ public virtual void InternalFrameClosed(Javax.Swing.Event.InternalFrameEvent arg void InternalFrameClosingEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameClosing != null) OnInternalFrameClosing.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameClosing != null) ? OnInternalFrameClosing : InternalFrameClosing; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -124,7 +127,8 @@ public virtual void InternalFrameClosing(Javax.Swing.Event.InternalFrameEvent ar void InternalFrameDeactivatedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameDeactivated != null) OnInternalFrameDeactivated.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameDeactivated != null) ? OnInternalFrameDeactivated : InternalFrameDeactivated; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -143,7 +147,8 @@ public virtual void InternalFrameDeactivated(Javax.Swing.Event.InternalFrameEven void InternalFrameDeiconifiedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameDeiconified != null) OnInternalFrameDeiconified.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameDeiconified != null) ? OnInternalFrameDeiconified : InternalFrameDeiconified; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -162,7 +167,8 @@ public virtual void InternalFrameDeiconified(Javax.Swing.Event.InternalFrameEven void InternalFrameIconifiedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameIconified != null) OnInternalFrameIconified.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameIconified != null) ? OnInternalFrameIconified : InternalFrameIconified; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -181,7 +187,8 @@ public virtual void InternalFrameIconified(Javax.Swing.Event.InternalFrameEvent void InternalFrameOpenedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameOpened != null) OnInternalFrameOpened.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameOpened != null) ? OnInternalFrameOpened : InternalFrameOpened; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/InternalFrameListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/InternalFrameListener.cs index 9a741d9bec..980f23f69f 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/InternalFrameListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/InternalFrameListener.cs @@ -103,13 +103,13 @@ public partial class InternalFrameListener : Javax.Swing.Event.IInternalFrameLis /// protected virtual void InitializeHandlers() { - AddEventHandler("internalFrameActivated", new System.EventHandler>>(InternalFrameActivatedEventHandler)); OnInternalFrameActivated = InternalFrameActivated; - AddEventHandler("internalFrameClosed", new System.EventHandler>>(InternalFrameClosedEventHandler)); OnInternalFrameClosed = InternalFrameClosed; - AddEventHandler("internalFrameClosing", new System.EventHandler>>(InternalFrameClosingEventHandler)); OnInternalFrameClosing = InternalFrameClosing; - AddEventHandler("internalFrameDeactivated", new System.EventHandler>>(InternalFrameDeactivatedEventHandler)); OnInternalFrameDeactivated = InternalFrameDeactivated; - AddEventHandler("internalFrameDeiconified", new System.EventHandler>>(InternalFrameDeiconifiedEventHandler)); OnInternalFrameDeiconified = InternalFrameDeiconified; - AddEventHandler("internalFrameIconified", new System.EventHandler>>(InternalFrameIconifiedEventHandler)); OnInternalFrameIconified = InternalFrameIconified; - AddEventHandler("internalFrameOpened", new System.EventHandler>>(InternalFrameOpenedEventHandler)); OnInternalFrameOpened = InternalFrameOpened; + AddEventHandler("internalFrameActivated", new System.EventHandler>>(InternalFrameActivatedEventHandler)); + AddEventHandler("internalFrameClosed", new System.EventHandler>>(InternalFrameClosedEventHandler)); + AddEventHandler("internalFrameClosing", new System.EventHandler>>(InternalFrameClosingEventHandler)); + AddEventHandler("internalFrameDeactivated", new System.EventHandler>>(InternalFrameDeactivatedEventHandler)); + AddEventHandler("internalFrameDeiconified", new System.EventHandler>>(InternalFrameDeiconifiedEventHandler)); + AddEventHandler("internalFrameIconified", new System.EventHandler>>(InternalFrameIconifiedEventHandler)); + AddEventHandler("internalFrameOpened", new System.EventHandler>>(InternalFrameOpenedEventHandler)); } @@ -120,7 +120,8 @@ protected virtual void InitializeHandlers() void InternalFrameActivatedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameActivated != null) OnInternalFrameActivated.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameActivated != null) ? OnInternalFrameActivated : InternalFrameActivated; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -139,7 +140,8 @@ public virtual void InternalFrameActivated(Javax.Swing.Event.InternalFrameEvent void InternalFrameClosedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameClosed != null) OnInternalFrameClosed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameClosed != null) ? OnInternalFrameClosed : InternalFrameClosed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -158,7 +160,8 @@ public virtual void InternalFrameClosed(Javax.Swing.Event.InternalFrameEvent arg void InternalFrameClosingEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameClosing != null) OnInternalFrameClosing.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameClosing != null) ? OnInternalFrameClosing : InternalFrameClosing; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -177,7 +180,8 @@ public virtual void InternalFrameClosing(Javax.Swing.Event.InternalFrameEvent ar void InternalFrameDeactivatedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameDeactivated != null) OnInternalFrameDeactivated.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameDeactivated != null) ? OnInternalFrameDeactivated : InternalFrameDeactivated; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -196,7 +200,8 @@ public virtual void InternalFrameDeactivated(Javax.Swing.Event.InternalFrameEven void InternalFrameDeiconifiedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameDeiconified != null) OnInternalFrameDeiconified.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameDeiconified != null) ? OnInternalFrameDeiconified : InternalFrameDeiconified; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -215,7 +220,8 @@ public virtual void InternalFrameDeiconified(Javax.Swing.Event.InternalFrameEven void InternalFrameIconifiedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameIconified != null) OnInternalFrameIconified.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameIconified != null) ? OnInternalFrameIconified : InternalFrameIconified; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -234,7 +240,8 @@ public virtual void InternalFrameIconified(Javax.Swing.Event.InternalFrameEvent void InternalFrameOpenedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnInternalFrameOpened != null) OnInternalFrameOpened.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnInternalFrameOpened != null) ? OnInternalFrameOpened : InternalFrameOpened; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/ListDataListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/ListDataListener.cs index f303e0112a..0a303a42d4 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/ListDataListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/ListDataListener.cs @@ -83,9 +83,9 @@ public partial class ListDataListener : Javax.Swing.Event.IListDataListener /// protected virtual void InitializeHandlers() { - AddEventHandler("contentsChanged", new System.EventHandler>>(ContentsChangedEventHandler)); OnContentsChanged = ContentsChanged; - AddEventHandler("intervalAdded", new System.EventHandler>>(IntervalAddedEventHandler)); OnIntervalAdded = IntervalAdded; - AddEventHandler("intervalRemoved", new System.EventHandler>>(IntervalRemovedEventHandler)); OnIntervalRemoved = IntervalRemoved; + AddEventHandler("contentsChanged", new System.EventHandler>>(ContentsChangedEventHandler)); + AddEventHandler("intervalAdded", new System.EventHandler>>(IntervalAddedEventHandler)); + AddEventHandler("intervalRemoved", new System.EventHandler>>(IntervalRemovedEventHandler)); } @@ -96,7 +96,8 @@ protected virtual void InitializeHandlers() void ContentsChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnContentsChanged != null) OnContentsChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnContentsChanged != null) ? OnContentsChanged : ContentsChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -115,7 +116,8 @@ public virtual void ContentsChanged(Javax.Swing.Event.ListDataEvent arg0) void IntervalAddedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnIntervalAdded != null) OnIntervalAdded.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnIntervalAdded != null) ? OnIntervalAdded : IntervalAdded; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -134,7 +136,8 @@ public virtual void IntervalAdded(Javax.Swing.Event.ListDataEvent arg0) void IntervalRemovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnIntervalRemoved != null) OnIntervalRemoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnIntervalRemoved != null) ? OnIntervalRemoved : IntervalRemoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/ListSelectionListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/ListSelectionListener.cs index f5d9a710d9..6e374133cd 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/ListSelectionListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/ListSelectionListener.cs @@ -73,7 +73,7 @@ public partial class ListSelectionListener : Javax.Swing.Event.IListSelectionLis /// protected virtual void InitializeHandlers() { - AddEventHandler("valueChanged", new System.EventHandler>>(ValueChangedEventHandler)); OnValueChanged = ValueChanged; + AddEventHandler("valueChanged", new System.EventHandler>>(ValueChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void ValueChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnValueChanged != null) OnValueChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnValueChanged != null) ? OnValueChanged : ValueChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/MenuDragMouseListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/MenuDragMouseListener.cs index 892a00993f..3322ae0172 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/MenuDragMouseListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/MenuDragMouseListener.cs @@ -88,10 +88,10 @@ public partial class MenuDragMouseListener : Javax.Swing.Event.IMenuDragMouseLis /// protected virtual void InitializeHandlers() { - AddEventHandler("menuDragMouseDragged", new System.EventHandler>>(MenuDragMouseDraggedEventHandler)); OnMenuDragMouseDragged = MenuDragMouseDragged; - AddEventHandler("menuDragMouseEntered", new System.EventHandler>>(MenuDragMouseEnteredEventHandler)); OnMenuDragMouseEntered = MenuDragMouseEntered; - AddEventHandler("menuDragMouseExited", new System.EventHandler>>(MenuDragMouseExitedEventHandler)); OnMenuDragMouseExited = MenuDragMouseExited; - AddEventHandler("menuDragMouseReleased", new System.EventHandler>>(MenuDragMouseReleasedEventHandler)); OnMenuDragMouseReleased = MenuDragMouseReleased; + AddEventHandler("menuDragMouseDragged", new System.EventHandler>>(MenuDragMouseDraggedEventHandler)); + AddEventHandler("menuDragMouseEntered", new System.EventHandler>>(MenuDragMouseEnteredEventHandler)); + AddEventHandler("menuDragMouseExited", new System.EventHandler>>(MenuDragMouseExitedEventHandler)); + AddEventHandler("menuDragMouseReleased", new System.EventHandler>>(MenuDragMouseReleasedEventHandler)); } @@ -102,7 +102,8 @@ protected virtual void InitializeHandlers() void MenuDragMouseDraggedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMenuDragMouseDragged != null) OnMenuDragMouseDragged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMenuDragMouseDragged != null) ? OnMenuDragMouseDragged : MenuDragMouseDragged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -121,7 +122,8 @@ public virtual void MenuDragMouseDragged(Javax.Swing.Event.MenuDragMouseEvent ar void MenuDragMouseEnteredEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMenuDragMouseEntered != null) OnMenuDragMouseEntered.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMenuDragMouseEntered != null) ? OnMenuDragMouseEntered : MenuDragMouseEntered; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -140,7 +142,8 @@ public virtual void MenuDragMouseEntered(Javax.Swing.Event.MenuDragMouseEvent ar void MenuDragMouseExitedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMenuDragMouseExited != null) OnMenuDragMouseExited.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMenuDragMouseExited != null) ? OnMenuDragMouseExited : MenuDragMouseExited; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -159,7 +162,8 @@ public virtual void MenuDragMouseExited(Javax.Swing.Event.MenuDragMouseEvent arg void MenuDragMouseReleasedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMenuDragMouseReleased != null) OnMenuDragMouseReleased.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMenuDragMouseReleased != null) ? OnMenuDragMouseReleased : MenuDragMouseReleased; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/MenuKeyListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/MenuKeyListener.cs index 42c6443204..16077cef06 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/MenuKeyListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/MenuKeyListener.cs @@ -83,9 +83,9 @@ public partial class MenuKeyListener : Javax.Swing.Event.IMenuKeyListener /// protected virtual void InitializeHandlers() { - AddEventHandler("menuKeyPressed", new System.EventHandler>>(MenuKeyPressedEventHandler)); OnMenuKeyPressed = MenuKeyPressed; - AddEventHandler("menuKeyReleased", new System.EventHandler>>(MenuKeyReleasedEventHandler)); OnMenuKeyReleased = MenuKeyReleased; - AddEventHandler("menuKeyTyped", new System.EventHandler>>(MenuKeyTypedEventHandler)); OnMenuKeyTyped = MenuKeyTyped; + AddEventHandler("menuKeyPressed", new System.EventHandler>>(MenuKeyPressedEventHandler)); + AddEventHandler("menuKeyReleased", new System.EventHandler>>(MenuKeyReleasedEventHandler)); + AddEventHandler("menuKeyTyped", new System.EventHandler>>(MenuKeyTypedEventHandler)); } @@ -96,7 +96,8 @@ protected virtual void InitializeHandlers() void MenuKeyPressedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMenuKeyPressed != null) OnMenuKeyPressed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMenuKeyPressed != null) ? OnMenuKeyPressed : MenuKeyPressed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -115,7 +116,8 @@ public virtual void MenuKeyPressed(Javax.Swing.Event.MenuKeyEvent arg0) void MenuKeyReleasedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMenuKeyReleased != null) OnMenuKeyReleased.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMenuKeyReleased != null) ? OnMenuKeyReleased : MenuKeyReleased; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -134,7 +136,8 @@ public virtual void MenuKeyReleased(Javax.Swing.Event.MenuKeyEvent arg0) void MenuKeyTypedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMenuKeyTyped != null) OnMenuKeyTyped.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMenuKeyTyped != null) ? OnMenuKeyTyped : MenuKeyTyped; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/MenuListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/MenuListener.cs index 38d00dc9d7..158dcc583d 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/MenuListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/MenuListener.cs @@ -83,9 +83,9 @@ public partial class MenuListener : Javax.Swing.Event.IMenuListener /// protected virtual void InitializeHandlers() { - AddEventHandler("menuCanceled", new System.EventHandler>>(MenuCanceledEventHandler)); OnMenuCanceled = MenuCanceled; - AddEventHandler("menuDeselected", new System.EventHandler>>(MenuDeselectedEventHandler)); OnMenuDeselected = MenuDeselected; - AddEventHandler("menuSelected", new System.EventHandler>>(MenuSelectedEventHandler)); OnMenuSelected = MenuSelected; + AddEventHandler("menuCanceled", new System.EventHandler>>(MenuCanceledEventHandler)); + AddEventHandler("menuDeselected", new System.EventHandler>>(MenuDeselectedEventHandler)); + AddEventHandler("menuSelected", new System.EventHandler>>(MenuSelectedEventHandler)); } @@ -96,7 +96,8 @@ protected virtual void InitializeHandlers() void MenuCanceledEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMenuCanceled != null) OnMenuCanceled.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMenuCanceled != null) ? OnMenuCanceled : MenuCanceled; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -115,7 +116,8 @@ public virtual void MenuCanceled(Javax.Swing.Event.MenuEvent arg0) void MenuDeselectedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMenuDeselected != null) OnMenuDeselected.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMenuDeselected != null) ? OnMenuDeselected : MenuDeselected; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -134,7 +136,8 @@ public virtual void MenuDeselected(Javax.Swing.Event.MenuEvent arg0) void MenuSelectedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMenuSelected != null) OnMenuSelected.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMenuSelected != null) ? OnMenuSelected : MenuSelected; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/MouseInputAdapter.cs b/src/net/JNet/Generated/Javax/Swing/Event/MouseInputAdapter.cs index 312e54353e..e5f3447073 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/MouseInputAdapter.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/MouseInputAdapter.cs @@ -50,14 +50,14 @@ public partial class MouseInputAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("mouseClicked", new System.EventHandler>>(MouseClickedEventHandler)); OnMouseClicked = MouseClicked; - AddEventHandler("mouseDragged", new System.EventHandler>>(MouseDraggedEventHandler)); OnMouseDragged = MouseDragged; - AddEventHandler("mouseEntered", new System.EventHandler>>(MouseEnteredEventHandler)); OnMouseEntered = MouseEntered; - AddEventHandler("mouseExited", new System.EventHandler>>(MouseExitedEventHandler)); OnMouseExited = MouseExited; - AddEventHandler("mouseMoved", new System.EventHandler>>(MouseMovedEventHandler)); OnMouseMoved = MouseMoved; - AddEventHandler("mousePressed", new System.EventHandler>>(MousePressedEventHandler)); OnMousePressed = MousePressed; - AddEventHandler("mouseReleased", new System.EventHandler>>(MouseReleasedEventHandler)); OnMouseReleased = MouseReleased; - AddEventHandler("mouseWheelMoved", new System.EventHandler>>(MouseWheelMovedEventHandler)); OnMouseWheelMoved = MouseWheelMoved; + AddEventHandler("mouseClicked", new System.EventHandler>>(MouseClickedEventHandler)); + AddEventHandler("mouseDragged", new System.EventHandler>>(MouseDraggedEventHandler)); + AddEventHandler("mouseEntered", new System.EventHandler>>(MouseEnteredEventHandler)); + AddEventHandler("mouseExited", new System.EventHandler>>(MouseExitedEventHandler)); + AddEventHandler("mouseMoved", new System.EventHandler>>(MouseMovedEventHandler)); + AddEventHandler("mousePressed", new System.EventHandler>>(MousePressedEventHandler)); + AddEventHandler("mouseReleased", new System.EventHandler>>(MouseReleasedEventHandler)); + AddEventHandler("mouseWheelMoved", new System.EventHandler>>(MouseWheelMovedEventHandler)); } @@ -68,7 +68,8 @@ protected virtual void InitializeHandlers() void MouseClickedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseClicked != null) OnMouseClicked.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseClicked != null) ? OnMouseClicked : MouseClicked; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -87,7 +88,8 @@ public virtual void MouseClicked(Java.Awt.EventNs.MouseEvent arg0) void MouseDraggedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseDragged != null) OnMouseDragged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseDragged != null) ? OnMouseDragged : MouseDragged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -106,7 +108,8 @@ public virtual void MouseDragged(Java.Awt.EventNs.MouseEvent arg0) void MouseEnteredEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseEntered != null) OnMouseEntered.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseEntered != null) ? OnMouseEntered : MouseEntered; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -125,7 +128,8 @@ public virtual void MouseEntered(Java.Awt.EventNs.MouseEvent arg0) void MouseExitedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseExited != null) OnMouseExited.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseExited != null) ? OnMouseExited : MouseExited; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -144,7 +148,8 @@ public virtual void MouseExited(Java.Awt.EventNs.MouseEvent arg0) void MouseMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseMoved != null) OnMouseMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseMoved != null) ? OnMouseMoved : MouseMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -163,7 +168,8 @@ public virtual void MouseMoved(Java.Awt.EventNs.MouseEvent arg0) void MousePressedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMousePressed != null) OnMousePressed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMousePressed != null) ? OnMousePressed : MousePressed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -182,7 +188,8 @@ public virtual void MousePressed(Java.Awt.EventNs.MouseEvent arg0) void MouseReleasedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseReleased != null) OnMouseReleased.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseReleased != null) ? OnMouseReleased : MouseReleased; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -201,7 +208,8 @@ public virtual void MouseReleased(Java.Awt.EventNs.MouseEvent arg0) void MouseWheelMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseWheelMoved != null) OnMouseWheelMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseWheelMoved != null) ? OnMouseWheelMoved : MouseWheelMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/MouseInputListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/MouseInputListener.cs index f2321ee61d..d955bffc4a 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/MouseInputListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/MouseInputListener.cs @@ -103,13 +103,13 @@ public partial class MouseInputListener : Javax.Swing.Event.IMouseInputListener /// protected virtual void InitializeHandlers() { - AddEventHandler("mouseClicked", new System.EventHandler>>(MouseClickedEventHandler)); OnMouseClicked = MouseClicked; - AddEventHandler("mouseEntered", new System.EventHandler>>(MouseEnteredEventHandler)); OnMouseEntered = MouseEntered; - AddEventHandler("mouseExited", new System.EventHandler>>(MouseExitedEventHandler)); OnMouseExited = MouseExited; - AddEventHandler("mousePressed", new System.EventHandler>>(MousePressedEventHandler)); OnMousePressed = MousePressed; - AddEventHandler("mouseReleased", new System.EventHandler>>(MouseReleasedEventHandler)); OnMouseReleased = MouseReleased; - AddEventHandler("mouseDragged", new System.EventHandler>>(MouseDraggedEventHandler)); OnMouseDragged = MouseDragged; - AddEventHandler("mouseMoved", new System.EventHandler>>(MouseMovedEventHandler)); OnMouseMoved = MouseMoved; + AddEventHandler("mouseClicked", new System.EventHandler>>(MouseClickedEventHandler)); + AddEventHandler("mouseEntered", new System.EventHandler>>(MouseEnteredEventHandler)); + AddEventHandler("mouseExited", new System.EventHandler>>(MouseExitedEventHandler)); + AddEventHandler("mousePressed", new System.EventHandler>>(MousePressedEventHandler)); + AddEventHandler("mouseReleased", new System.EventHandler>>(MouseReleasedEventHandler)); + AddEventHandler("mouseDragged", new System.EventHandler>>(MouseDraggedEventHandler)); + AddEventHandler("mouseMoved", new System.EventHandler>>(MouseMovedEventHandler)); } @@ -120,7 +120,8 @@ protected virtual void InitializeHandlers() void MouseClickedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseClicked != null) OnMouseClicked.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseClicked != null) ? OnMouseClicked : MouseClicked; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -139,7 +140,8 @@ public virtual void MouseClicked(Java.Awt.EventNs.MouseEvent arg0) void MouseEnteredEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseEntered != null) OnMouseEntered.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseEntered != null) ? OnMouseEntered : MouseEntered; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -158,7 +160,8 @@ public virtual void MouseEntered(Java.Awt.EventNs.MouseEvent arg0) void MouseExitedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseExited != null) OnMouseExited.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseExited != null) ? OnMouseExited : MouseExited; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -177,7 +180,8 @@ public virtual void MouseExited(Java.Awt.EventNs.MouseEvent arg0) void MousePressedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMousePressed != null) OnMousePressed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMousePressed != null) ? OnMousePressed : MousePressed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -196,7 +200,8 @@ public virtual void MousePressed(Java.Awt.EventNs.MouseEvent arg0) void MouseReleasedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseReleased != null) OnMouseReleased.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseReleased != null) ? OnMouseReleased : MouseReleased; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -215,7 +220,8 @@ public virtual void MouseReleased(Java.Awt.EventNs.MouseEvent arg0) void MouseDraggedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseDragged != null) OnMouseDragged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseDragged != null) ? OnMouseDragged : MouseDragged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -234,7 +240,8 @@ public virtual void MouseDragged(Java.Awt.EventNs.MouseEvent arg0) void MouseMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnMouseMoved != null) OnMouseMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnMouseMoved != null) ? OnMouseMoved : MouseMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/PopupMenuListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/PopupMenuListener.cs index 912e4c90b3..f9ba0ed332 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/PopupMenuListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/PopupMenuListener.cs @@ -83,9 +83,9 @@ public partial class PopupMenuListener : Javax.Swing.Event.IPopupMenuListener /// protected virtual void InitializeHandlers() { - AddEventHandler("popupMenuCanceled", new System.EventHandler>>(PopupMenuCanceledEventHandler)); OnPopupMenuCanceled = PopupMenuCanceled; - AddEventHandler("popupMenuWillBecomeInvisible", new System.EventHandler>>(PopupMenuWillBecomeInvisibleEventHandler)); OnPopupMenuWillBecomeInvisible = PopupMenuWillBecomeInvisible; - AddEventHandler("popupMenuWillBecomeVisible", new System.EventHandler>>(PopupMenuWillBecomeVisibleEventHandler)); OnPopupMenuWillBecomeVisible = PopupMenuWillBecomeVisible; + AddEventHandler("popupMenuCanceled", new System.EventHandler>>(PopupMenuCanceledEventHandler)); + AddEventHandler("popupMenuWillBecomeInvisible", new System.EventHandler>>(PopupMenuWillBecomeInvisibleEventHandler)); + AddEventHandler("popupMenuWillBecomeVisible", new System.EventHandler>>(PopupMenuWillBecomeVisibleEventHandler)); } @@ -96,7 +96,8 @@ protected virtual void InitializeHandlers() void PopupMenuCanceledEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPopupMenuCanceled != null) OnPopupMenuCanceled.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPopupMenuCanceled != null) ? OnPopupMenuCanceled : PopupMenuCanceled; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -115,7 +116,8 @@ public virtual void PopupMenuCanceled(Javax.Swing.Event.PopupMenuEvent arg0) void PopupMenuWillBecomeInvisibleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPopupMenuWillBecomeInvisible != null) OnPopupMenuWillBecomeInvisible.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPopupMenuWillBecomeInvisible != null) ? OnPopupMenuWillBecomeInvisible : PopupMenuWillBecomeInvisible; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -134,7 +136,8 @@ public virtual void PopupMenuWillBecomeInvisible(Javax.Swing.Event.PopupMenuEven void PopupMenuWillBecomeVisibleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnPopupMenuWillBecomeVisible != null) OnPopupMenuWillBecomeVisible.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnPopupMenuWillBecomeVisible != null) ? OnPopupMenuWillBecomeVisible : PopupMenuWillBecomeVisible; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/RowSorterListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/RowSorterListener.cs index 50312b9c98..657ee31737 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/RowSorterListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/RowSorterListener.cs @@ -73,7 +73,7 @@ public partial class RowSorterListener : Javax.Swing.Event.IRowSorterListener /// protected virtual void InitializeHandlers() { - AddEventHandler("sorterChanged", new System.EventHandler>>(SorterChangedEventHandler)); OnSorterChanged = SorterChanged; + AddEventHandler("sorterChanged", new System.EventHandler>>(SorterChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void SorterChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSorterChanged != null) OnSorterChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSorterChanged != null) ? OnSorterChanged : SorterChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/TableColumnModelListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/TableColumnModelListener.cs index c93356fd24..63da22fcd1 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/TableColumnModelListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/TableColumnModelListener.cs @@ -93,11 +93,11 @@ public partial class TableColumnModelListener : Javax.Swing.Event.ITableColumnMo /// protected virtual void InitializeHandlers() { - AddEventHandler("columnAdded", new System.EventHandler>>(ColumnAddedEventHandler)); OnColumnAdded = ColumnAdded; - AddEventHandler("columnMarginChanged", new System.EventHandler>>(ColumnMarginChangedEventHandler)); OnColumnMarginChanged = ColumnMarginChanged; - AddEventHandler("columnMoved", new System.EventHandler>>(ColumnMovedEventHandler)); OnColumnMoved = ColumnMoved; - AddEventHandler("columnRemoved", new System.EventHandler>>(ColumnRemovedEventHandler)); OnColumnRemoved = ColumnRemoved; - AddEventHandler("columnSelectionChanged", new System.EventHandler>>(ColumnSelectionChangedEventHandler)); OnColumnSelectionChanged = ColumnSelectionChanged; + AddEventHandler("columnAdded", new System.EventHandler>>(ColumnAddedEventHandler)); + AddEventHandler("columnMarginChanged", new System.EventHandler>>(ColumnMarginChangedEventHandler)); + AddEventHandler("columnMoved", new System.EventHandler>>(ColumnMovedEventHandler)); + AddEventHandler("columnRemoved", new System.EventHandler>>(ColumnRemovedEventHandler)); + AddEventHandler("columnSelectionChanged", new System.EventHandler>>(ColumnSelectionChangedEventHandler)); } @@ -108,7 +108,8 @@ protected virtual void InitializeHandlers() void ColumnAddedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnColumnAdded != null) OnColumnAdded.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnColumnAdded != null) ? OnColumnAdded : ColumnAdded; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -127,7 +128,8 @@ public virtual void ColumnAdded(Javax.Swing.Event.TableColumnModelEvent arg0) void ColumnMarginChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnColumnMarginChanged != null) OnColumnMarginChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnColumnMarginChanged != null) ? OnColumnMarginChanged : ColumnMarginChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -146,7 +148,8 @@ public virtual void ColumnMarginChanged(Javax.Swing.Event.ChangeEvent arg0) void ColumnMovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnColumnMoved != null) OnColumnMoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnColumnMoved != null) ? OnColumnMoved : ColumnMoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -165,7 +168,8 @@ public virtual void ColumnMoved(Javax.Swing.Event.TableColumnModelEvent arg0) void ColumnRemovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnColumnRemoved != null) OnColumnRemoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnColumnRemoved != null) ? OnColumnRemoved : ColumnRemoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -184,7 +188,8 @@ public virtual void ColumnRemoved(Javax.Swing.Event.TableColumnModelEvent arg0) void ColumnSelectionChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnColumnSelectionChanged != null) OnColumnSelectionChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnColumnSelectionChanged != null) ? OnColumnSelectionChanged : ColumnSelectionChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/TableModelListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/TableModelListener.cs index ba7e0c0e61..af4f07a154 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/TableModelListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/TableModelListener.cs @@ -73,7 +73,7 @@ public partial class TableModelListener : Javax.Swing.Event.ITableModelListener /// protected virtual void InitializeHandlers() { - AddEventHandler("tableChanged", new System.EventHandler>>(TableChangedEventHandler)); OnTableChanged = TableChanged; + AddEventHandler("tableChanged", new System.EventHandler>>(TableChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void TableChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTableChanged != null) OnTableChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnTableChanged != null) ? OnTableChanged : TableChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/TreeExpansionListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/TreeExpansionListener.cs index 31e04a9707..9923b0dd36 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/TreeExpansionListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/TreeExpansionListener.cs @@ -78,8 +78,8 @@ public partial class TreeExpansionListener : Javax.Swing.Event.ITreeExpansionLis /// protected virtual void InitializeHandlers() { - AddEventHandler("treeCollapsed", new System.EventHandler>>(TreeCollapsedEventHandler)); OnTreeCollapsed = TreeCollapsed; - AddEventHandler("treeExpanded", new System.EventHandler>>(TreeExpandedEventHandler)); OnTreeExpanded = TreeExpanded; + AddEventHandler("treeCollapsed", new System.EventHandler>>(TreeCollapsedEventHandler)); + AddEventHandler("treeExpanded", new System.EventHandler>>(TreeExpandedEventHandler)); } @@ -90,7 +90,8 @@ protected virtual void InitializeHandlers() void TreeCollapsedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTreeCollapsed != null) OnTreeCollapsed.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnTreeCollapsed != null) ? OnTreeCollapsed : TreeCollapsed; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -109,7 +110,8 @@ public virtual void TreeCollapsed(Javax.Swing.Event.TreeExpansionEvent arg0) void TreeExpandedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTreeExpanded != null) OnTreeExpanded.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnTreeExpanded != null) ? OnTreeExpanded : TreeExpanded; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/TreeModelListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/TreeModelListener.cs index 0f1d24d35a..fd91852502 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/TreeModelListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/TreeModelListener.cs @@ -88,10 +88,10 @@ public partial class TreeModelListener : Javax.Swing.Event.ITreeModelListener /// protected virtual void InitializeHandlers() { - AddEventHandler("treeNodesChanged", new System.EventHandler>>(TreeNodesChangedEventHandler)); OnTreeNodesChanged = TreeNodesChanged; - AddEventHandler("treeNodesInserted", new System.EventHandler>>(TreeNodesInsertedEventHandler)); OnTreeNodesInserted = TreeNodesInserted; - AddEventHandler("treeNodesRemoved", new System.EventHandler>>(TreeNodesRemovedEventHandler)); OnTreeNodesRemoved = TreeNodesRemoved; - AddEventHandler("treeStructureChanged", new System.EventHandler>>(TreeStructureChangedEventHandler)); OnTreeStructureChanged = TreeStructureChanged; + AddEventHandler("treeNodesChanged", new System.EventHandler>>(TreeNodesChangedEventHandler)); + AddEventHandler("treeNodesInserted", new System.EventHandler>>(TreeNodesInsertedEventHandler)); + AddEventHandler("treeNodesRemoved", new System.EventHandler>>(TreeNodesRemovedEventHandler)); + AddEventHandler("treeStructureChanged", new System.EventHandler>>(TreeStructureChangedEventHandler)); } @@ -102,7 +102,8 @@ protected virtual void InitializeHandlers() void TreeNodesChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTreeNodesChanged != null) OnTreeNodesChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnTreeNodesChanged != null) ? OnTreeNodesChanged : TreeNodesChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -121,7 +122,8 @@ public virtual void TreeNodesChanged(Javax.Swing.Event.TreeModelEvent arg0) void TreeNodesInsertedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTreeNodesInserted != null) OnTreeNodesInserted.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnTreeNodesInserted != null) ? OnTreeNodesInserted : TreeNodesInserted; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -140,7 +142,8 @@ public virtual void TreeNodesInserted(Javax.Swing.Event.TreeModelEvent arg0) void TreeNodesRemovedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTreeNodesRemoved != null) OnTreeNodesRemoved.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnTreeNodesRemoved != null) ? OnTreeNodesRemoved : TreeNodesRemoved; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -159,7 +162,8 @@ public virtual void TreeNodesRemoved(Javax.Swing.Event.TreeModelEvent arg0) void TreeStructureChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTreeStructureChanged != null) OnTreeStructureChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnTreeStructureChanged != null) ? OnTreeStructureChanged : TreeStructureChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/TreeSelectionListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/TreeSelectionListener.cs index c18a20a23a..3836dab57b 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/TreeSelectionListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/TreeSelectionListener.cs @@ -73,7 +73,7 @@ public partial class TreeSelectionListener : Javax.Swing.Event.ITreeSelectionLis /// protected virtual void InitializeHandlers() { - AddEventHandler("valueChanged", new System.EventHandler>>(ValueChangedEventHandler)); OnValueChanged = ValueChanged; + AddEventHandler("valueChanged", new System.EventHandler>>(ValueChangedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void ValueChangedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnValueChanged != null) OnValueChanged.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnValueChanged != null) ? OnValueChanged : ValueChanged; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/TreeWillExpandListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/TreeWillExpandListener.cs index 206094f2e7..e6f358739b 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/TreeWillExpandListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/TreeWillExpandListener.cs @@ -80,8 +80,8 @@ public partial class TreeWillExpandListener : Javax.Swing.Event.ITreeWillExpandL /// protected virtual void InitializeHandlers() { - AddEventHandler("treeWillCollapse", new System.EventHandler>>(TreeWillCollapseEventHandler)); OnTreeWillCollapse = TreeWillCollapse; - AddEventHandler("treeWillExpand", new System.EventHandler>>(TreeWillExpandEventHandler)); OnTreeWillExpand = TreeWillExpand; + AddEventHandler("treeWillCollapse", new System.EventHandler>>(TreeWillCollapseEventHandler)); + AddEventHandler("treeWillExpand", new System.EventHandler>>(TreeWillExpandEventHandler)); } @@ -92,7 +92,8 @@ protected virtual void InitializeHandlers() void TreeWillCollapseEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTreeWillCollapse != null) OnTreeWillCollapse.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnTreeWillCollapse != null) ? OnTreeWillCollapse : TreeWillCollapse; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -112,7 +113,8 @@ public virtual void TreeWillCollapse(Javax.Swing.Event.TreeExpansionEvent arg0) void TreeWillExpandEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnTreeWillExpand != null) OnTreeWillExpand.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnTreeWillExpand != null) ? OnTreeWillExpand : TreeWillExpand; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Swing/Event/UndoableEditListener.cs b/src/net/JNet/Generated/Javax/Swing/Event/UndoableEditListener.cs index 6e8eec0444..d68e7b6d1a 100644 --- a/src/net/JNet/Generated/Javax/Swing/Event/UndoableEditListener.cs +++ b/src/net/JNet/Generated/Javax/Swing/Event/UndoableEditListener.cs @@ -73,7 +73,7 @@ public partial class UndoableEditListener : Javax.Swing.Event.IUndoableEditListe /// protected virtual void InitializeHandlers() { - AddEventHandler("undoableEditHappened", new System.EventHandler>>(UndoableEditHappenedEventHandler)); OnUndoableEditHappened = UndoableEditHappened; + AddEventHandler("undoableEditHappened", new System.EventHandler>>(UndoableEditHappenedEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void UndoableEditHappenedEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnUndoableEditHappened != null) OnUndoableEditHappened.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnUndoableEditHappened != null) ? OnUndoableEditHappened : UndoableEditHappened; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Javax/Xml/Transform/ErrorListener.cs b/src/net/JNet/Generated/Javax/Xml/Transform/ErrorListener.cs index 4ea323886f..2d08c8b7be 100644 --- a/src/net/JNet/Generated/Javax/Xml/Transform/ErrorListener.cs +++ b/src/net/JNet/Generated/Javax/Xml/Transform/ErrorListener.cs @@ -86,9 +86,9 @@ public partial class ErrorListener : Javax.Xml.Transform.IErrorListener /// protected virtual void InitializeHandlers() { - AddEventHandler("error", new System.EventHandler>(ErrorEventHandler)); OnError = Error; - AddEventHandler("fatalError", new System.EventHandler>(FatalErrorEventHandler)); OnFatalError = FatalError; - AddEventHandler("warning", new System.EventHandler>(WarningEventHandler)); OnWarning = Warning; + AddEventHandler("error", new System.EventHandler>(ErrorEventHandler)); + AddEventHandler("fatalError", new System.EventHandler>(FatalErrorEventHandler)); + AddEventHandler("warning", new System.EventHandler>(WarningEventHandler)); } @@ -99,7 +99,8 @@ protected virtual void InitializeHandlers() void ErrorEventHandler(object sender, CLRListenerEventArgs data) { - if (OnError != null) OnError.Invoke(JVMBridgeException.New(data.EventData.EventData as MASES.JCOBridge.C2JBridge.JVMInterop.IJavaObject)); + var methodToExecute = (OnError != null) ? OnError : Error; + methodToExecute.Invoke(JVMBridgeException.New(data.EventData.EventData as MASES.JCOBridge.C2JBridge.JVMInterop.IJavaObject)); } /// @@ -119,7 +120,8 @@ public virtual void Error(MASES.JCOBridge.C2JBridge.JVMBridgeException arg0) void FatalErrorEventHandler(object sender, CLRListenerEventArgs data) { - if (OnFatalError != null) OnFatalError.Invoke(JVMBridgeException.New(data.EventData.EventData as MASES.JCOBridge.C2JBridge.JVMInterop.IJavaObject)); + var methodToExecute = (OnFatalError != null) ? OnFatalError : FatalError; + methodToExecute.Invoke(JVMBridgeException.New(data.EventData.EventData as MASES.JCOBridge.C2JBridge.JVMInterop.IJavaObject)); } /// @@ -139,7 +141,8 @@ public virtual void FatalError(MASES.JCOBridge.C2JBridge.JVMBridgeException arg0 void WarningEventHandler(object sender, CLRListenerEventArgs data) { - if (OnWarning != null) OnWarning.Invoke(JVMBridgeException.New(data.EventData.EventData as MASES.JCOBridge.C2JBridge.JVMInterop.IJavaObject)); + var methodToExecute = (OnWarning != null) ? OnWarning : Warning; + methodToExecute.Invoke(JVMBridgeException.New(data.EventData.EventData as MASES.JCOBridge.C2JBridge.JVMInterop.IJavaObject)); } /// diff --git a/src/net/JNet/Generated/Org/W3c/Dom/Events/EventListener.cs b/src/net/JNet/Generated/Org/W3c/Dom/Events/EventListener.cs index 70c3f1db18..b44be207a3 100644 --- a/src/net/JNet/Generated/Org/W3c/Dom/Events/EventListener.cs +++ b/src/net/JNet/Generated/Org/W3c/Dom/Events/EventListener.cs @@ -73,7 +73,7 @@ public partial class EventListener : Org.W3c.Dom.Events.IEventListener /// protected virtual void InitializeHandlers() { - AddEventHandler("handleEvent", new System.EventHandler>>(HandleEventEventHandler)); OnHandleEvent = HandleEvent; + AddEventHandler("handleEvent", new System.EventHandler>>(HandleEventEventHandler)); } @@ -84,7 +84,8 @@ protected virtual void InitializeHandlers() void HandleEventEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnHandleEvent != null) OnHandleEvent.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnHandleEvent != null) ? OnHandleEvent : HandleEvent; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// diff --git a/src/net/JNet/Generated/Org/Xml/Sax/Helpers/ParserAdapter.cs b/src/net/JNet/Generated/Org/Xml/Sax/Helpers/ParserAdapter.cs index 89bf9b9f9d..0510343976 100644 --- a/src/net/JNet/Generated/Org/Xml/Sax/Helpers/ParserAdapter.cs +++ b/src/net/JNet/Generated/Org/Xml/Sax/Helpers/ParserAdapter.cs @@ -50,27 +50,27 @@ public partial class ParserAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("getFeature", new System.EventHandler>>(GetFeatureEventHandler)); OnGetFeature = GetFeature; - AddEventHandler("getProperty", new System.EventHandler>>(GetPropertyEventHandler)); OnGetProperty = GetProperty; - AddEventHandler("getContentHandler", new System.EventHandler>(GetContentHandlerEventHandler)); OnGetContentHandler = GetContentHandler; - AddEventHandler("getDTDHandler", new System.EventHandler>(GetDTDHandlerEventHandler)); OnGetDTDHandler = GetDTDHandler; - AddEventHandler("getEntityResolver", new System.EventHandler>(GetEntityResolverEventHandler)); OnGetEntityResolver = GetEntityResolver; - AddEventHandler("getErrorHandler", new System.EventHandler>(GetErrorHandlerEventHandler)); OnGetErrorHandler = GetErrorHandler; - AddEventHandler("characters", new System.EventHandler>>(CharactersEventHandler)); OnCharacters = Characters; - AddEventHandler("endDocument", new System.EventHandler>(EndDocumentEventHandler)); OnEndDocument = EndDocument; - AddEventHandler("endElement", new System.EventHandler>>(EndElementEventHandler)); OnEndElement = EndElement; - AddEventHandler("ignorableWhitespace", new System.EventHandler>>(IgnorableWhitespaceEventHandler)); OnIgnorableWhitespace = IgnorableWhitespace; - AddEventHandler("parse", new System.EventHandler>>(ParseEventHandler)); OnParse = Parse; - AddEventHandler("parse1", new System.EventHandler>>(Parse1EventHandler)); OnParse1 = Parse; - AddEventHandler("processingInstruction", new System.EventHandler>>(ProcessingInstructionEventHandler)); OnProcessingInstruction = ProcessingInstruction; - AddEventHandler("setContentHandler", new System.EventHandler>>(SetContentHandlerEventHandler)); OnSetContentHandler = SetContentHandler; - AddEventHandler("setDocumentLocator", new System.EventHandler>>(SetDocumentLocatorEventHandler)); OnSetDocumentLocator = SetDocumentLocator; - AddEventHandler("setDTDHandler", new System.EventHandler>>(SetDTDHandlerEventHandler)); OnSetDTDHandler = SetDTDHandler; - AddEventHandler("setEntityResolver", new System.EventHandler>>(SetEntityResolverEventHandler)); OnSetEntityResolver = SetEntityResolver; - AddEventHandler("setErrorHandler", new System.EventHandler>>(SetErrorHandlerEventHandler)); OnSetErrorHandler = SetErrorHandler; - AddEventHandler("setFeature", new System.EventHandler>>(SetFeatureEventHandler)); OnSetFeature = SetFeature; - AddEventHandler("setProperty", new System.EventHandler>>(SetPropertyEventHandler)); OnSetProperty = SetProperty; - AddEventHandler("startDocument", new System.EventHandler>(StartDocumentEventHandler)); OnStartDocument = StartDocument; + AddEventHandler("getFeature", new System.EventHandler>>(GetFeatureEventHandler)); + AddEventHandler("getProperty", new System.EventHandler>>(GetPropertyEventHandler)); + AddEventHandler("getContentHandler", new System.EventHandler>(GetContentHandlerEventHandler)); + AddEventHandler("getDTDHandler", new System.EventHandler>(GetDTDHandlerEventHandler)); + AddEventHandler("getEntityResolver", new System.EventHandler>(GetEntityResolverEventHandler)); + AddEventHandler("getErrorHandler", new System.EventHandler>(GetErrorHandlerEventHandler)); + AddEventHandler("characters", new System.EventHandler>>(CharactersEventHandler)); + AddEventHandler("endDocument", new System.EventHandler>(EndDocumentEventHandler)); + AddEventHandler("endElement", new System.EventHandler>>(EndElementEventHandler)); + AddEventHandler("ignorableWhitespace", new System.EventHandler>>(IgnorableWhitespaceEventHandler)); + AddEventHandler("parse", new System.EventHandler>>(ParseEventHandler)); + AddEventHandler("parse1", new System.EventHandler>>(Parse1EventHandler)); + AddEventHandler("processingInstruction", new System.EventHandler>>(ProcessingInstructionEventHandler)); + AddEventHandler("setContentHandler", new System.EventHandler>>(SetContentHandlerEventHandler)); + AddEventHandler("setDocumentLocator", new System.EventHandler>>(SetDocumentLocatorEventHandler)); + AddEventHandler("setDTDHandler", new System.EventHandler>>(SetDTDHandlerEventHandler)); + AddEventHandler("setEntityResolver", new System.EventHandler>>(SetEntityResolverEventHandler)); + AddEventHandler("setErrorHandler", new System.EventHandler>>(SetErrorHandlerEventHandler)); + AddEventHandler("setFeature", new System.EventHandler>>(SetFeatureEventHandler)); + AddEventHandler("setProperty", new System.EventHandler>>(SetPropertyEventHandler)); + AddEventHandler("startDocument", new System.EventHandler>(StartDocumentEventHandler)); } @@ -81,11 +81,9 @@ protected virtual void InitializeHandlers() void GetFeatureEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnGetFeature != null) - { - var executionResult = OnGetFeature.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetFeature != null) ? OnGetFeature : GetFeature; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -107,11 +105,9 @@ public virtual bool GetFeature(string arg0) void GetPropertyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnGetProperty != null) - { - var executionResult = OnGetProperty.Invoke(data.EventData.TypedEventData); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetProperty != null) ? OnGetProperty : GetProperty; + var executionResult = methodToExecute.Invoke(data.EventData.TypedEventData); + data.SetReturnValue(executionResult); } /// @@ -133,11 +129,9 @@ public virtual object GetProperty(string arg0) void GetContentHandlerEventHandler(object sender, CLRListenerEventArgs data) { - if (OnGetContentHandler != null) - { - var executionResult = OnGetContentHandler.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetContentHandler != null) ? OnGetContentHandler : GetContentHandler; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -157,11 +151,9 @@ public virtual Org.Xml.Sax.ContentHandler GetContentHandler() void GetDTDHandlerEventHandler(object sender, CLRListenerEventArgs data) { - if (OnGetDTDHandler != null) - { - var executionResult = OnGetDTDHandler.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetDTDHandler != null) ? OnGetDTDHandler : GetDTDHandler; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -181,11 +173,9 @@ public virtual Org.Xml.Sax.DTDHandler GetDTDHandler() void GetEntityResolverEventHandler(object sender, CLRListenerEventArgs data) { - if (OnGetEntityResolver != null) - { - var executionResult = OnGetEntityResolver.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetEntityResolver != null) ? OnGetEntityResolver : GetEntityResolver; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -205,11 +195,9 @@ public virtual Org.Xml.Sax.EntityResolver GetEntityResolver() void GetErrorHandlerEventHandler(object sender, CLRListenerEventArgs data) { - if (OnGetErrorHandler != null) - { - var executionResult = OnGetErrorHandler.Invoke(); - data.SetReturnValue(executionResult); - } + var methodToExecute = (OnGetErrorHandler != null) ? OnGetErrorHandler : GetErrorHandler; + var executionResult = methodToExecute.Invoke(); + data.SetReturnValue(executionResult); } /// @@ -229,7 +217,8 @@ public virtual Org.Xml.Sax.ErrorHandler GetErrorHandler() void CharactersEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnCharacters != null) OnCharacters.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + var methodToExecute = (OnCharacters != null) ? OnCharacters : Characters; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); } /// @@ -251,7 +240,8 @@ public virtual void Characters(char[] arg0, int arg1, int arg2) void EndDocumentEventHandler(object sender, CLRListenerEventArgs data) { - if (OnEndDocument != null) OnEndDocument.Invoke(); + var methodToExecute = (OnEndDocument != null) ? OnEndDocument : EndDocument; + methodToExecute.Invoke(); } /// @@ -271,7 +261,8 @@ public virtual void EndDocument() void EndElementEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnEndElement != null) OnEndElement.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnEndElement != null) ? OnEndElement : EndElement; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -291,7 +282,8 @@ public virtual void EndElement(string arg0) void IgnorableWhitespaceEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnIgnorableWhitespace != null) OnIgnorableWhitespace.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + var methodToExecute = (OnIgnorableWhitespace != null) ? OnIgnorableWhitespace : IgnorableWhitespace; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); } /// @@ -313,7 +305,8 @@ public virtual void IgnorableWhitespace(char[] arg0, int arg1, int arg2) void ParseEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnParse != null) OnParse.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnParse != null) ? OnParse : Parse; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -334,7 +327,8 @@ public virtual void Parse(string arg0) void Parse1EventHandler(object sender, CLRListenerEventArgs> data) { - if (OnParse1 != null) OnParse1.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnParse1 != null) ? OnParse1 : Parse; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -355,7 +349,8 @@ public virtual void Parse(Org.Xml.Sax.InputSource arg0) void ProcessingInstructionEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnProcessingInstruction != null) OnProcessingInstruction.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnProcessingInstruction != null) ? OnProcessingInstruction : ProcessingInstruction; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -376,7 +371,8 @@ public virtual void ProcessingInstruction(string arg0, string arg1) void SetContentHandlerEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetContentHandler != null) OnSetContentHandler.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetContentHandler != null) ? OnSetContentHandler : SetContentHandler; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -395,7 +391,8 @@ public virtual void SetContentHandler(Org.Xml.Sax.ContentHandler arg0) void SetDocumentLocatorEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetDocumentLocator != null) OnSetDocumentLocator.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetDocumentLocator != null) ? OnSetDocumentLocator : SetDocumentLocator; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -414,7 +411,8 @@ public virtual void SetDocumentLocator(Org.Xml.Sax.Locator arg0) void SetDTDHandlerEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetDTDHandler != null) OnSetDTDHandler.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetDTDHandler != null) ? OnSetDTDHandler : SetDTDHandler; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -433,7 +431,8 @@ public virtual void SetDTDHandler(Org.Xml.Sax.DTDHandler arg0) void SetEntityResolverEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetEntityResolver != null) OnSetEntityResolver.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetEntityResolver != null) ? OnSetEntityResolver : SetEntityResolver; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -452,7 +451,8 @@ public virtual void SetEntityResolver(Org.Xml.Sax.EntityResolver arg0) void SetErrorHandlerEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetErrorHandler != null) OnSetErrorHandler.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetErrorHandler != null) ? OnSetErrorHandler : SetErrorHandler; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -471,7 +471,8 @@ public virtual void SetErrorHandler(Org.Xml.Sax.ErrorHandler arg0) void SetFeatureEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetFeature != null) OnSetFeature.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnSetFeature != null) ? OnSetFeature : SetFeature; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -493,7 +494,8 @@ public virtual void SetFeature(string arg0, bool arg1) void SetPropertyEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetProperty != null) OnSetProperty.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnSetProperty != null) ? OnSetProperty : SetProperty; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -515,7 +517,8 @@ public virtual void SetProperty(string arg0, object arg1) void StartDocumentEventHandler(object sender, CLRListenerEventArgs data) { - if (OnStartDocument != null) OnStartDocument.Invoke(); + var methodToExecute = (OnStartDocument != null) ? OnStartDocument : StartDocument; + methodToExecute.Invoke(); } /// diff --git a/src/net/JNet/Generated/Org/Xml/Sax/Helpers/XMLReaderAdapter.cs b/src/net/JNet/Generated/Org/Xml/Sax/Helpers/XMLReaderAdapter.cs index 1a64be2bbf..639089669c 100644 --- a/src/net/JNet/Generated/Org/Xml/Sax/Helpers/XMLReaderAdapter.cs +++ b/src/net/JNet/Generated/Org/Xml/Sax/Helpers/XMLReaderAdapter.cs @@ -50,23 +50,23 @@ public partial class XMLReaderAdapter /// protected virtual void InitializeHandlers() { - AddEventHandler("characters", new System.EventHandler>>(CharactersEventHandler)); OnCharacters = Characters; - AddEventHandler("endDocument", new System.EventHandler>(EndDocumentEventHandler)); OnEndDocument = EndDocument; - AddEventHandler("endElement", new System.EventHandler>>(EndElementEventHandler)); OnEndElement = EndElement; - AddEventHandler("endPrefixMapping", new System.EventHandler>>(EndPrefixMappingEventHandler)); OnEndPrefixMapping = EndPrefixMapping; - AddEventHandler("ignorableWhitespace", new System.EventHandler>>(IgnorableWhitespaceEventHandler)); OnIgnorableWhitespace = IgnorableWhitespace; - AddEventHandler("parse", new System.EventHandler>>(ParseEventHandler)); OnParse = Parse; - AddEventHandler("parse1", new System.EventHandler>>(Parse1EventHandler)); OnParse1 = Parse; - AddEventHandler("processingInstruction", new System.EventHandler>>(ProcessingInstructionEventHandler)); OnProcessingInstruction = ProcessingInstruction; - AddEventHandler("setDocumentLocator", new System.EventHandler>>(SetDocumentLocatorEventHandler)); OnSetDocumentLocator = SetDocumentLocator; - AddEventHandler("setDTDHandler", new System.EventHandler>>(SetDTDHandlerEventHandler)); OnSetDTDHandler = SetDTDHandler; - AddEventHandler("setEntityResolver", new System.EventHandler>>(SetEntityResolverEventHandler)); OnSetEntityResolver = SetEntityResolver; - AddEventHandler("setErrorHandler", new System.EventHandler>>(SetErrorHandlerEventHandler)); OnSetErrorHandler = SetErrorHandler; - AddEventHandler("setLocale", new System.EventHandler>>(SetLocaleEventHandler)); OnSetLocale = SetLocale; - AddEventHandler("skippedEntity", new System.EventHandler>>(SkippedEntityEventHandler)); OnSkippedEntity = SkippedEntity; - AddEventHandler("startDocument", new System.EventHandler>(StartDocumentEventHandler)); OnStartDocument = StartDocument; - AddEventHandler("startElement", new System.EventHandler>>(StartElementEventHandler)); OnStartElement = StartElement; - AddEventHandler("startPrefixMapping", new System.EventHandler>>(StartPrefixMappingEventHandler)); OnStartPrefixMapping = StartPrefixMapping; + AddEventHandler("characters", new System.EventHandler>>(CharactersEventHandler)); + AddEventHandler("endDocument", new System.EventHandler>(EndDocumentEventHandler)); + AddEventHandler("endElement", new System.EventHandler>>(EndElementEventHandler)); + AddEventHandler("endPrefixMapping", new System.EventHandler>>(EndPrefixMappingEventHandler)); + AddEventHandler("ignorableWhitespace", new System.EventHandler>>(IgnorableWhitespaceEventHandler)); + AddEventHandler("parse", new System.EventHandler>>(ParseEventHandler)); + AddEventHandler("parse1", new System.EventHandler>>(Parse1EventHandler)); + AddEventHandler("processingInstruction", new System.EventHandler>>(ProcessingInstructionEventHandler)); + AddEventHandler("setDocumentLocator", new System.EventHandler>>(SetDocumentLocatorEventHandler)); + AddEventHandler("setDTDHandler", new System.EventHandler>>(SetDTDHandlerEventHandler)); + AddEventHandler("setEntityResolver", new System.EventHandler>>(SetEntityResolverEventHandler)); + AddEventHandler("setErrorHandler", new System.EventHandler>>(SetErrorHandlerEventHandler)); + AddEventHandler("setLocale", new System.EventHandler>>(SetLocaleEventHandler)); + AddEventHandler("skippedEntity", new System.EventHandler>>(SkippedEntityEventHandler)); + AddEventHandler("startDocument", new System.EventHandler>(StartDocumentEventHandler)); + AddEventHandler("startElement", new System.EventHandler>>(StartElementEventHandler)); + AddEventHandler("startPrefixMapping", new System.EventHandler>>(StartPrefixMappingEventHandler)); } @@ -77,7 +77,8 @@ protected virtual void InitializeHandlers() void CharactersEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnCharacters != null) OnCharacters.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + var methodToExecute = (OnCharacters != null) ? OnCharacters : Characters; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); } /// @@ -99,7 +100,8 @@ public virtual void Characters(char[] arg0, int arg1, int arg2) void EndDocumentEventHandler(object sender, CLRListenerEventArgs data) { - if (OnEndDocument != null) OnEndDocument.Invoke(); + var methodToExecute = (OnEndDocument != null) ? OnEndDocument : EndDocument; + methodToExecute.Invoke(); } /// @@ -119,7 +121,8 @@ public virtual void EndDocument() void EndElementEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnEndElement != null) OnEndElement.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + var methodToExecute = (OnEndElement != null) ? OnEndElement : EndElement; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); } /// @@ -141,7 +144,8 @@ public virtual void EndElement(string arg0, string arg1, string arg2) void EndPrefixMappingEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnEndPrefixMapping != null) OnEndPrefixMapping.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnEndPrefixMapping != null) ? OnEndPrefixMapping : EndPrefixMapping; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -160,7 +164,8 @@ public virtual void EndPrefixMapping(string arg0) void IgnorableWhitespaceEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnIgnorableWhitespace != null) OnIgnorableWhitespace.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); + var methodToExecute = (OnIgnorableWhitespace != null) ? OnIgnorableWhitespace : IgnorableWhitespace; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1)); } /// @@ -182,7 +187,8 @@ public virtual void IgnorableWhitespace(char[] arg0, int arg1, int arg2) void ParseEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnParse != null) OnParse.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnParse != null) ? OnParse : Parse; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -203,7 +209,8 @@ public virtual void Parse(string arg0) void Parse1EventHandler(object sender, CLRListenerEventArgs> data) { - if (OnParse1 != null) OnParse1.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnParse1 != null) ? OnParse1 : Parse; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -224,7 +231,8 @@ public virtual void Parse(Org.Xml.Sax.InputSource arg0) void ProcessingInstructionEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnProcessingInstruction != null) OnProcessingInstruction.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnProcessingInstruction != null) ? OnProcessingInstruction : ProcessingInstruction; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } /// @@ -245,7 +253,8 @@ public virtual void ProcessingInstruction(string arg0, string arg1) void SetDocumentLocatorEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetDocumentLocator != null) OnSetDocumentLocator.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetDocumentLocator != null) ? OnSetDocumentLocator : SetDocumentLocator; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -264,7 +273,8 @@ public virtual void SetDocumentLocator(Org.Xml.Sax.Locator arg0) void SetDTDHandlerEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetDTDHandler != null) OnSetDTDHandler.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetDTDHandler != null) ? OnSetDTDHandler : SetDTDHandler; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -283,7 +293,8 @@ public virtual void SetDTDHandler(Org.Xml.Sax.DTDHandler arg0) void SetEntityResolverEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetEntityResolver != null) OnSetEntityResolver.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetEntityResolver != null) ? OnSetEntityResolver : SetEntityResolver; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -302,7 +313,8 @@ public virtual void SetEntityResolver(Org.Xml.Sax.EntityResolver arg0) void SetErrorHandlerEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetErrorHandler != null) OnSetErrorHandler.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetErrorHandler != null) ? OnSetErrorHandler : SetErrorHandler; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -321,7 +333,8 @@ public virtual void SetErrorHandler(Org.Xml.Sax.ErrorHandler arg0) void SetLocaleEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSetLocale != null) OnSetLocale.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSetLocale != null) ? OnSetLocale : SetLocale; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -341,7 +354,8 @@ public virtual void SetLocale(Java.Util.Locale arg0) void SkippedEntityEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnSkippedEntity != null) OnSkippedEntity.Invoke(data.EventData.TypedEventData); + var methodToExecute = (OnSkippedEntity != null) ? OnSkippedEntity : SkippedEntity; + methodToExecute.Invoke(data.EventData.TypedEventData); } /// @@ -361,7 +375,8 @@ public virtual void SkippedEntity(string arg0) void StartDocumentEventHandler(object sender, CLRListenerEventArgs data) { - if (OnStartDocument != null) OnStartDocument.Invoke(); + var methodToExecute = (OnStartDocument != null) ? OnStartDocument : StartDocument; + methodToExecute.Invoke(); } /// @@ -381,7 +396,8 @@ public virtual void StartDocument() void StartElementEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnStartElement != null) OnStartElement.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1), data.EventData.GetAt(2)); + var methodToExecute = (OnStartElement != null) ? OnStartElement : StartElement; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0), data.EventData.GetAt(1), data.EventData.GetAt(2)); } /// @@ -404,7 +420,8 @@ public virtual void StartElement(string arg0, string arg1, string arg2, Org.Xml. void StartPrefixMappingEventHandler(object sender, CLRListenerEventArgs> data) { - if (OnStartPrefixMapping != null) OnStartPrefixMapping.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); + var methodToExecute = (OnStartPrefixMapping != null) ? OnStartPrefixMapping : StartPrefixMapping; + methodToExecute.Invoke(data.EventData.TypedEventData, data.EventData.GetAt(0)); } ///