aboutsummaryrefslogtreecommitdiffstats
path: root/reference
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-01-15 13:19:08 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-01-15 13:19:08 +0100
commita5c08814d897e6c00729b61e3886532b7e942705 (patch)
treed6ca3bc47827cca95702d252b9d0ab31e98c64a3 /reference
parentefl-mono: Use new Eina.Value implicit conversions (diff)
downloadexamples-a5c08814d897e6c00729b61e3886532b7e942705.tar.gz
examples-mono: Update Eina comments to latest syntax
Diffstat (limited to 'reference')
-rw-r--r--reference/csharp/eina/src/eina_array.cs24
-rw-r--r--reference/csharp/eina/src/eina_hash.cs16
-rw-r--r--reference/csharp/eina/src/eina_iterator.cs10
-rw-r--r--reference/csharp/eina/src/eina_list.cs14
-rw-r--r--reference/csharp/eina/src/eina_log.cs6
-rw-r--r--reference/csharp/eina/src/eina_value.cs8
6 files changed, 39 insertions, 39 deletions
diff --git a/reference/csharp/eina/src/eina_array.cs b/reference/csharp/eina/src/eina_array.cs
index 9cf9d549..dd7a3be8 100644
--- a/reference/csharp/eina/src/eina_array.cs
+++ b/reference/csharp/eina/src/eina_array.cs
@@ -1,8 +1,8 @@
/*
- * Eina Array examples.
+ * Eina.Array examples.
*
- * These examples demonstrate how to work with Eina_array data and methods.
- * We use a simple array of strings to initialise our Eina_array before
+ * These examples demonstrate how to work with Eina.Array data and methods.
+ * We use a simple array of strings to initialise our Eina.Array before
* performing various mutations and printing the results.
*/
@@ -12,7 +12,7 @@ public class Example
{
static Eina.Array<string> CreateArray()
{
- // some content to populate our array
+ // Some content to populate our array
string[] names =
{
"helo", "hera", "starbuck", "kat", "boomer",
@@ -21,7 +21,7 @@ public class Example
"skulls", "bulldog", "flat top", "hammerhead", "gonzo"
};
- // set up an array with a growth step to give a little headroom
+ // Set up an array with a growth step to give a little headroom
var array = new Eina.Array<string>(25u);
foreach (string name in names)
@@ -32,7 +32,7 @@ public class Example
static bool ItemRemoveCb(string name)
{
- // let's keep any strings that are no more than 7 characters long
+ // Let's keep any strings that are no more than 7 characters long
if (name.Length <= 7)
return false;
return true;
@@ -44,24 +44,24 @@ public class Example
var array = CreateArray();
- // show the contents of our array
+ // Show the contents of our array
Console.WriteLine("Array count: {0}", array.Count());
Console.WriteLine("Array contents:");
foreach(string name in array)
{
- // content is strings so we simply print the data
+ // Content is strings so we simply print the data
Console.WriteLine(" {0}", name);
}
- // access a specific item in the array
+ // Access a specific item in the array
Console.WriteLine("Top gun: {0}", array[2]);
- // update a single item in the array
+ // Update a single item in the array
array[17] = "flattop";
- // update the array removing items that match the ItemRemoveCb criteria
+ // Update the array removing items that match the ItemRemoveCb criteria
// array.RemoveAll(ItemRemoveCb); // TODO: FIXME
- // print the new contents of our array
+ // Print the new contents of our array
Console.WriteLine("New array count: {0}", array.Length);
Console.WriteLine("New array contents:");
foreach(string name in array)
diff --git a/reference/csharp/eina/src/eina_hash.cs b/reference/csharp/eina/src/eina_hash.cs
index 19c3db0c..7b155e70 100644
--- a/reference/csharp/eina/src/eina_hash.cs
+++ b/reference/csharp/eina/src/eina_hash.cs
@@ -1,7 +1,7 @@
/*
- * Eina Hash examples.
+ * Eina.Hash examples.
*
- * These examples demonstrate how to work with Eina_hash data and methods.
+ * These examples demonstrate how to work with Eina.Hash data and methods.
*
* We have two main hash objects here, firstly an int keyed hash with some
* dummy content.
@@ -16,7 +16,7 @@ public class Example
{
static Eina.Hash<Int32, string> CreateHash()
{
- // let's create a simple hash with integers as keys
+ // Let's create a simple hash with integers as keys
var hash = new Eina.Hash<Int32, string>();
// Add initial entries to our hash
@@ -30,13 +30,13 @@ public class Example
{
var hash = CreateHash();
- // get an iterator of the keys so we can print a line per entry
+ // Get an iterator of the keys so we can print a line per entry
var iter = hash.Keys();
Console.WriteLine("Print contents of int hash");
foreach (int key in iter)
{
- // look up the value for the key so we can print both
+ // Look up the value for the key so we can print both
string value = hash.Find(key);
Console.WriteLine($" Item found with id {key} has value {value}");
}
@@ -46,7 +46,7 @@ public class Example
hash.Dispose();
}
- // here we begin the phone book example
+ // Here we begin the phone book example
static void PrintPhonebookEntry(string key, string data)
{
@@ -58,7 +58,7 @@ public class Example
int count = book.Population();
Console.WriteLine($"Complete phone book ({count}):");
- // as an enumerator, iterate over the key and value for each entry
+ // As an enumerator, iterate over the key and value for each entry
foreach (KeyValuePair<string, string> kvp in book)
PrintPhonebookEntry(kvp.Key, kvp.Value);
@@ -78,7 +78,7 @@ public class Example
"+23 45 678-91012", "+34 56 789-10123"
};
- // create hash of strings to strings
+ // Create hash of strings to strings
var hash = new Eina.Hash<string, string>();
// Add initial entries to our hash
diff --git a/reference/csharp/eina/src/eina_iterator.cs b/reference/csharp/eina/src/eina_iterator.cs
index 54f02ffa..61d31dca 100644
--- a/reference/csharp/eina/src/eina_iterator.cs
+++ b/reference/csharp/eina/src/eina_iterator.cs
@@ -1,9 +1,9 @@
/*
- * Eina Iterator examples.
+ * Eina.Iterator examples.
*
- * These examples demonstrate how to work with Eina_iterator methods.
- * Both an Eina_list and an Eina_array are created and an iterator obtained
+ * These examples demonstrate how to work with Eina.Iterator methods.
+ * Both an Eina.List and an Eina.Array are created and an iterator obtained
* for both. You can see how we can use iterators irrespective of the source
* and also that there are different ways to work with iterating content.
*/
@@ -59,14 +59,14 @@ public class Example
{
Efl.All.Init();
- // create an Eina.Array and iterate through it's contents
+ // Create an Eina.Array and iterate through its contents
var array = CreateArray();
var it = array.GetIterator();
PrintIterator(it);
it.Dispose();
array.Dispose();
- // perform the same iteration with an Eina.List
+ // Perform the same iteration with an Eina.List
var list = CreateList();
it = list.GetIterator();
PrintIterator(it);
diff --git a/reference/csharp/eina/src/eina_list.cs b/reference/csharp/eina/src/eina_list.cs
index ecdf7d31..e04dc205 100644
--- a/reference/csharp/eina/src/eina_list.cs
+++ b/reference/csharp/eina/src/eina_list.cs
@@ -1,8 +1,8 @@
/*
- * Eina List examples.
+ * Eina.List examples.
*
- * These examples demonstrate how to work with Eina_list data and methods.
+ * These examples demonstrate how to work with Eina.List data and methods.
* We create a simple list of names by appending strings to an empty list
* and then run various mutations and print each result.
*/
@@ -29,13 +29,13 @@ public class Example
var list = CreateList();
- // print our list with a simple foreach
+ // Print our list with a simple foreach
Console.WriteLine("List size: {0}", list.Count());
Console.WriteLine("List content:");
foreach(string item in list)
Console.WriteLine(" {0}", item);
- // insert some more elements
+ // Insert some more elements
list.Prepend("Cain");
// list.PrependRelative("Tigh", "Baltar"); // TODO: missing
@@ -43,7 +43,7 @@ public class Example
foreach(string item in list)
Console.WriteLine(" {0}", item);
- // promote an item to the top of the list
+ // Promote an item to the top of the list
// TODO: implement ?
// list.PromoteList(list.NthList(1));
// list.Remove("Cain");
@@ -52,14 +52,14 @@ public class Example
// foreach(string item in list)
// Console.WriteLine(" {0}", item);
- // we can sort the list with any callback
+ // We can sort the list with any callback
// list.Sort((string strA, string strB) => { return strA.Compare(strB); }); // TODO: FIXME custom sort
list.Sort();
Console.WriteLine("List content sorted:");
foreach(string item in list)
Console.WriteLine(" {0}", item);
- // and foreach can be in reverse too
+ // And foreach can be in reverse too
Console.WriteLine("List content reverse sorted:");
foreach(string item in list.Reverse())
Console.WriteLine(" {0}", item);
diff --git a/reference/csharp/eina/src/eina_log.cs b/reference/csharp/eina/src/eina_log.cs
index 0e8664bd..86627e9f 100644
--- a/reference/csharp/eina/src/eina_log.cs
+++ b/reference/csharp/eina/src/eina_log.cs
@@ -1,6 +1,6 @@
/*
- * Efl Core Log examples.
+ * Eina.Log examples.
*
* This demo shows how to log at various levels and to change what log is shown.
* You can also use a custom log printer in your app as shown in _log_custom.
@@ -40,11 +40,11 @@ public class Example
Divides();
Eina.Log.GlobalLevelSet(Eina.Log.Level.Warning);
- Console.WriteLine("Executing with Warning level"); // same as EINA_LOG_LEVEL = 2
+ Console.WriteLine("Executing with Warning level"); // Same as EINA_LOG_LEVEL = 2
Divides();
Eina.Log.GlobalLevelSet(Eina.Log.Level.Info);
- Console.WriteLine("Executing with Info on"); // same as EINA_LOG_LEVEL = 3
+ Console.WriteLine("Executing with Info on"); // Same as EINA_LOG_LEVEL = 3
Divides();
}
diff --git a/reference/csharp/eina/src/eina_value.cs b/reference/csharp/eina/src/eina_value.cs
index d718b6b5..3f3308ea 100644
--- a/reference/csharp/eina/src/eina_value.cs
+++ b/reference/csharp/eina/src/eina_value.cs
@@ -1,10 +1,10 @@
/*
- * Eina Value examples.
+ * Eina.Value examples.
*
- * These examples demonstrate how to work with Eina_value data and methods.
- * Eina_Value is a way to represent and pass data of varying types and to
+ * These examples demonstrate how to work with Eina.Value data and methods.
+ * Eina.Value is a way to represent and pass data of varying types and to
* convert efficiently between them.
- * Eina_Value can even define structs for managing more complex requirements.
+ * Eina.Value can even define structs for managing more complex requirements.
*/
using System;