Click or drag to resize

CLREventData Class

Base class for event information. Extend this to manage event associated data
Inheritance Hierarchy
SystemObject
  MASES.JCOBridge.C2JBridgeCLREventData
    MASES.JCOBridge.C2JBridgeCLREventDataTObject

Namespace: MASES.JCOBridge.C2JBridge
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.9.260611-9a148513a79c26cdd7f1dde468f4f9e06ef3bc7e
Syntax
public class CLREventData : IDisposable

The CLREventData type exposes the following members.

Constructors
 NameDescription
Public methodCLREventData Initialize a new instance of CLREventData
Top
Properties
 NameDescription
Protected propertyDoNotDisposeEventData Override to return to prevent automatic disposal of EventData when Dispose is called on this instance. Default is .
Public propertyDynEventData Dynamic accessor to the information about event information received from the JVM
Public propertyDynExtraData A dynamic array of extra information ordered with the same order of the caller, or null if HasExtraData is
Public propertyEventData Accessor to the information about event information received from the JVM
Public propertyExtraData An array of extra information ordered with the same order of the caller, or null if HasExtraData is
Public propertyExtraDataLength Returns how many Object contains extra information.
Public propertyHasExtraData True if the event has other objects associated
Public propertyItem Returns the indexed IJavaObject
Top
Methods
 NameDescription
Protected methodCheckDisposed Test if this instance was disposed
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean) Implements the pattern described in https://learn.microsoft.com/en-en/dotnet/standard/garbage-collection/implementing-dispose
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Finalizer
(Overrides ObjectFinalize)
Public methodGetAt Returns the indexed IJavaObject
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodConvertTReturn Converts a generic object
(Defined by JCOBridgeExtensions)
Public Extension MethodToTObject Converts data associated to CLREventData into TObject
(Defined by JCOBridgeExtensions)
Public Extension MethodToTObject Converts extra data associated to CLREventData into TObject
(Defined by JCOBridgeExtensions)
Public Extension MethodToNative Converts a generic input to an object manageable from the JVM
(Defined by JCOBridgeExtensions)
Top
Example
The following is the implementation of the Java EventObject class.
It will be used as typeparam of CLRListenerEventArgsTDataClass for the event CLRActionListener
C#
public class CLREventObjectData : CLREventData
{
   public CLREventObjectData(object actionData)
        : base(actionData)
   {
   }

   public dynamic Source { get { return DynEventData.getSource(); } }

   public override string ToString()
   {
       return DynEventData.toString();
   }
}
See Also