From 3d9cf0264dd8b70cb5470ef399d2045226a70f3d Mon Sep 17 00:00:00 2001 From: "harald.martini@student.tugraz.at" <harald.martini@student.tugraz.at> Date: Mon, 23 Aug 2021 10:20:50 +0200 Subject: [PATCH] Added Helper to check for null properties --- VectoCore/VectoCore/Utils/XMLHelper.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/VectoCore/VectoCore/Utils/XMLHelper.cs b/VectoCore/VectoCore/Utils/XMLHelper.cs index c7739645eb..a8719f08c9 100644 --- a/VectoCore/VectoCore/Utils/XMLHelper.cs +++ b/VectoCore/VectoCore/Utils/XMLHelper.cs @@ -305,6 +305,17 @@ namespace TUGraz.VectoCore.Utils ); } + public static bool IsAnyNull(this IComponentInputData inputData, params object[] checkForNull) + { + foreach (var o in checkForNull) { + if (o == null) { + return true; + } + } + + return false; + } + public static void AddIfContentNotNull(this XElement xElement, XElement xElementToAdd) { -- GitLab