private static void do_eo_accessors(IEnumerable <int> accessor, bool shouldMove = false) { var obj = new Dummy.TestObject(); IEnumerable <int> source = shouldMove ? accessor.ToList() : accessor; IEnumerable <int> acc = shouldMove ? obj.CloneAccessorOwn(accessor) : obj.CloneAccessor(accessor); var zipped = acc.Zip(source, (first, second) => new Tuple <int, int>(first, second)); foreach (Tuple <int, int> pair in zipped) { Test.AssertEquals(pair.Item1, pair.Item2); } obj.Dispose(); }
public static void basic_eo_accessors() { var obj = new Dummy.TestObject(); Eina.List <int> lst = new Eina.List <int>(); lst.Append(4); lst.Append(3); lst.Append(2); lst.Append(5); Eina.Accessor <int> acc = obj.CloneAccessor(lst.GetAccessor()); var zipped = acc.Zip(lst, (first, second) => new Tuple <int, int>(first, second)); foreach (Tuple <int, int> pair in zipped) { Test.AssertEquals(pair.Item1, pair.Item2); } }