public override object getValueAt(int row, int col) { FileCommandInfo info = outerInstance.fileCommandList[row]; if (info != null) { switch (col) { case 0: return(string.Format("0x{0:X8}", info.threadId)); case 1: return(info.threadName); case 2: return((info.hasFd) ? string.Format("0x{0:X4}", info.fd) : ""); case 3: return((info.occurences == 1) ? info.command : info.command + " " + info.occurences + "x"); case 4: return(string.Format("0x{0:X8}", info.result)); case 5: return(info.parameters); } } return(null); }
public override bool Equals(object _obj) { if (_obj is FileCommandInfo) { FileCommandInfo obj = (FileCommandInfo)_obj; return(threadId == obj.threadId && fd == obj.fd && command.Equals(obj.command) && result == obj.result && parameters.Equals(obj.parameters)); } return(false); }
private void logFileCommand(FileCommandInfo info) { if (lastFileCommand != null && info.Equals(lastFileCommand)) { lastFileCommand.occurences++; } else { fileCommandList.Add(info); lastFileCommand = info; } }