summaryrefslogtreecommitdiff
path: root/tutorial/csharp/eo-intro
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-01-18 16:53:55 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-01-23 14:49:38 +0100
commit500049f1eb376dbd0b07a3688546c4f11a567d6b (patch)
treeac687fb0badf8c5c3aefe45e816bf1735e44a0af /tutorial/csharp/eo-intro
parente674ff0d9754586e7f0c2413327c3383ab3ad7ae (diff)
mono-examples: Adapt to latest syntax
Summary: Removed initializer methods as much as possible to prepare for when they are removed from the C# bindings. No functional changes in the examples. Tutorial text needs to be adapted now. Test Plan: All examples work as before (the containers one is currently broken, FML). Reviewers: lauromoura, felipealmeida, vitor.sousa Reviewed By: lauromoura Maniphest Tasks: T7508 Differential Revision: https://phab.enlightenment.org/D7695
Diffstat (limited to 'tutorial/csharp/eo-intro')
-rw-r--r--tutorial/csharp/eo-intro/src/eo_intro_main.cs15
1 files changed, 6 insertions, 9 deletions
diff --git a/tutorial/csharp/eo-intro/src/eo_intro_main.cs b/tutorial/csharp/eo-intro/src/eo_intro_main.cs
index 0a7779a..5972919 100644
--- a/tutorial/csharp/eo-intro/src/eo_intro_main.cs
+++ b/tutorial/csharp/eo-intro/src/eo_intro_main.cs
@@ -8,19 +8,16 @@ public class Example
8 static void ObjCreate() 8 static void ObjCreate()
9 { 9 {
10 // First create a root element 10 // First create a root element
11 root = new Efl.ModelItem(null, (Efl.ModelItem eroot) => { 11 root = new Efl.ModelItem(null);
12 eroot.SetName("Root"); 12 root.SetName("Root");
13 });
14 13
15 // Create the first child element 14 // Create the first child element
16 new Efl.ModelItem(root, (Efl.ModelItem eroot) => { 15 var child = new Efl.ModelItem(root);
17 eroot.SetName("Child1"); 16 child.SetName("Child1");
18 });
19 17
20 // Create the second child element, this time, with an extra reference 18 // Create the second child element, this time, with an extra reference
21 child2 = new Efl.ModelItem(root, (Efl.ModelItem eroot) => { 19 child2 = new Efl.ModelItem(root);
22 eroot.SetName("Child2"); 20 child2.SetName("Child2");
23 });
24 } 21 }
25 22
26 // Destroy the test hierarchy 23 // Destroy the test hierarchy