mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-14 20:25:01 +00:00
GetCustomAttribute/s extension methods
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user