From 70c5f817c54a67f1d7149629ea19a8ee7affa077 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 5 Oct 2017 17:16:49 -0400 Subject: [PATCH] GetCustomAttributes method can cast attributes --- ICD.Common.Utils/ReflectionUtils.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICD.Common.Utils/ReflectionUtils.cs b/ICD.Common.Utils/ReflectionUtils.cs index 1038049..8f52c17 100644 --- a/ICD.Common.Utils/ReflectionUtils.cs +++ b/ICD.Common.Utils/ReflectionUtils.cs @@ -245,14 +245,14 @@ namespace ICD.Common.Utils /// /// /// - public static IEnumerable GetCustomAttributes(Assembly assembly) + public static IEnumerable GetCustomAttributes(Assembly assembly) where T : Attribute { if (assembly == null) throw new ArgumentNullException("assembly"); #if SIMPLSHARP - return assembly.GetCustomAttributes(typeof(T), false); + return assembly.GetCustomAttributes(typeof(T), false).Cast(); #else return assembly.GetCustomAttributes(); #endif