コード例 #1
0
ファイル: TSCapture.cs プロジェクト: wonrst/TizenFX
        public void CaptureCaptureSignalEmpty()
        {
            tlog.Debug(tag, $"CaptureCaptureSignalEmpty START");

            using (Capture capture = new Capture())
            {
                var testingTarget = new CaptureSignal(capture.SwigCPtr.Handle, true);
                Assert.IsNotNull(testingTarget, "Can't create success object CaptureSignal");
                Assert.IsInstanceOf <CaptureSignal>(testingTarget, "Should be an instance of CaptureSignal type.");

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

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"CaptureCaptureSignalEmpty END (OK)");
        }
コード例 #2
0
        public void CaptureCaptureSignalConstructor()
        {
            tlog.Debug(tag, $"CaptureCaptureSignalConstructor START");

            using (Capture capture = new Capture())
            {
                var testingTarget = new CaptureSignal(capture.SwigCPtr.Handle, true);
                Assert.IsNotNull(testingTarget, "Can't create success object CaptureSignal");
                Assert.IsInstanceOf <CaptureSignal>(testingTarget, "Should be an instance of CaptureSignal type.");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"CaptureCaptureSignalConstructor END (OK)");
        }
コード例 #3
0
        public void CaptureCaptureSignalGetConnectionCount()
        {
            tlog.Debug(tag, $"CaptureCaptureSignalGetConnectionCount START");

            using (Capture capture = new Capture())
            {
                var testingTarget = new CaptureSignal(capture.SwigCPtr.Handle, true);
                Assert.IsNotNull(testingTarget, "Can't create success object CaptureSignal");
                Assert.IsInstanceOf <CaptureSignal>(testingTarget, "Should be an instance of CaptureSignal type.");

                var result = testingTarget.GetConnectionCount();
                Assert.AreEqual(0, result, "Should be equal!");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"CaptureCaptureSignalGetConnectionCount END (OK)");
        }
コード例 #4
0
        public void CaptureCaptureSignalEmit()
        {
            tlog.Debug(tag, $"CaptureCaptureSignalEmit 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 (Capture capture = new Capture())
            {
                var testingTarget = new CaptureSignal(capture.SwigCPtr.Handle, true);
                Assert.IsNotNull(testingTarget, "Can't create success object CaptureSignal");
                Assert.IsInstanceOf <CaptureSignal>(testingTarget, "Should be an instance of CaptureSignal type.");

                testingTarget.Emit(capture, true);

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"CaptureCaptureSignalEmit END (OK)");
        }