summaryrefslogtreecommitdiff
path: root/reference/csharp/eina/src/eina_hash.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_hash.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_hash.cs')
-rw-r--r--reference/csharp/eina/src/eina_hash.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/reference/csharp/eina/src/eina_hash.cs b/reference/csharp/eina/src/eina_hash.cs
index 7b155e7..64ade56 100644
--- a/reference/csharp/eina/src/eina_hash.cs
+++ b/reference/csharp/eina/src/eina_hash.cs
@@ -12,7 +12,7 @@
12using System; 12using System;
13using System.Collections.Generic; 13using System.Collections.Generic;
14 14
15public class Example 15public class Example : Efl.Csharp.Application
16{ 16{
17 static Eina.Hash<Int32, string> CreateHash() 17 static Eina.Hash<Int32, string> CreateHash()
18 { 18 {
@@ -117,13 +117,20 @@ public class Example
117 phone_book.Dispose(); 117 phone_book.Dispose();
118 } 118 }
119 119
120 public static void Main() 120 protected override void OnInitialize(Eina.Array<System.String> args)
121 { 121 {
122 Efl.All.Init();
123
124 HashDemo(); 122 HashDemo();
125 PhonebookDemo(); 123 PhonebookDemo();
126 124
127 Efl.All.Shutdown(); 125 Efl.App.AppMain.Quit(0);
126 }
127
128#if WIN32
129 [STAThreadAttribute()]
130#endif
131 public static void Main()
132 {
133 var example = new Example();
134 example.Launch();
128 } 135 }
129} 136}