示例#1
0
 public void DisplayRequestProcessingLog(TestTool.Services.RequestProcessingLog log)
 {
     Invoke(new Action(() =>
     {
         lvLog.DisplayRequestProcessingLog(log);
     }));
 }
示例#2
0
        public void DisplayRequestProcessingLog(TestTool.Services.RequestProcessingLog log)
        {
            string       id   = (lvCommands.Items.Count + 1).ToString();
            ListViewItem item = new ListViewItem(id);

            item.SubItems.Add(log.Time.ToString("HH:mm:ss.fff"));
            item.SubItems.Add(log.Service);
            item.SubItems.Add(log.Method);

            item.Tag = log;

            Func <Services.RequestProcessingLog, bool> stateValidation =
                (l) =>
            {
                if (_selectedService == log.Service)
                {
                    if (string.IsNullOrEmpty(_selectedMethod) || _selectedMethod == log.Method)
                    {
                        return(true);
                    }
                }
                return(false);
            };

            SetupItem(item, stateValidation);

            lvCommands.Items.Add(item);
        }