jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b7bab9aa8e70fee0c44411746e6955c14cd9701a
commit b7bab9aa8e70fee0c44411746e6955c14cd9701a Author: Jaehyun Cho <jae_hyun....@samsung.com> Date: Mon Sep 2 21:26:58 2019 +0900 csharp: add SetKeyValue and GetKeyValue to EoWrapper Summary: SetKeyValue adds a value object associated with a key object to hash table. GetKeyValue returns a value object associated with a key object from hash table. Reviewers: felipealmeida, lauromoura, vitor.sousa, woohyun, cedric Subscribers: zmike, bu5hm4n, segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9622 --- src/bindings/mono/eo_mono/EoWrapper.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs index c2ee5e2a31..688de85cae 100644 --- a/src/bindings/mono/eo_mono/EoWrapper.cs +++ b/src/bindings/mono/eo_mono/EoWrapper.cs @@ -3,6 +3,7 @@ using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Threading; using System.Reflection; +using System.Collections; namespace Efl { @@ -26,6 +27,7 @@ public abstract class EoWrapper : IWrapper, IDisposable private static Efl.EventCb ownershipUniqueDelegate = new Efl.EventCb(OwnershipUniqueCallback); private static Efl.EventCb ownershipSharedDelegate = new Efl.EventCb(OwnershipSharedCallback); + private Hashtable keyValueHash = null; /// <summary>Constructor to be used when objects are expected to be constructed from native code. /// For a class that inherited from an EFL# class to be properly constructed from native code @@ -322,6 +324,28 @@ public abstract class EoWrapper : IWrapper, IDisposable public IntPtr NativeHandle { get; private set; } } + /// <summary> + /// Set a value object associated with a key object. + /// </summary> + public void SetKeyValue(object key, object val) + { + if (keyValueHash == null) + keyValueHash = new Hashtable(); + + keyValueHash.Add(key, val); + } + + /// <summary> + /// Get a value object associated with a key object. + /// </summary> + public object GetKeyValue(object key) + { + if (keyValueHash == null) + return null; + + return keyValueHash[key]; + } + /// <summary>Wrapper for native methods and virtual method delegates. /// For internal use by generated code only.</summary> public abstract class NativeMethods : Efl.Eo.NativeClass --