summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2019-09-02 21:26:58 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2019-09-02 21:35:23 +0900
commitb7bab9aa8e70fee0c44411746e6955c14cd9701a (patch)
tree7df65e9c5d53a31838a0545c8e4632bcd3b7a294 /src/bindings/mono/eo_mono
parentac99e2ac9410d5b2ef6225fa1aaaf9ffcd6578fb (diff)
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
Diffstat (limited to 'src/bindings/mono/eo_mono')
-rw-r--r--src/bindings/mono/eo_mono/EoWrapper.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs
index c2ee5e2..688de85 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;
3using System.Runtime.CompilerServices; 3using System.Runtime.CompilerServices;
4using System.Threading; 4using System.Threading;
5using System.Reflection; 5using System.Reflection;
6using System.Collections;
6 7
7namespace Efl 8namespace Efl
8{ 9{
@@ -26,6 +27,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
26 private static Efl.EventCb ownershipUniqueDelegate = new Efl.EventCb(OwnershipUniqueCallback); 27 private static Efl.EventCb ownershipUniqueDelegate = new Efl.EventCb(OwnershipUniqueCallback);
27 private static Efl.EventCb ownershipSharedDelegate = new Efl.EventCb(OwnershipSharedCallback); 28 private static Efl.EventCb ownershipSharedDelegate = new Efl.EventCb(OwnershipSharedCallback);
28 29
30 private Hashtable keyValueHash = null;
29 31
30 /// <summary>Constructor to be used when objects are expected to be constructed from native code. 32 /// <summary>Constructor to be used when objects are expected to be constructed from native code.
31 /// For a class that inherited from an EFL# class to be properly constructed from native code 33 /// 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
322 public IntPtr NativeHandle { get; private set; } 324 public IntPtr NativeHandle { get; private set; }
323 } 325 }
324 326
327 /// <summary>
328 /// Set a value object associated with a key object.
329 /// </summary>
330 public void SetKeyValue(object key, object val)
331 {
332 if (keyValueHash == null)
333 keyValueHash = new Hashtable();
334
335 keyValueHash.Add(key, val);
336 }
337
338 /// <summary>
339 /// Get a value object associated with a key object.
340 /// </summary>
341 public object GetKeyValue(object key)
342 {
343 if (keyValueHash == null)
344 return null;
345
346 return keyValueHash[key];
347 }
348
325 /// <summary>Wrapper for native methods and virtual method delegates. 349 /// <summary>Wrapper for native methods and virtual method delegates.
326 /// For internal use by generated code only.</summary> 350 /// For internal use by generated code only.</summary>
327 public abstract class NativeMethods : Efl.Eo.NativeClass 351 public abstract class NativeMethods : Efl.Eo.NativeClass