コード例 #1
0
 private void WalkCallback(FrameConnection connection)
 {
     connection.Tick(_now);
 }
コード例 #2
0
        public void DoesNotTimeOutWhenDebuggerIsAttached()
        {
            var mockDebugger = new Mock <IDebugger>();

            mockDebugger.SetupGet(g => g.IsAttached).Returns(true);
            _frameConnection.Debugger = mockDebugger.Object;
            _frameConnection.CreateFrame(new DummyApplication(), _frameConnectionContext.Input.Reader, _frameConnectionContext.Output);

            var now = DateTimeOffset.Now;

            _frameConnection.Tick(now);
            _frameConnection.SetTimeout(1, TimeoutAction.SendTimeoutResponse);
            _frameConnection.Tick(now.AddTicks(2).Add(Heartbeat.Interval));

            Assert.False(_frameConnection.TimedOut);
        }