示例#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 bool IsDestinationSupported(FrameCaptureDestination dest)
        {
            bool flag = dest != FrameCaptureDestination.DevTools && dest != FrameCaptureDestination.GPUTraceDocument;

            if (flag)
            {
                throw new ArgumentException("dest", "Argument dest has bad value (not one of FrameCaptureDestination enum values)");
            }
            return(FrameCapture.IsDestinationSupportedImpl(dest));
        }
示例#3
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);
        }
示例#4
0
 public static void EndCapture()
 {
     FrameCapture.EndCaptureImpl();
 }