From 600163320bec71fed5611b51f4d28dcc5808f334 Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Wed, 13 Nov 2019 10:05:27 -0300 Subject: [PATCH] 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 --- src/bindings/mono/eina_mono/eina_stringshare.cs | 11 +++++++++++ src/bindings/mono/eina_mono/eina_value.cs | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/bindings/mono/eina_mono/eina_stringshare.cs b/src/bindings/mono/eina_mono/eina_stringshare.cs index 698250d111..a6ca53a02c 100644 --- a/src/bindings/mono/eina_mono/eina_stringshare.cs +++ b/src/bindings/mono/eina_mono/eina_stringshare.cs @@ -139,6 +139,17 @@ public class Stringshare : IEquatable, IEquatable return new Stringshare(s); } + /// + /// Conversion from string to Stringshare. + /// Since EFL 1.24. + /// + /// + /// Note that this method can be used to create an instance of this class, + /// either via an explicit cast or an implicit convertion. + /// + /// + public static Stringshare FromString(string s) => s; + /// /// Check two Stringshare objects for equality. /// Since EFL 1.23. diff --git a/src/bindings/mono/eina_mono/eina_value.cs b/src/bindings/mono/eina_mono/eina_value.cs index f8bfc08d3f..12d43fd990 100644 --- a/src/bindings/mono/eina_mono/eina_value.cs +++ b/src/bindings/mono/eina_mono/eina_value.cs @@ -1657,14 +1657,14 @@ public class Value : IDisposable, IComparable, IEquatable /// Implicit conversion. /// Since EFL 1.23. /// - public static implicit operator Value(short x) => FromShort(x); + public static implicit operator Value(short x) => FromInt16(x); /// /// Conversion to a from a /// Since EFL 1.23. /// /// The to be converted. - public static Value FromShort(short x) + public static Value FromInt16(short x) { var v = new Eina.Value(ValueType.Short); v.Set(x);