public List <FileInfoSummary> GetSourceFileInfoList() { List <FileInfoSummary> fileInfoList = new List <FileInfoSummary>(); foreach (PluginDataFileInfo pdFileInfo in source) { // go through the properties of this and check if any have data // close, open, paste, delete, keys FileInfoSummary fileInfo = new FileInfoSummary(); fileInfo.close = pdFileInfo.close; fileInfo.open = pdFileInfo.open; fileInfo.paste = pdFileInfo.paste; fileInfo.linesAdded = pdFileInfo.linesAdded; fileInfo.linesRemoved = pdFileInfo.linesRemoved; fileInfo.delete = pdFileInfo.delete; fileInfo.add = pdFileInfo.add; fileInfo.keystrokes = fileInfo.add + fileInfo.delete + fileInfo.paste + fileInfo.linesAdded + fileInfo.linesRemoved; fileInfo.syntax = pdFileInfo.syntax; fileInfo.local_start = pdFileInfo.local_start; fileInfo.local_end = pdFileInfo.local_end; fileInfo.start = pdFileInfo.start; fileInfo.end = pdFileInfo.end; // wrapper for a file path FileInfo fi = new FileInfo(pdFileInfo.file); fileInfo.name = fi.Name; fileInfo.fsPath = fi.FullName; fileInfo.duration_seconds = fileInfo.end - fileInfo.start; fileInfoList.Add(fileInfo); } return(fileInfoList); }
public void Aggregate(FileInfoSummary fileInfo) { this.add += fileInfo.add; this.close += fileInfo.close; this.delete += fileInfo.delete; this.linesAdded += fileInfo.linesAdded; this.linesRemoved += fileInfo.linesRemoved; this.open += fileInfo.open; this.paste += fileInfo.paste; this.keystrokes += fileInfo.keystrokes; }
public void UpdateFromFileInfo(FileInfoSummary fileInfo) { this.add += fileInfo.add; this.close += fileInfo.close; this.delete += fileInfo.delete; this.linesAdded += fileInfo.linesAdded; this.linesRemoved += fileInfo.linesRemoved; this.open += fileInfo.open; this.paste += fileInfo.paste; this.keystrokes += fileInfo.keystrokes; this.netkeys += fileInfo.netkeys; this.syntax = fileInfo.syntax; this.duration_seconds += fileInfo.end - fileInfo.start; this.fsPath = fileInfo.fsPath; this.update_count += 1; this.UpdateName(); }