Пример #1
0
 public LoadEventsTreeView_Category(string name, object[] children, LoggingTables associatedTable, int runId)
 {
     Children        = children;
     RunId           = runId;
     _name           = name;
     AssociatedTable = associatedTable;
 }
Пример #2
0
        /// <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);
            }
        }
Пример #3
0
        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))
 {
 }
Пример #5
0
 public Category(ArchivalDataLoadInfo dli, LoggingTables type)
 {
     _dli  = dli;
     _type = type;
 }
Пример #6
0
 public LogViewerFilter(LoggingTables loggingTable)
 {
     LoggingTable = loggingTable;
 }