/// <summary> /// computes the available column types for the aggregated log source /// </summary> /// <param name="sources"></param> private void AggregateColumnTypes(ILogSource[] sources) { m_columnTypes = new TypedColumnCollection(); foreach (ILogSource s in sources) { if (s is ITypedColumns) { ITypedColumns cs = (ITypedColumns)s; if ((cs != null) && (cs.ColumnTypes != null)) { foreach (string fieldName in s.FieldNames) { m_columnTypes.AddColumnType(fieldName, cs.ColumnTypes.GetColumnType(fieldName)); } } } } }
public LogSourceJobHistory(string jobName, SqlConnectionInfo sqlCi, object customCommandHandler, int jobCategoryId, Guid JobId, IServiceProvider serviceProvider) { m_logName = jobName; m_jobCategoryId = jobCategoryId; m_jobId = JobId; m_logEntries = new List <ILogEntry>(); m_jobName = jobName; m_sqlConnectionInfo = sqlCi; m_fieldNames = new string[] { "LogViewerSR.Field_StepID", "LogViewerSR.Field_Server", "LogViewerSR.Field_JobName", "LogViewerSR.Field_StepName", "LogViewerSR.Field_Notifications", "LogViewerSR.Field_Message", "LogViewerSR.Field_Duration", "LogViewerSR.Field_SqlSeverity", "LogViewerSR.Field_SqlMessageID", "LogViewerSR.Field_OperatorEmailed", "LogViewerSR.Field_OperatorNetsent", "LogViewerSR.Field_OperatorPaged", "LogViewerSR.Field_RetriesAttempted" }; columnTypes = new TypedColumnCollection(); for (int i = 0; i < m_fieldNames.Length; i++) { columnTypes.AddColumnType(m_fieldNames[i], SourceColumnTypes[i]); } //m_customCommandHandler = customCommandHandler; this.serviceProvider = serviceProvider; }