From 88d6b4687973b222beec9ce448a674049c074710 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Thu, 3 Feb 2022 12:36:26 +0100 Subject: [PATCH] fix validation testcase --- VectoCommon/VectoCommon/Utils/Validation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VectoCommon/VectoCommon/Utils/Validation.cs b/VectoCommon/VectoCommon/Utils/Validation.cs index 74a0068d19..8367b50e54 100644 --- a/VectoCommon/VectoCommon/Utils/Validation.cs +++ b/VectoCommon/VectoCommon/Utils/Validation.cs @@ -135,7 +135,7 @@ namespace TUGraz.VectoCommon.Utils //if (m is FieldInfo field) { attributes = attributes.Concat( - field.GetCustomAttributes(typeof(T)).Cast<T>().Concat(obj.GetInterfaces().SelectMany(m.GetAttributes<T>))); + field.GetCustomAttributes(typeof(T)).Cast<T>().Concat(obj.GetInterfaces().SelectMany(m.GetAttributes<T>))).Distinct(); } } -- GitLab