GetCustomAttribute/s extension methods

This commit is contained in:
Chris Cameron
2018-02-07 16:56:18 -05:00
parent 232a52d608
commit 1ac1ac2965
2 changed files with 47 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using ICD.Common.Properties;
using ICD.Common.Utils.Extensions;
using ICD.Common.Utils.IO;
#if SIMPLSHARP
using Crestron.SimplSharp.CrestronIO;
@@ -251,9 +252,6 @@ namespace ICD.Common.Utils
if (assembly == null)
throw new ArgumentNullException("assembly");
#if SIMPLSHARP
return assembly.GetCustomAttributes(typeof(T), false).Cast<T>();
#else
try
{
return assembly.GetCustomAttributes<T>();
@@ -262,7 +260,6 @@ namespace ICD.Common.Utils
{
return Enumerable.Empty<T>();
}
#endif
}
/// <summary>