Beispiel #1
0
        public static Dummy.Numberwrapper NW(int n)
        {
            var nw = new Dummy.Numberwrapper();

            nw.SetNumber(n);
            return(nw);
        }
Beispiel #2
0
        public static void test_find_provider()
        {
            // Tests only the direction C# -> C
            var obj = new Dummy.TestObject();

            Dummy.Numberwrapper provider = obj.FindProvider(typeof(Dummy.Numberwrapper)) as Dummy.Numberwrapper;
            Test.AssertEquals(provider.GetType(), typeof(Dummy.Numberwrapper));
            Test.AssertEquals(provider.GetNumber(), 1999);
        }
Beispiel #3
0
        internal static Dummy.StructComplex structComplexWithValues()
        {
            var Farray = new Eina.Array <string>();

            Farray.Add("0x0");
            Farray.Add("0x2A");
            Farray.Add("0x42");

            var Flist = new Eina.List <string>();

            Flist.Add("0x0");
            Flist.Add("0x2A");
            Flist.Add("0x42");

            var Fhash = new Eina.Hash <string, string>();

            Fhash["aa"] = "aaa";
            Fhash["bb"] = "bbb";
            Fhash["cc"] = "ccc";

            var Fiterator = ((Eina.Array <string>)Farray).GetIterator();
            var Faccessor = ((Eina.Array <string>)Farray).GetAccessor();

            var Fany_value = new Eina.Value(Eina.ValueType.Double);

            Fany_value.Set(-9007199254740992.0);

            var Fany_value_ref = new Eina.Value(Eina.ValueType.String);

            Fany_value_ref.Set("abc");

            var Fbinbuf = new Eina.Binbuf();

            Fbinbuf.Append(126);

            var Fslice = new Eina.Slice(Eina.MemoryNative.Alloc(1), (UIntPtr)1);

            Marshal.WriteByte(Fslice.Mem, 125);

            var Fobj = new Dummy.Numberwrapper();

            Fobj.Number = 42;

            return(new Dummy.StructComplex(
                       farray: Farray,
                       flist: Flist,
                       fhash: Fhash,
                       fiterator: Fiterator,
                       faccessor: Faccessor,
                       fanyValue: Fany_value,
                       fanyValueRef: Fany_value_ref,
                       fbinbuf: Fbinbuf,
                       fslice: Fslice,
                       fobj: Fobj
                       ));
        }
Beispiel #4
0
        public static void parent_inherited_class()
        {
            Dummy.Numberwrapper parent = new Dummy.Numberwrapper(null);
            var child = new Dummy.TestObject(parent);

            Test.AssertEquals(parent, child.GetParent());

            Dummy.Numberwrapper parent_retrieved = child.GetParent() as Dummy.Numberwrapper;
            Test.AssertEquals(parent, parent_retrieved);
        }
Beispiel #5
0
        public static Dummy.Numberwrapper[] AppendSeqObj()
        {
            var a = new Dummy.Numberwrapper();
            var b = new Dummy.Numberwrapper();
            var c = new Dummy.Numberwrapper();

            a.SetNumber(42);
            b.SetNumber(43);
            c.SetNumber(33);
            return(new Dummy.Numberwrapper[] { a, b, c });
        }
Beispiel #6
0
        public static Dummy.Numberwrapper[] BaseSeqObj()
        {
            var a = new Dummy.Numberwrapper();
            var b = new Dummy.Numberwrapper();
            var c = new Dummy.Numberwrapper();

            a.SetNumber(0x0);
            b.SetNumber(0x2A);
            c.SetNumber(0x42);
            return(new Dummy.Numberwrapper[] { a, b, c });
        }
Beispiel #7
0
        public static Dummy.Numberwrapper[] AppendSeqObj()
        {
            var a = new Dummy.Numberwrapper();
            var b = new Dummy.Numberwrapper();
            var c = new Dummy.Numberwrapper();

            a.Number = 42;
            b.Number = 43;
            c.Number = 33;
            return(new Dummy.Numberwrapper[] { a, b, c });
        }
Beispiel #8
0
        public static Dummy.Numberwrapper[] BaseSeqObj()
        {
            var a = new Dummy.Numberwrapper();
            var b = new Dummy.Numberwrapper();
            var c = new Dummy.Numberwrapper();

            a.Number = 0x0;
            b.Number = 0x2A;
            c.Number = 0x42;
            return(new Dummy.Numberwrapper[] { a, b, c });
        }
Beispiel #9
0
        public static Dummy.Numberwrapper[] ModifiedSeqObj()
        {
            var a = new Dummy.Numberwrapper();
            var b = new Dummy.Numberwrapper();
            var c = new Dummy.Numberwrapper();
            var d = new Dummy.Numberwrapper();
            var e = new Dummy.Numberwrapper();
            var f = new Dummy.Numberwrapper();

            a.SetNumber(0x0);
            b.SetNumber(0x2A);
            c.SetNumber(0x42);
            d.SetNumber(42);
            e.SetNumber(43);
            f.SetNumber(33);
            return(new Dummy.Numberwrapper[] { a, b, c, d, e, f });
        }
Beispiel #10
0
        public static Dummy.Numberwrapper[] ModifiedSeqObj()
        {
            var a = new Dummy.Numberwrapper();
            var b = new Dummy.Numberwrapper();
            var c = new Dummy.Numberwrapper();
            var d = new Dummy.Numberwrapper();
            var e = new Dummy.Numberwrapper();
            var f = new Dummy.Numberwrapper();

            a.Number = 0x0;
            b.Number = 0x2A;
            c.Number = 0x42;
            d.Number = 42;
            e.Number = 43;
            f.Number = 33;
            return(new Dummy.Numberwrapper[] { a, b, c, d, e, f });
        }