Beispiel #1
0
        public XElement Process(TimeBasedAssistantControllerWrapper[] assistantControllers)
        {
            ArgumentValidator.ThrowIfNull("assistantControllers", assistantControllers);
            IEnumerable <TimeBasedAssistantControllerWrapper> tbasToProcess;

            try
            {
                tbasToProcess = this.GetTbasToProcess(assistantControllers);
            }
            catch (UnknownAssistantException exception)
            {
                return(DiagnosticsFormatter.FormatErrorElement(exception));
            }
            if (tbasToProcess == null)
            {
                return(DiagnosticsFormatter.FormatErrorElement("Could not find any TBA to provide diagnostics for."));
            }
            XElement xelement = DiagnosticsFormatter.FormatRootElement();

            foreach (TimeBasedAssistantControllerWrapper tba in tbasToProcess)
            {
                List <TimeBasedDatabaseDriver> databaseDriversToProcess;
                try
                {
                    databaseDriversToProcess = this.dbProcessor.GetDatabaseDriversToProcess(tba);
                }
                catch (UnknownDatabaseException exception2)
                {
                    return(DiagnosticsFormatter.FormatErrorElement(exception2));
                }
                if (databaseDriversToProcess == null)
                {
                    return(DiagnosticsFormatter.FormatErrorElement("Could not retrive the list of database drivers to process (null value)."));
                }
                if (databaseDriversToProcess.Count > 0)
                {
                    XElement content = this.ProcessDiagnosticsForOneTba(tba, databaseDriversToProcess);
                    xelement.Add(content);
                }
            }
            return(xelement);
        }
Beispiel #2
0
 // Token: 0x06000497 RID: 1175 RVA: 0x00018BC0 File Offset: 0x00016DC0
 public static XElement FormatErrorElement(Exception exception)
 {
     ArgumentValidator.ThrowIfNull("exception", exception);
     return(DiagnosticsFormatter.FormatErrorElement(exception.Message));
 }