Ejemplo n.º 1
0
 public (Document?document, int line) GetDocumentAndLine(Solution solution, ParsedFrame frame)
 {
     if (frame is ParsedStackFrame parsedFrame)
     {
         var matches = GetFileMatches(solution, parsedFrame.Root, out var line);
         if (matches.IsEmpty)
         {
             return(default);
Ejemplo n.º 2
0
        public void ParsedFrameTest()
        {
            byte[] sample         = GetSample();
            var    ctxFactory     = new JpegFrameContextFactory(VideoConstants.VideoBlockSize, VideoConstants.VideoBlockSize);
            var    frameBlockPool = new ObjectPool <FrameBlock>(() => new FrameBlock(ctxFactory));
            var    vqc            = new VideoQualityController(1);

            vqc.RemoteSessions = _remoteSessions;
            var frame = new ParsedFrame(vqc, sample, height, width, 0, 0, frameBlockPool);

            for (int i = 0; i < frame.FrameBlocks.Length; i++)
            {
                if (frame.FrameBlocks[i] != null)
                {
                    var expected = (byte)i;
                    foreach (byte b in frame.FrameBlocks[i].RgbaRaw)
                    {
                        Assert.AreEqual(expected, b);
                    }
                }
            }
        }
 public UnitTestingParsedFrameWrapper(ParsedFrame parsedFrame)
 {
     UnderlyingObject = parsedFrame;
 }