using System;
using System.Runtime.InteropServices;
+using System.ComponentModel;
namespace Eina
{
/// <summary>
/// A Generic buffer designed to be a mutable string.
-///
-/// Since EFL 1.23.
+/// <para>Since EFL 1.23.</para>
/// </summary>
public class Binbuf : IDisposable
{
eina_binbuf_slice_get(IntPtr buf);
/// <summary>Pointer to the native buffer.</summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
public IntPtr Handle {get;set;} = IntPtr.Zero;
- ///<summary>Whether this wrapper owns the native buffer.</summary>
+ /// <summary>Whether this wrapper owns the native buffer.
+ /// <para>Since EFL 1.23.</para>
+ /// </summary>
public bool Own {get;set;}
- /// <summary> Length of the buffer.</summary>
+ /// <summary> Length of the buffer.
+ /// <para>Since EFL 1.23.</para>
+ /// </summary>
public int Length
{
get { return (int)GetLength(); }
/// <summary>
/// Create a new buffer.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
public Binbuf()
{
InitNew();
}
+ /// <summary>
+ /// Create a new buffer.
+ /// <para>Since EFL 1.23.</para>
+ /// </summary>
public Binbuf(byte[] str, uint? length = null)
{
InitNew();
/// <summary>
/// Create a new buffer with elements.
/// </summary>
+ /// <para>Since EFL 1.23.</para>
/// <param name="bb">Elements to initialize the new buffer.</param>
public Binbuf(Binbuf bb)
{
/// </summary>
/// <param name="handle">The native handle to be wrapped.</param>
/// <param name="own">Whether this wrapper owns the native handle.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Binbuf(IntPtr handle, bool own)
{
Handle = handle;
Dispose(false);
}
- /// <summary>Disposes of this wrapper, releasing the native buffer if owned.</summary>
- /// <param name="disposing">True if this was called from <see cref="Dispose()"/> public method. False if
+ /// <summary>Disposes of this wrapper, releasing the native buffer if owned.
+ /// <para>Since EFL 1.23.</para>
+ /// </summary>
+ /// <param name="disposing">True if this was called from
+ /// <see cref="Dispose()"/> public method. False if
/// called from the C# finalizer.</param>
protected virtual void Dispose(bool disposing)
{
}
}
- /// <summary>Releases the native resources held by this instance.</summary>
+ /// <summary>Releases the native resources held by this instance.
+ /// <para>Since EFL 1.23.</para>
+ /// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
- /// <summary>Releases the native resources held by this instance.</summary>
+ /// <summary>Releases the native resources held by this instance.
+ /// <para>Since EFL 1.23.</para>
+ /// </summary>
public void Free()
{
Dispose();
/// <summary>
/// Releases the native buffer.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <returns>The native buffer.</returns>
public IntPtr Release()
/// <summary>
/// Resets the buffer.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
public void Reset()
{
}
/// <summary>
- /// 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.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="str">The string buffer.</param>
/// <returns>true on success, false if data could not be appended.</returns>
}
/// <summary>
- /// Appends a string of exact length to the buffer, reallocating as necessary.
+ /// Appends a string of exact length to the buffer, reallocating
+ /// as necessary.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="str">The string buffer.</param>
/// <param name="length">The exact length to use.</param>
/// <summary>
/// Appends a Binbuf to the buffer.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="bb">The buffer to be appended.</param>
/// <returns>true on success, false if data could not be appended.</returns>
/// <summary>
/// Appends a character to the buffer, reallocating as necessary.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="c">The char to appended.</param>
/// <returns>true on success, false if data could not be appended.</returns>
/// <summary>
/// Appends a slice to the buffer, reallocating as necessary.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="slice">The slice to appended.</param>
/// <returns>true on success, false if data could not be appended.</returns>
}
/// <summary>
- /// 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.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="str">The string buffer.</param>
/// <param name="pos">The position to insert the string.</param>
}
/// <summary>
- /// Inserts a string of exact length into the buffer, reallocating as necessary.
+ /// Inserts a string of exact length into the buffer,
+ /// reallocating as necessary.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="str">The string buffer.</param>
/// <param name="length">The exact length to use.</param>
/// <summary>
/// Inserts a character into the buffer, reallocating as necessary.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="c">The char to appended.</param>
/// <param name="pos">The position to insert the string.</param>
/// <summary>
/// Inserts a slice into the buffer, reallocating as necessary.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="slice">The slice to appended.</param>
/// <param name="pos">The position to insert the string.</param>
/// <summary>
/// Removes a slice of the buffer.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="start">The initial (inclusive) slice position to start
/// removing, in bytes.</param>
/// <summary>
/// Retrieves a string to the contents of the buffer.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
/// <returns>The string that is contained in buffer.</returns>
public byte[] GetBytes()
/// Retrieves a string to the contents of the buffer.
/// </summary>
/// <returns>The string that is contained in buffer.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
public IntPtr GetStringNative()
{
return eina_binbuf_string_get(Handle);
/// <summary>
/// Frees the buffer.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
public void FreeString()
{
/// <summary>
/// Retrieves the length of the buffer's contents.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
public UIntPtr GetLength()
{
/// <summary>
/// Gets a slice of the buffer's contents.
+ /// <para>Since EFL 1.23.</para>
/// </summary>
Eina.Slice GetSlice()
{