public NewPayLoad SendRequestPayLoad(NewPayLoad payload) { if (!mRecordingSocketTraffic) { return(SendToNode(payload)); } else { GingerSocketLog gingerSocketLog = new GingerSocketLog(); gingerSocketLog.SetPayLoad(payload); gingerSocketLog.LogType = "Send"; Monitor.Add(gingerSocketLog); Stopwatch st = Stopwatch.StartNew(); NewPayLoad responsePayload = SendToNode(payload); st.Stop(); GingerSocketLog rc = new GingerSocketLog(); rc.SetPayLoad(responsePayload); rc.LogType = "Recv"; rc.Elapsed = st.ElapsedMilliseconds; Monitor.Add(rc); return(responsePayload); } }
public void Add(GingerSocketLog gingerSocketLog) { Dispatcher.Invoke(() => { GingerSocketLogs.Add(gingerSocketLog); }); }
private void ResendButton_Click(object sender, RoutedEventArgs e) { GingerSocketLog GSL = (GingerSocketLog)MainListView.SelectedItem; mGingerNodeProxy.SendRequestPayLoad(GSL.PayLoad); }
private void MainListView_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { GingerSocketLog GSL = (GingerSocketLog)MainListView.SelectedItem; PacketInfoTextBlock.Text = GSL.Info; }