Exemplo n.º 1
0
        public void ObjectDestroyedSignalEmit()
        {
            tlog.Debug(tag, $"ObjectDestroyedSignalEmit START");
            var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
            var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;

            tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");

            using (View view = new View())
            {
                var testingTarget = new ObjectDestroyedSignal();
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <ObjectDestroyedSignal>(testingTarget, "Should be an Instance of ObjectDestroyedSignal!");

                try
                {
                    using (RefObject obj = new RefObject(view.SwigCPtr.Handle, false))
                    {
                        testingTarget.Emit(obj);
                    }
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    Assert.Fail("Caught Exception: Failed!");
                }

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"ObjectDestroyedSignalEmit END (OK)");
        }
Exemplo n.º 2
0
        public void ObjectDestroyedSignalConnect()
        {
            tlog.Debug(tag, $"ObjectDestroyedSignalConnect START");

            var testingTarget = new ObjectDestroyedSignal();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <ObjectDestroyedSignal>(testingTarget, "Should be an Instance of ObjectDestroyedSignal!");

            try
            {
                dummyCallback callback = OnDummyCallback;
                testingTarget.Connect(callback);
                testingTarget.Disconnect(callback);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();

            tlog.Debug(tag, $"ObjectDestroyedSignalConnect END (OK)");
        }
Exemplo n.º 3
0
        public void ObjectDestroyedSignalConstructor()
        {
            tlog.Debug(tag, $"ObjectDestroyedSignalConstructor START");

            using (View view = new View())
            {
                var testingTarget = new ObjectDestroyedSignal(view.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <ObjectDestroyedSignal>(testingTarget, "Should be an Instance of ObjectDestroyedSignal!");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"ObjectDestroyedSignalConstructor END (OK)");
        }
Exemplo n.º 4
0
        public void ObjectDestroyedSignalEmpty()
        {
            tlog.Debug(tag, $"ObjectDestroyedSignalEmpty START");

            var testingTarget = new ObjectDestroyedSignal();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <ObjectDestroyedSignal>(testingTarget, "Should be an Instance of ObjectDestroyedSignal!");

            try
            {
                testingTarget.Empty();
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();

            tlog.Debug(tag, $"ObjectDestroyedSignalEmpty END (OK)");
        }
Exemplo n.º 5
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ObjectDestroyedSignal obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }