summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno da Silva Belo <brunodasilvabelo@gmail.com>2019-10-17 15:39:47 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-17 15:51:13 -0300
commit6162b1a23e55100f88aeaf04fa751b3195c2eaea (patch)
tree84c4c1ca4b0d1150b7581795d42bcf74896961d1
parent62a773c17e71e297b816bb902b560daa1005619a (diff)
csharp: updating eldbus_proxy doc and hide api.
Summary: ref T8361 Reviewers: lauromoura, felipealmeida, segfaultxavi, woohyun Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8361 Differential Revision: https://phab.enlightenment.org/D10428
-rw-r--r--src/bindings/mono/eldbus_mono/eldbus_proxy.cs35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/bindings/mono/eldbus_mono/eldbus_proxy.cs b/src/bindings/mono/eldbus_mono/eldbus_proxy.cs
index 2d692cd..6b4c68e 100644
--- a/src/bindings/mono/eldbus_mono/eldbus_proxy.cs
+++ b/src/bindings/mono/eldbus_mono/eldbus_proxy.cs
@@ -2,12 +2,14 @@
2 2
3using System; 3using System;
4using System.Runtime.InteropServices; 4using System.Runtime.InteropServices;
5using System.ComponentModel;
5 6
6using static eldbus.EldbusProxyNativeFunctions; 7using static eldbus.EldbusProxyNativeFunctions;
7 8
8namespace eldbus 9namespace eldbus
9{ 10{
10 11
12[EditorBrowsable(EditorBrowsableState.Never)]
11public static class EldbusProxyNativeFunctions 13public static class EldbusProxyNativeFunctions
12{ 14{
13 [DllImport(efl.Libs.Eldbus)] public static extern IntPtr 15 [DllImport(efl.Libs.Eldbus)] public static extern IntPtr
@@ -66,12 +68,15 @@ public static class EldbusProxyNativeFunctions
66} 68}
67 69
68/// <summary>Represents a DBus proxy object. 70/// <summary>Represents a DBus proxy object.
69/// 71/// <para>Since EFL 1.23.</para>
70/// Since EFL 1.23.
71/// </summary> 72/// </summary>
72public class Proxy : IDisposable 73public class Proxy : IDisposable
73{ 74{
75 [EditorBrowsable(EditorBrowsableState.Never)]
74 public IntPtr Handle {get;set;} = IntPtr.Zero; 76 public IntPtr Handle {get;set;} = IntPtr.Zero;
77 /// <summary>Whether this managed list owns the native one.
78 /// <para>Since EFL 1.23.</para>
79 /// </summary>
75 public bool Own {get;set;} = true; 80 public bool Own {get;set;} = true;
76 81
77 private void InitNew(IntPtr handle, bool own) 82 private void InitNew(IntPtr handle, bool own)
@@ -89,21 +94,36 @@ public class Proxy : IDisposable
89 } 94 }
90 } 95 }
91 96
97 [EditorBrowsable(EditorBrowsableState.Never)]
92 public Proxy(IntPtr handle, bool own) 98 public Proxy(IntPtr handle, bool own)
93 { 99 {
94 InitNew(handle, own); 100 InitNew(handle, own);
95 } 101 }
96 102
103 /// <summary>
104 /// Constructor
105 /// <para>Since EFL 1.23.</para>
106 /// </summary>
107 /// <param name="obj">The <see cref="eldbus.Object" />.</param>
108 /// <param name="_interface">The interface name.</param>
97 public Proxy(eldbus.Object obj, string _interface) 109 public Proxy(eldbus.Object obj, string _interface)
98 { 110 {
99 InitNew(eldbus_proxy_get(obj.Handle, _interface), true); 111 InitNew(eldbus_proxy_get(obj.Handle, _interface), true);
100 } 112 }
101 113
114 /// <summary>Finalizes with garbage collector.
115 /// <para>Since EFL 1.23.</para>
116 /// </summary>
102 ~Proxy() 117 ~Proxy()
103 { 118 {
104 Dispose(false); 119 Dispose(false);
105 } 120 }
106 121
122 /// <summary>Disposes of this list.
123 /// <para>Since EFL 1.23.</para>
124 /// </summary>
125 /// <param name="disposing">Whether this was called from the finalizer (<c>false</c>) or from the
126 /// <see cref="Dispose()"/> method.</param>
107 protected virtual void Dispose(bool disposing) 127 protected virtual void Dispose(bool disposing)
108 { 128 {
109 IntPtr h = Handle; 129 IntPtr h = Handle;
@@ -126,17 +146,28 @@ public class Proxy : IDisposable
126 } 146 }
127 } 147 }
128 148
149 /// <summary>Disposes of this list.
150 /// <para>Since EFL 1.23.</para>
151 /// </summary>
129 public void Dispose() 152 public void Dispose()
130 { 153 {
131 Dispose(true); 154 Dispose(true);
132 GC.SuppressFinalize(this); 155 GC.SuppressFinalize(this);
133 } 156 }
134 157
158 /// <summary>Releases the native resources held by this instance.
159 /// <para>Since EFL 1.23.</para>
160 /// </summary>
135 public void Free() 161 public void Free()
136 { 162 {
137 Dispose(); 163 Dispose();
138 } 164 }
139 165
166 /// <summary>
167 /// Releases the native handler.
168 /// <para>Since EFL 1.23.</para>
169 /// </summary>
170 /// <returns>The native handler.</returns>
140 public IntPtr Release() 171 public IntPtr Release()
141 { 172 {
142 IntPtr h = Handle; 173 IntPtr h = Handle;