public void CreateListBreakpointsCommand() { // Arrange const int commandId = 3; // Act var listBreakpointsCommand = new ListBreakpointsCommand(commandId); // Assert Assert.AreEqual(commandId, listBreakpointsCommand.Id); Assert.AreEqual( string.Format("{{\"command\":\"listbreakpoints\",\"seq\":{0},\"type\":\"request\",\"arguments\":null}}", commandId), listBreakpointsCommand.ToString()); }
internal async Task<int?> GetBreakpointHitCountAsync(int breakpointId, CancellationToken cancellationToken = new CancellationToken()) { var listBreakpointsCommand = new ListBreakpointsCommand(CommandId); int hitCount; if (await TrySendRequestAsync(listBreakpointsCommand, cancellationToken).ConfigureAwait(false) && listBreakpointsCommand.Breakpoints.TryGetValue(breakpointId, out hitCount)) { return hitCount; } return null; }