csharp: Some missing conversions

Summary:
Ref T8430

Depends on D10616

Reviewers: brunobelo, segfaultxavi, felipealmeida, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8430

Differential Revision: https://phab.enlightenment.org/D10652
This commit is contained in:
Lauro Moura 2019-11-13 10:05:27 -03:00
parent bdf4396dfe
commit 600163320b
2 changed files with 13 additions and 2 deletions

View File

@ -139,6 +139,17 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
return new Stringshare(s);
}
/// <summary>
/// Conversion from string to Stringshare.
/// <para>Since EFL 1.24.</para>
/// </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="Create(string)"/>
/// </remarks>
public static Stringshare FromString(string s) => s;
/// <summary>
/// Check two Stringshare objects for equality.
/// <para>Since EFL 1.23.</para>

View File

@ -1657,14 +1657,14 @@ public class Value : IDisposable, IComparable<Value>, IEquatable<Value>
/// <summary>Implicit conversion.
/// <para>Since EFL 1.23.</para>
/// </summary>
public static implicit operator Value(short x) => FromShort(x);
public static implicit operator Value(short x) => FromInt16(x);
/// <summary>
/// Conversion to a <see cref="Value" /> from a <see cref="short" />
/// <para>Since EFL 1.23.</para>
/// </summary>
/// <param name="x">The <see cref="short" /> to be converted.</param>
public static Value FromShort(short x)
public static Value FromInt16(short x)
{
var v = new Eina.Value(ValueType.Short);
v.Set(x);