From 6162b1a23e55100f88aeaf04fa751b3195c2eaea Mon Sep 17 00:00:00 2001 From: Bruno da Silva Belo Date: Thu, 17 Oct 2019 15:39:47 -0300 Subject: [PATCH] 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 } /// Represents a DBus proxy object. -/// -/// Since EFL 1.23. +/// Since EFL 1.23. /// public class Proxy : IDisposable { + [EditorBrowsable(EditorBrowsableState.Never)] public IntPtr Handle {get;set;} = IntPtr.Zero; + /// Whether this managed list owns the native one. + /// Since EFL 1.23. + /// 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); } + /// + /// Constructor + /// Since EFL 1.23. + /// + /// The . + /// The interface name. public Proxy(eldbus.Object obj, string _interface) { InitNew(eldbus_proxy_get(obj.Handle, _interface), true); } + /// Finalizes with garbage collector. + /// Since EFL 1.23. + /// ~Proxy() { Dispose(false); } + /// Disposes of this list. + /// Since EFL 1.23. + /// + /// Whether this was called from the finalizer (false) or from the + /// method. protected virtual void Dispose(bool disposing) { IntPtr h = Handle; @@ -126,17 +146,28 @@ public class Proxy : IDisposable } } + /// Disposes of this list. + /// Since EFL 1.23. + /// public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } + /// Releases the native resources held by this instance. + /// Since EFL 1.23. + /// public void Free() { Dispose(); } + /// + /// Releases the native handler. + /// Since EFL 1.23. + /// + /// The native handler. public IntPtr Release() { IntPtr h = Handle;