summaryrefslogtreecommitdiff
path: root/reference/csharp/eina/src/eina_list.cs
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-03-26 11:19:13 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-03-26 16:24:20 +0100
commitb55e5150c91dd860fe86588adce9e0bb35d60c5b (patch)
tree2b861f118b97910088db08dff7348447af0d99df /reference/csharp/eina/src/eina_list.cs
parent871add6fe5794b4320f2918d1b17504f8e839230 (diff)
mono examples: Adapt to Efl.Csharp.Application
This class simplifies app development, so the examples have to showcase it. Basically: - Your app inherits form it - You do not need to init() or shutdown() - You override the methods you want (like OnInitialize). Fixes T7655 Differential Revision: https://phab.enlightenment.org/D8477
Diffstat (limited to 'reference/csharp/eina/src/eina_list.cs')
-rw-r--r--reference/csharp/eina/src/eina_list.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/reference/csharp/eina/src/eina_list.cs b/reference/csharp/eina/src/eina_list.cs
index e04dc20..0253bc3 100644
--- a/reference/csharp/eina/src/eina_list.cs
+++ b/reference/csharp/eina/src/eina_list.cs
@@ -10,7 +10,7 @@
10using System; 10using System;
11using System.Linq; 11using System.Linq;
12 12
13public class Example 13public class Example : Efl.Csharp.Application
14{ 14{
15 static Eina.List<string> CreateList() 15 static Eina.List<string> CreateList()
16 { 16 {
@@ -23,10 +23,8 @@ public class Example
23 return list; 23 return list;
24 } 24 }
25 25
26 public static void Main() 26 protected override void OnInitialize(Eina.Array<System.String> args)
27 { 27 {
28 Efl.All.Init();
29
30 var list = CreateList(); 28 var list = CreateList();
31 29
32 // Print our list with a simple foreach 30 // Print our list with a simple foreach
@@ -66,6 +64,12 @@ public class Example
66 64
67 list.Dispose(); 65 list.Dispose();
68 66
69 Efl.All.Shutdown(); 67 Efl.App.AppMain.Quit(0);
68 }
69
70 public static void Main()
71 {
72 var example = new Example();
73 example.Launch();
70 } 74 }
71} 75}