Пример #1
0
        public static void CaptureNextFrameToXcode()
        {
            bool flag = !FrameCapture.IsDestinationSupported(FrameCaptureDestination.DevTools);

            if (flag)
            {
                throw new InvalidOperationException("Frame Capture with DevTools is not supported.");
            }
            FrameCapture.CaptureNextFrameImpl(FrameCaptureDestination.DevTools, null);
        }
Пример #2
0
        public static void CaptureNextFrameToFile(string path)
        {
            bool flag = !FrameCapture.IsDestinationSupported(FrameCaptureDestination.GPUTraceDocument);

            if (flag)
            {
                throw new InvalidOperationException("Frame Capture to file is not supported.");
            }
            bool flag2 = string.IsNullOrEmpty(path);

            if (flag2)
            {
                throw new ArgumentException("path", "Path must be supplied when capture destination is GPUTraceDocument.");
            }
            bool flag3 = Path.GetExtension(path) != ".gputrace";

            if (flag3)
            {
                throw new ArgumentException("path", "Destination file should have .gputrace extension.");
            }
            FrameCapture.CaptureNextFrameImpl(FrameCaptureDestination.GPUTraceDocument, new Uri(path).AbsoluteUri);
        }