public override ICollection Scan() { Logs.LogScanner scanner = new Logs.LogScanner(); scanner.AddParameters(string.Format("{0}=audit", Logs.LogScanner.ENTRY_TYPES_PARAMETER)); IEnumerable <Logs.AuditItem> auditItems = scanner.Scan().Cast <Logs.AuditItem>(); Item[] items; ArrayList results = new ArrayList(); switch (DeepMode) { case Mode.Descendants: items = RootItem.Axes.GetDescendants(); break; case Mode.Children: items = RootItem.Axes.SelectItems("./*"); break; default: items = new Item[] { RootItem }; break; } foreach (var item in items) { if (SearchAllVersions) { foreach (var version in item.Versions.GetVersions()) { addItem(auditItems, results, version); } } else { addItem(auditItems, results, item); } } return(results); }
public override ICollection Scan() { Logs.LogScanner scanner = new Logs.LogScanner(); scanner.AddParameters(string.Format("{0}=audit", Logs.LogScanner.ENTRY_TYPES_PARAMETER)); IEnumerable<Logs.AuditItem> auditItems = scanner.Scan().Cast<Logs.AuditItem>(); Item[] items; ArrayList results = new ArrayList(); switch (DeepMode) { case Mode.Descendants: items = RootItem.Axes.GetDescendants(); break; case Mode.Children: items = RootItem.Axes.SelectItems("./*"); break; default: items = new Item[] { RootItem }; break; } foreach (var item in items) { if (SearchAllVersions) { foreach (var version in item.Versions.GetVersions()) { addItem(auditItems, results, version); } } else { addItem(auditItems, results, item); } } return results; }