csharp: space after keywords.

Reviewers: felipealmeida, lauromoura, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10576
This commit is contained in:
Bruno da Silva Belo 2019-10-31 07:45:01 -03:00 committed by Lauro Moura
parent 78bc0b77b7
commit 72a5367f8d
7 changed files with 44 additions and 44 deletions

View File

@ -27,7 +27,7 @@ internal class ModelHelper
static internal void SetProperties<T>(T o, Efl.IModel child)
{
var properties = typeof(T).GetProperties();
foreach(var prop in properties)
foreach (var prop in properties)
{
child.SetProperty(prop.Name, ValueFromProperty(o, prop));
}
@ -37,7 +37,7 @@ internal class ModelHelper
static internal void GetProperties<T>(T o, Efl.IModel child)
{
var properties = typeof(T).GetProperties();
foreach(var prop in properties)
foreach (var prop in properties)
{
using (var v = child.GetProperty(prop.Name))
{
@ -79,7 +79,7 @@ public class UserModel<T> : Efl.MonoModelInternal
public UserModel (Efl.Object parent = null) : base(Efl.MonoModelInternal.efl_mono_model_internal_class_get(), parent)
{
var properties = typeof(T).GetProperties();
foreach(var prop in properties)
foreach (var prop in properties)
{
AddProperty(prop.Name, Eina.ValueTypeBridge.GetManaged(prop.PropertyType));
}

View File

@ -205,7 +205,7 @@ public static class StringConversion
Marshal.WriteByte(native + strbuf.Length, 0); // write the terminating null
return native;
}
catch(Exception)
catch (Exception)
{
MemoryNative.Free(native);
throw;

View File

@ -4343,7 +4343,7 @@ class TestEinaAccessor
var zipped = accessor.Zip(lst, (first, second) => new Tuple<int, int>(first, second));
foreach(Tuple<int, int> pair in zipped)
foreach (Tuple<int, int> pair in zipped)
{
Test.AssertEquals(pair.Item1, pair.Item2);
}
@ -4358,7 +4358,7 @@ class TestEinaAccessor
var zipped = accessor.Zip(arr, (first, second) => new Tuple<string, string>(first, second));
foreach(Tuple<string, string> pair in zipped)
foreach (Tuple<string, string> pair in zipped)
{
Test.AssertEquals(pair.Item1, pair.Item2);
}
@ -4376,7 +4376,7 @@ class TestEinaAccessor
var zipped = accessor.Zip(lst, (first, second) => new Tuple<int, int>(first, second));
foreach(Tuple<int, int> pair in zipped)
foreach (Tuple<int, int> pair in zipped)
{
Test.AssertEquals(pair.Item1, pair.Item2);
}
@ -4391,7 +4391,7 @@ class TestEinaAccessor
var zipped = accessor.Zip(arr, (first, second) => new Tuple<int, int>(first, second));
foreach(Tuple<int, int> pair in zipped)
foreach (Tuple<int, int> pair in zipped)
{
Test.AssertEquals(pair.Item1, pair.Item2);
}

View File

@ -261,7 +261,7 @@ class TestEldbusMessage
string bus_name;
bool isHasData = false;
while(iterator.GetAndNext(out bus_name))
while (iterator.GetAndNext(out bus_name))
{
if (String.IsNullOrEmpty(bus_name))
{

View File

@ -262,7 +262,7 @@ class TestEoAccessors
var zipped = acc.Zip(lst, (first, second) => new Tuple<int, int>(first, second));
foreach(Tuple<int, int> pair in zipped)
foreach (Tuple<int, int> pair in zipped)
{
Test.AssertEquals(pair.Item1, pair.Item2);
}

View File

@ -48,14 +48,14 @@ class TestMain
Console.WriteLine("[ START SUITE ] " + ckRunSuite);
var cases= GetTestCases(ckRunCase);
foreach(var testCase in cases)
foreach (var testCase in cases)
{
var localTestCases = testCase.GetMethods(BindingFlags.Static | BindingFlags.Public);
var setUp = Array.Find(localTestCases, m => String.Equals(m.Name, "SetUp", StringComparison.Ordinal));
var tearDown = Array.Find(localTestCases, m => String.Equals(m.Name, "TearDown", StringComparison.Ordinal));
foreach(var localTestCase in localTestCases)
foreach (var localTestCase in localTestCases)
{
if (localTestCase == setUp || localTestCase == tearDown)
continue;

View File

@ -502,8 +502,8 @@ public static class TestEinaValue {
public static void TestValueCompareArray()
{
using(Eina.Value a = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32))
using(Eina.Value b = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32)) {
using (Eina.Value a = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32))
using (Eina.Value b = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32)) {
Test.AssertEquals(a, b);
@ -545,8 +545,8 @@ public static class TestEinaValue {
public static void TestValueCompareList()
{
using(Eina.Value a = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32))
using(Eina.Value b = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32)) {
using (Eina.Value a = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32))
using (Eina.Value b = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32)) {
Test.AssertEquals(a, b);
@ -593,7 +593,7 @@ public static class TestEinaValue {
public static void TestValueToString()
{
using(Eina.Value a = new Eina.Value(Eina.ValueType.Int32)) {
using (Eina.Value a = new Eina.Value(Eina.ValueType.Int32)) {
int i = -12345;
string x = $"{i}";
Test.Assert(a.Set(i));
@ -615,8 +615,8 @@ public static class TestEinaValue {
public static void TestValueConvertInt()
{
using(Eina.Value from = new Eina.Value(Eina.ValueType.Int32))
using(Eina.Value to = new Eina.Value(Eina.ValueType.UInt32)) {
using (Eina.Value from = new Eina.Value(Eina.ValueType.Int32))
using (Eina.Value to = new Eina.Value(Eina.ValueType.UInt32)) {
int source = 0x7FFFFFFF;
uint target_uint;
int target_int;
@ -645,8 +645,8 @@ public static class TestEinaValue {
public static void TestValueConvertUInt()
{
using(Eina.Value from = new Eina.Value(Eina.ValueType.UInt32))
using(Eina.Value to = new Eina.Value(Eina.ValueType.UInt32)) {
using (Eina.Value from = new Eina.Value(Eina.ValueType.UInt32))
using (Eina.Value to = new Eina.Value(Eina.ValueType.UInt32)) {
uint source = 0xFFFFFFFF;
uint target_uint;
string target_str;
@ -673,13 +673,13 @@ public static class TestEinaValue {
public static void TestValueContainerConstructorWrongArgs()
{
Test.AssertRaises<ArgumentException>(() => {
using(Eina.Value array = new Eina.Value(Eina.ValueType.String, Eina.ValueType.String)) { }
using (Eina.Value array = new Eina.Value(Eina.ValueType.String, Eina.ValueType.String)) { }
});
}
public static void TestValueContainerWithNonContainerAccess()
{
using(Eina.Value array = new Eina.Value(Eina.ValueType.Int32)) {
using (Eina.Value array = new Eina.Value(Eina.ValueType.Int32)) {
Test.AssertRaises<Eina.InvalidValueTypeException>(() => array[0] = 1);
object val = null;
Test.AssertRaises<Eina.InvalidValueTypeException>(() => val = array[0]);
@ -688,7 +688,7 @@ public static class TestEinaValue {
public static void TestValueArrayOfSByte()
{
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.SByte)) {
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.SByte)) {
Test.AssertEquals(0, array.Count());
Test.Assert(array.Append(0));
Test.AssertEquals(1, array.Count());
@ -720,7 +720,7 @@ public static class TestEinaValue {
public static void TestValueArrayOfByte()
{
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Byte)) {
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Byte)) {
Test.AssertEquals(0, array.Count());
Test.Assert(array.Append(0));
Test.AssertEquals(1, array.Count());
@ -754,7 +754,7 @@ public static class TestEinaValue {
public static void TestValueArrayOfInts()
{
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32)) {
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32)) {
Test.AssertEquals(0, array.Count());
Test.Assert(array.Append(0));
Test.AssertEquals(1, array.Count());
@ -786,7 +786,7 @@ public static class TestEinaValue {
public static void TestValueArrayOfInt64s()
{
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int64)) {
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int64)) {
Test.AssertEquals(0, array.Count());
Test.Assert(array.Append(0));
Test.AssertEquals(1, array.Count());
@ -819,7 +819,7 @@ public static class TestEinaValue {
public static void TestValueArrayOfUInts()
{
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.UInt32)) {
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.UInt32)) {
Test.Assert(array.Append(2));
Test.AssertEquals((uint)array[0], (uint)2);
Test.AssertRaises<OverflowException>(() => array[0] = -1);
@ -829,7 +829,7 @@ public static class TestEinaValue {
public static void TestValueArrayOfStrings()
{
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.String)) {
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.String)) {
Test.Assert(array.Append("hello"));
Test.Assert(array.Append("world"));
@ -848,7 +848,7 @@ public static class TestEinaValue {
public static void TestValueArrayOfObjects()
{
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Object)) {
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Object)) {
var a = new Dummy.TestObject();
var b = new Dummy.TestObject();
@ -870,7 +870,7 @@ public static class TestEinaValue {
public static void TestArrayOutOfBounds() {
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32)) {
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32)) {
object placeholder = null;
Test.AssertRaises<System.ArgumentOutOfRangeException>(() => array[0] = 1);
Test.AssertRaises<System.ArgumentOutOfRangeException>(() => placeholder = array[0]);
@ -886,16 +886,16 @@ public static class TestEinaValue {
}
public static void TestValueArraySubType() {
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32))
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32))
Test.AssertEquals(Eina.ValueType.Int32, array.GetValueSubType());
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.UInt32))
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.UInt32))
Test.AssertEquals(Eina.ValueType.UInt32, array.GetValueSubType());
}
public static void TestValueArrayConvert() {
using(Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32))
using(Eina.Value other = new Eina.Value(Eina.ValueType.Int32)) {
using (Eina.Value array = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32))
using (Eina.Value other = new Eina.Value(Eina.ValueType.Int32)) {
other.Set(100);
other.ConvertTo(array);
Test.AssertEquals(100, (int)array[0]);
@ -904,7 +904,7 @@ public static class TestEinaValue {
}
public static void TestValueList() {
using(Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32)) {
using (Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32)) {
Test.AssertEquals(0, list.Count());
Test.Assert(list.Append(0));
Test.AssertEquals(1, list.Count());
@ -933,13 +933,13 @@ public static class TestEinaValue {
Test.AssertEquals("[1984, -42, 5, 42]", list.ToString());
}
using(Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.UInt32)) {
using (Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.UInt32)) {
Test.Assert(list.Append(2));
Test.AssertEquals((uint)list[0], (uint)2);
Test.AssertRaises<OverflowException>(() => list[0] = -1);
}
using(Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.String)) {
using (Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.String)) {
Test.Assert(list.Append("hello"));
Test.Assert(list.Append("world"));
@ -956,7 +956,7 @@ public static class TestEinaValue {
}
public static void TestListOutOfBounds() {
using(Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32)) {
using (Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32)) {
object placeholder = null;
Test.AssertRaises<System.ArgumentOutOfRangeException>(() => list[0] = 1);
Test.AssertRaises<System.ArgumentOutOfRangeException>(() => placeholder = list[0]);
@ -972,16 +972,16 @@ public static class TestEinaValue {
}
public static void TestValueListSubType() {
using(Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32))
using (Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32))
Test.AssertEquals(Eina.ValueType.Int32, list.GetValueSubType());
using(Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.UInt32))
using (Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.UInt32))
Test.AssertEquals(Eina.ValueType.UInt32, list.GetValueSubType());
}
public static void TestValueListConvert() {
using(Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32))
using(Eina.Value other = new Eina.Value(Eina.ValueType.Int32)) {
using (Eina.Value list = new Eina.Value(Eina.ValueType.List, Eina.ValueType.Int32))
using (Eina.Value other = new Eina.Value(Eina.ValueType.Int32)) {
other.Set(100);
other.ConvertTo(list);
Test.AssertEquals(100, (int)list[0]);
@ -991,7 +991,7 @@ public static class TestEinaValue {
public static void TestStringThroughValue() {
// Check if Value_Native->Value doesn't try to free the pointed string.
using(Eina.Value value_ptr = new Eina.Value(Eina.ValueType.String)) {
using (Eina.Value value_ptr = new Eina.Value(Eina.ValueType.String)) {
string payload = "Something";
value_ptr.Set(payload);
Eina.ValueNative byvalue = value_ptr;