示例#1
0
 /// <summary>
 /// Returns reports at the given severity
 /// </summary>
 internal List <AiReport> GetReports(AiModType type, Severity severity)
 {
     try
     {
         return(Reports[type].FindAll(r => r.Severity == severity));
     }
     catch
     {
         return(null);
     }
 }
示例#2
0
        /// <summary>
        /// Add reports to the specified Reports Dictionary
        /// </summary>
        /// <param name="type">The report type</param>
        /// <param name="reports">List of issues to add</param>
        internal void Report(AiModType type, List <AiReport> reports)
        {
            if (reports == null)
            {
                return;
            }

            if (!Reports.ContainsKey(type))
            {
                Reports[type] = new List <AiReport>();
            }

            Reports[type].AddRange(reports);

            //This type contains the reports of all other types.
            if (type != AiModType.All)
            {
                Report(AiModType.All, reports);
            }
        }