/// <summary> /// Gets the GUID store from given IFC validation task. /// </summary> /// <param name="validationTask">An IFC GUID validation task</param> /// <returns>The store or an exception</returns> public static IfcGuidStore IfcGuidStore(IfcValidationTask validationTask) { if (validationTask?.Result() is IfcGuidCheckResult r) { return(r.IfcGuidStore()); } else { throw new ArgumentException("No IFC GUID checking task"); } }
/// <summary> /// Directly retrieves the validations messages. /// </summary> /// <param name="validationTask">The task</param> /// <param name="reportFilter">The IfcReportDomain filter</param> /// <returns>An array of messages</returns> public static IfcValidationMessage[] Messages(IfcValidationTask validationTask, object reportFilter) { IfcReportDomain domainFilter; if (!DynamicArgumentDelegation.TryCastEnum <IfcReportDomain>(reportFilter, out domainFilter)) { log.LogWarning($"Parsing reportFilter failed in ({nameof(IfcValidationResult.Messages)}. Using '{domainFilter}'."); domainFilter = IfcReportDomain.AllIssues; } return(validationTask?.Result().Messages(domainFilter)); }