csharp: fix some build warnings related with incorrect and missing documentation

Summary:
Some parameter names, tag names and cref identifiers in the documentation were
incorrect and causing warnings during compilation.
There were also warnings related with missing documentation in publicly
visible elements in the manual binding.

This commit fixes these incorrections and adds documentation to the manual
binding in order to solve these compilation warnings.

Warnings related with missing documentation in `.eo` files are still present.

Test Plan: Just compile with mono binding.

Reviewers: lauromoura, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9243
This commit is contained in:
Vitor Sousa 2019-07-08 17:18:47 +02:00 committed by Xavi Artigas
parent ec7bc0eddd
commit ec501a6623
4 changed files with 66 additions and 39 deletions

View File

@ -214,6 +214,7 @@ struct klass
<< scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n"
<< scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n"
<< scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n"
<< scope_tab << "/// <param name=\"wh\">The native pointer to be wrapped.</param>\n"
<< scope_tab << "private " << concrete_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
<< scope_tab << "{\n"
<< scope_tab << "}\n\n"
@ -510,7 +511,7 @@ struct klass
<< scope_tab << "}\n\n"
<< scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
<< scope_tab << "/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n"
<< scope_tab << "/// <param name=\"raw\">The native pointer to be wrapped.</param>\n"
<< scope_tab << "/// <param name=\"wh\">The native pointer to be wrapped.</param>\n"
<< scope_tab << "protected " << inherit_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
<< scope_tab << "{\n"
<< scope_tab << "}\n\n"

View File

@ -47,29 +47,29 @@ public static partial class NativeMethods
/// </remarks>
public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
{
/// <sumary>
/// <summary>
/// Main constructor. Wrap the given string.
/// Have private acess to avoid wrapping a null reference,
/// use convertion or the factory method to create a new instance.
/// <see cref="Stringshare.Create(string s)"/>
/// <see cref="Stringshare.operator Stringshare(string s)"/>
/// </sumary>
/// <see cref="Create(string)"/>
/// <see cref="implicit operator Stringshare(string)"/>
/// </summary>
private Stringshare(string s)
{
Str = s;
}
/// <sumary>
/// <summary>
/// Auto-implemented property that holds the wrapped string value.
/// </sumary>
/// </summary>
public string Str { get; private set; }
/// <sumary>
/// <summary>
/// Factory method to instantiate a new object.
/// Get a wrappper for the given string or a null reference if the given
/// string reference is also null.
/// <seealso cref="Stringshare.operator Stringshare(string s)"/>
/// </sumary>
/// <seealso cref="implicit operator Stringshare(string)"/>
/// </summary>
/// <returns>
/// A new instance wrapping the given string, or a null reference if
/// the given string reference is also null.
@ -84,9 +84,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
return new Stringshare(s);
}
/// <sumary>
/// <summary>
/// Implicit convertion to string.
/// </sumary>
/// </summary>
public static implicit operator string(Stringshare ss)
{
if (ReferenceEquals(null, ss))
@ -97,13 +97,13 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
return ss.Str;
}
/// <sumary>
/// <summary>
/// Implicit convertion from string to Stringshare.
/// </sumary>
/// </summary>
/// <remarks>
/// Note that this method can be used to create an instance of this class,
/// either via an explicit cast or an implicit convertion.
/// <seealso cref="Stringshare.Create(string s)"/>
/// <seealso cref="Create(string)"/>
/// </remarks>
public static implicit operator Stringshare(string s)
{
@ -115,9 +115,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
return new Stringshare(s);
}
/// <sumary>
/// <summary>
/// Check two Stringshare objects for equality.
/// </sumary>
/// </summary>
/// <returns>
/// True if both wrapped strings have the same content or if both
/// references are null, false otherwise.
@ -128,9 +128,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
}
/// <sumary>
/// <summary>
/// Check two Stringshare objects for inequality.
/// </sumary>
/// </summary>
/// <returns>
/// True if the wrapped strings have different content or if one reference is null
/// and the other is not, false otherwise.
@ -140,20 +140,20 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
return !(ss1 == ss2);
}
/// <sumary>
/// <summary>
/// Returns the wrapped string.
/// <seealso cref="Stringshare.Str"/>
/// <seealso cref="Stringshare.Get()"/>
/// </sumary>
/// <seealso cref="Str"/>
/// <seealso cref="Get()"/>
/// </summary>
/// <returns>The wrapped string. Same as the property Str.</returns>
public override string ToString()
{
return Str;
}
/// <sumary>
/// <summary>
/// Override of GetHashCode for consistency with user-defined equality methods.
/// </sumary>
/// </summary>
/// <returns>
/// The wrapped string hash code.
/// </returns>
@ -162,9 +162,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
return Str.GetHashCode();
}
/// <sumary>
/// <summary>
/// Check the given object for equality.
/// </sumary>
/// </summary>
/// <returns>
/// True if the given object is the same object or if it is another Stringshare object
/// and both wrapped strings are equal or if it is a string object and its content
@ -191,9 +191,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
return other.GetType() == typeof(Stringshare) && this == ((Stringshare)other);
}
/// <sumary>
/// <summary>
/// Check the given Stringshare for equality.
/// </sumary>
/// </summary>
/// <returns>
/// True if the given Stringshare object is not null and its wrapped string
/// have the same content of this.Str, false otherwise.
@ -203,9 +203,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
return this == other;
}
/// <sumary>
/// <summary>
/// Check the given Stringshare for equality.
/// </sumary>
/// </summary>
/// <returns>
/// True if the given string is not null and the wrapped string have the same
/// content of the given string, false otherwise.
@ -215,11 +215,11 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
return this.Str == other;
}
/// <sumary>
/// <summary>
/// Get the wrapped string.
/// <seealso cref="Stringshare.Str"/>
/// <seealso cref="Stringshare.ToString()"/>
/// </sumary>
/// <seealso cref="Str"/>
/// <seealso cref="ToString()"/>
/// </summary>
/// <returns>The wrapped string. Same as the property Str.</returns>
public string Get()
{

View File

@ -10,8 +10,15 @@ namespace Efl
namespace Eo
{
/// <summary>
/// Abstract class that delivers base level binding to Efl Objects.
///
/// Most of it is protected functionalities to serve the generated
/// binding classes that inherit from it.
/// </summary>
public abstract class EoWrapper : IWrapper, IDisposable
{
/// <summary>Object used to synchronize access to EFL events.</summary>
protected readonly object eflBindingEventLock = new object();
private bool generated = true;
private System.IntPtr handle = IntPtr.Zero;
@ -49,7 +56,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
/// <summary>Initializes a new instance of the <see cref="Object"/> class.
/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.
/// Do not implement this constructor.</summary>
/// <param name="raw">The native pointer to be wrapped.</param>
/// <param name="wh">The native pointer to be wrapped.</param>
protected EoWrapper(Efl.Eo.Globals.WrappingHandle wh)
{
handle = wh.NativeHandle;
@ -124,6 +131,15 @@ public abstract class EoWrapper : IWrapper, IDisposable
get;
}
/// <summary>
/// Whether this object type is one of the generated binding classes or a custom
/// class defined by the user and that inherit from one of the generated ones.
/// </summary>
/// <returns>
/// True if this object type is one of the generated binding classes,
/// false if it is class that is manually defined and that inherits from
/// one of the generated ones, including user defined classes.
/// </returns>
protected bool IsGeneratedBindingClass
{
get { return generated; }
@ -269,7 +285,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
ws.MakeShared();
}
/// <sumary>Create and set to the internal native state a C# supervisor for this Eo wrapper. For internal use only.</sumary>
/// <summary>Create and set to the internal native state a C# supervisor for this Eo wrapper. For internal use only.</summary>
private void AddWrapperSupervisor()
{
var ws = new Efl.Eo.WrapperSupervisor(this);
@ -291,16 +307,24 @@ public abstract class EoWrapper : IWrapper, IDisposable
Eina.Error.RaiseIfUnhandledException();
}
/// <summary>
/// Struct to be used when constructing objects from native code.
/// Wraps the pointer handle to the native object instance.
/// </summary>
protected struct ConstructingHandle
{
/// <summary>Constructor for wrapping the native handle.</summary>
public ConstructingHandle(IntPtr h)
{
NativeHandle = h;
}
/// <summary>Pointer to the native instance.</summary>
public IntPtr NativeHandle { get; private set; }
}
/// <summary>Wrapper for native methods and virtual method delegates.
/// For internal use by generated code only.</summary>
public abstract class NativeMethods : Efl.Eo.NativeClass
{
private static EflConstructorDelegate csharpEflConstructorStaticDelegate = new EflConstructorDelegate(Constructor);
@ -308,6 +332,8 @@ public abstract class EoWrapper : IWrapper, IDisposable
private delegate IntPtr EflConstructorDelegate(IntPtr obj, IntPtr pd);
/// <summary>Gets the list of Eo operations to override.</summary>
/// <returns>The list of Eo operations to be overload.</returns>
public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(Type type)
{
var descs = new System.Collections.Generic.List<Efl_Op_Description>();

View File

@ -716,11 +716,11 @@ public class Globals
Monitor.Exit(Efl.All.InitLock);
}
/// <sumary>
/// <summary>
/// Internal struct used by the binding to pass the native handle pointer
/// to the managed object wrapping constructor.
/// Internal usage only: do not use this class in inherited classes.
/// </sumary>
/// </summary>
public struct WrappingHandle
{
public WrappingHandle(IntPtr h)