csharp:Using Array.Empty genericmodel.
authorBruno da Silva Belo <brunodasilvabelo@gmail.com>
Fri, 25 Oct 2019 16:57:48 +0000 (13:57 -0300)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 11 Nov 2019 02:20:38 +0000 (11:20 +0900)
Summary: ref T8421

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8421

Differential Revision: https://phab.enlightenment.org/D10501

src/bindings/mono/efl_mono/GenericModel.cs

index cda0647..5f33374 100644 (file)
@@ -124,7 +124,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
            if (v.GetValueType().IsContainer())
            {
                var child = (Efl.IModel)v[0];
-               T obj = (T)Activator.CreateInstance(typeof(T), new System.Object[] {});
+               T obj = (T)Activator.CreateInstance(typeof(T), Array.Empty<object>());
                ModelHelper.GetProperties(obj, child);
                return obj;
            }