From 85c57500ea8cbbea1ecb7b489060df8855ed1387 Mon Sep 17 00:00:00 2001 From: Bruno da Silva Belo Date: Tue, 8 Oct 2019 22:05:34 -0300 Subject: [PATCH] csharp: updating eina_binbuf docs and hide api. Reviewers: felipealmeida, lauromoura, segfaultxavi, woohyun Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8293 Differential Revision: https://phab.enlightenment.org/D10310 --- src/bindings/mono/eina_mono/eina_binbuf.cs | 64 ++++++++++++++++++---- 1 file changed, 52 insertions(+), 12 deletions(-) diff --git a/src/bindings/mono/eina_mono/eina_binbuf.cs b/src/bindings/mono/eina_mono/eina_binbuf.cs index e2c2d8436a..63b42e239d 100644 --- a/src/bindings/mono/eina_mono/eina_binbuf.cs +++ b/src/bindings/mono/eina_mono/eina_binbuf.cs @@ -2,14 +2,14 @@ using System; using System.Runtime.InteropServices; +using System.ComponentModel; namespace Eina { /// /// A Generic buffer designed to be a mutable string. -/// -/// Since EFL 1.23. +/// Since EFL 1.23. /// public class Binbuf : IDisposable { @@ -45,11 +45,16 @@ public class Binbuf : IDisposable eina_binbuf_slice_get(IntPtr buf); /// Pointer to the native buffer. + [EditorBrowsable(EditorBrowsableState.Never)] public IntPtr Handle {get;set;} = IntPtr.Zero; - ///Whether this wrapper owns the native buffer. + /// Whether this wrapper owns the native buffer. + /// Since EFL 1.23. + /// public bool Own {get;set;} - /// Length of the buffer. + /// Length of the buffer. + /// Since EFL 1.23. + /// public int Length { get { return (int)GetLength(); } @@ -67,12 +72,17 @@ public class Binbuf : IDisposable /// /// Create a new buffer. + /// Since EFL 1.23. /// public Binbuf() { InitNew(); } + /// + /// Create a new buffer. + /// Since EFL 1.23. + /// public Binbuf(byte[] str, uint? length = null) { InitNew(); @@ -90,6 +100,7 @@ public class Binbuf : IDisposable /// /// Create a new buffer with elements. /// + /// Since EFL 1.23. /// Elements to initialize the new buffer. public Binbuf(Binbuf bb) { @@ -106,6 +117,7 @@ public class Binbuf : IDisposable /// /// The native handle to be wrapped. /// Whether this wrapper owns the native handle. + [EditorBrowsable(EditorBrowsableState.Never)] public Binbuf(IntPtr handle, bool own) { Handle = handle; @@ -117,8 +129,11 @@ public class Binbuf : IDisposable Dispose(false); } - /// Disposes of this wrapper, releasing the native buffer if owned. - /// True if this was called from public method. False if + /// Disposes of this wrapper, releasing the native buffer if owned. + /// Since EFL 1.23. + /// + /// True if this was called from + /// public method. False if /// called from the C# finalizer. protected virtual void Dispose(bool disposing) { @@ -137,14 +152,18 @@ public class Binbuf : IDisposable } } - /// Releases the native resources held by this instance. + /// Releases the native resources held by this instance. + /// Since EFL 1.23. + /// public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } - /// Releases the native resources held by this instance. + /// Releases the native resources held by this instance. + /// Since EFL 1.23. + /// public void Free() { Dispose(); @@ -152,6 +171,7 @@ public class Binbuf : IDisposable /// /// Releases the native buffer. + /// Since EFL 1.23. /// /// The native buffer. public IntPtr Release() @@ -163,6 +183,7 @@ public class Binbuf : IDisposable /// /// Resets the buffer. + /// Since EFL 1.23. /// public void Reset() { @@ -170,7 +191,9 @@ public class Binbuf : IDisposable } /// - /// Appends a string of inputed buffer's length to the buffer, reallocating as necessary. + /// Appends a string of inputed buffer's length to the buffer, + /// reallocating as necessary. + /// Since EFL 1.23. /// /// The string buffer. /// true on success, false if data could not be appended. @@ -180,7 +203,9 @@ public class Binbuf : IDisposable } /// - /// Appends a string of exact length to the buffer, reallocating as necessary. + /// Appends a string of exact length to the buffer, reallocating + /// as necessary. + /// Since EFL 1.23. /// /// The string buffer. /// The exact length to use. @@ -192,6 +217,7 @@ public class Binbuf : IDisposable /// /// Appends a Binbuf to the buffer. + /// Since EFL 1.23. /// /// The buffer to be appended. /// true on success, false if data could not be appended. @@ -202,6 +228,7 @@ public class Binbuf : IDisposable /// /// Appends a character to the buffer, reallocating as necessary. + /// Since EFL 1.23. /// /// The char to appended. /// true on success, false if data could not be appended. @@ -212,6 +239,7 @@ public class Binbuf : IDisposable /// /// Appends a slice to the buffer, reallocating as necessary. + /// Since EFL 1.23. /// /// The slice to appended. /// true on success, false if data could not be appended. @@ -221,7 +249,9 @@ public class Binbuf : IDisposable } /// - /// Inserts a string of inputed buffer's length into the buffer, reallocating as necessary. + /// Inserts a string of inputed buffer's length into the buffer, + /// reallocating as necessary. + /// Since EFL 1.23. /// /// The string buffer. /// The position to insert the string. @@ -232,7 +262,9 @@ public class Binbuf : IDisposable } /// - /// Inserts a string of exact length into the buffer, reallocating as necessary. + /// Inserts a string of exact length into the buffer, + /// reallocating as necessary. + /// Since EFL 1.23. /// /// The string buffer. /// The exact length to use. @@ -245,6 +277,7 @@ public class Binbuf : IDisposable /// /// Inserts a character into the buffer, reallocating as necessary. + /// Since EFL 1.23. /// /// The char to appended. /// The position to insert the string. @@ -256,6 +289,7 @@ public class Binbuf : IDisposable /// /// Inserts a slice into the buffer, reallocating as necessary. + /// Since EFL 1.23. /// /// The slice to appended. /// The position to insert the string. @@ -267,6 +301,7 @@ public class Binbuf : IDisposable /// /// Removes a slice of the buffer. + /// Since EFL 1.23. /// /// The initial (inclusive) slice position to start /// removing, in bytes. @@ -280,6 +315,7 @@ public class Binbuf : IDisposable /// /// Retrieves a string to the contents of the buffer. + /// Since EFL 1.23. /// /// The string that is contained in buffer. public byte[] GetBytes() @@ -300,6 +336,7 @@ public class Binbuf : IDisposable /// Retrieves a string to the contents of the buffer. /// /// The string that is contained in buffer. + [EditorBrowsable(EditorBrowsableState.Never)] public IntPtr GetStringNative() { return eina_binbuf_string_get(Handle); @@ -307,6 +344,7 @@ public class Binbuf : IDisposable /// /// Frees the buffer. + /// Since EFL 1.23. /// public void FreeString() { @@ -315,6 +353,7 @@ public class Binbuf : IDisposable /// /// Retrieves the length of the buffer's contents. + /// Since EFL 1.23. /// public UIntPtr GetLength() { @@ -323,6 +362,7 @@ public class Binbuf : IDisposable /// /// Gets a slice of the buffer's contents. + /// Since EFL 1.23. /// Eina.Slice GetSlice() {