public LoadEventsTreeView_Category(string name, object[] children, LoggingTables associatedTable, int runId) { Children = children; RunId = runId; _name = name; AssociatedTable = associatedTable; }
/// <summary> /// Creates a new filter showing records in the <paramref name="loggingTable"/> that belong to a parent Type (share foreign key /// <paramref name="id"/> e.g. applying a filter on <see cref="LoggingTables.ProgressLog"/> will show all log entries for /// the parent <see cref="LoggingTables.TableLoadRun"/> with that <paramref name="id"/>. Pass null to not filter. /// </summary> /// <param name="loggingTable"></param> /// <param name="id">ID of the parent object for which to extract a matching row collection</param> public LogViewerFilter(LoggingTables loggingTable, int?id) { LoggingTable = loggingTable; switch (loggingTable) { case LoggingTables.DataLoadTask: Task = id; break; case LoggingTables.DataLoadRun: Task = id; break; case LoggingTables.ProgressLog: case LoggingTables.FatalError: case LoggingTables.TableLoadRun: Run = id; break; case LoggingTables.DataSource: Table = id; break; default: throw new ArgumentOutOfRangeException(nameof(loggingTable), loggingTable, null); } }
public ExecuteCommandViewLogs(IBasicActivateItems activator, CommandLineObjectPicker picker) : base(activator) { if (picker.Length == 0) { SetImpossible("Insufficient arguments supplied"); return; } if (picker[0].HasValueOfType(typeof(DatabaseEntity))) { var obj = picker[0].GetValueForParameterOfType(typeof(DatabaseEntity)); if (obj is ILoggedActivityRootObject root) { RootObject = root; } if (obj is ExternalDatabaseServer eds) { _loggingServers = new ExternalDatabaseServer[] { eds } } ; } LoggingTables table = LoggingTables.None; if (picker.Length >= 1) { if (Enum.TryParse(picker[0].RawValue, out table)) { _filter = new LogViewerFilter(table); } } if (picker.Length >= 2) { if (int.TryParse(picker[0].RawValue, out int id)) { _filter = new LogViewerFilter(table, id); } } }
public ExecuteCommandExportLoggedDataToCsv(IBasicActivateItems activator, LoggingTables table, int idIfAny) : this(activator, new LogViewerFilter(table, idIfAny <= 0 ? (int?)null:idIfAny)) { }
public Category(ArchivalDataLoadInfo dli, LoggingTables type) { _dli = dli; _type = type; }
public LogViewerFilter(LoggingTables loggingTable) { LoggingTable = loggingTable; }