lauromoura pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6162b1a23e55100f88aeaf04fa751b3195c2eaea
commit 6162b1a23e55100f88aeaf04fa751b3195c2eaea Author: Bruno da Silva Belo <[email protected]> Date: Thu Oct 17 15:39:47 2019 -0300 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 --- src/bindings/mono/eldbus_mono/eldbus_proxy.cs | 35 +++++++++++++++++++++++++-- 1 file 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 2d692cdd65..6b4c68e5c9 100644 --- a/src/bindings/mono/eldbus_mono/eldbus_proxy.cs +++ b/src/bindings/mono/eldbus_mono/eldbus_proxy.cs @@ -2,12 +2,14 @@ using System; using System.Runtime.InteropServices; +using System.ComponentModel; using static eldbus.EldbusProxyNativeFunctions; namespace eldbus { +[EditorBrowsable(EditorBrowsableState.Never)] public static class EldbusProxyNativeFunctions { [DllImport(efl.Libs.Eldbus)] public static extern IntPtr @@ -66,12 +68,15 @@ public static class EldbusProxyNativeFunctions } /// <summary>Represents a DBus proxy object. -/// -/// Since EFL 1.23. +/// <para>Since EFL 1.23.</para> /// </summary> public class Proxy : IDisposable { + [EditorBrowsable(EditorBrowsableState.Never)] public IntPtr Handle {get;set;} = IntPtr.Zero; + /// <summary>Whether this managed list owns the native one. + /// <para>Since EFL 1.23.</para> + /// </summary> public bool Own {get;set;} = true; private void InitNew(IntPtr handle, bool own) @@ -89,21 +94,36 @@ public class Proxy : IDisposable } } + [EditorBrowsable(EditorBrowsableState.Never)] public Proxy(IntPtr handle, bool own) { InitNew(handle, own); } + /// <summary> + /// Constructor + /// <para>Since EFL 1.23.</para> + /// </summary> + /// <param name="obj">The <see cref="eldbus.Object" />.</param> + /// <param name="_interface">The interface name.</param> public Proxy(eldbus.Object obj, string _interface) { InitNew(eldbus_proxy_get(obj.Handle, _interface), true); } + /// <summary>Finalizes with garbage collector. + /// <para>Since EFL 1.23.</para> + /// </summary> ~Proxy() { Dispose(false); } + /// <summary>Disposes of this list. + /// <para>Since EFL 1.23.</para> + /// </summary> + /// <param name="disposing">Whether this was called from the finalizer (<c>false</c>) or from the + /// <see cref="Dispose()"/> method.</param> protected virtual void Dispose(bool disposing) { IntPtr h = Handle; @@ -126,17 +146,28 @@ public class Proxy : IDisposable } } + /// <summary>Disposes of this list. + /// <para>Since EFL 1.23.</para> + /// </summary> public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } + /// <summary>Releases the native resources held by this instance. + /// <para>Since EFL 1.23.</para> + /// </summary> public void Free() { Dispose(); } + /// <summary> + /// Releases the native handler. + /// <para>Since EFL 1.23.</para> + /// </summary> + /// <returns>The native handler.</returns> public IntPtr Release() { IntPtr h = Handle; --
