#if SIMPLSHARP
using System;
using System.Collections.Generic;
using System.Linq;
using Crestron.SimplSharp.Reflection;
namespace ICD.Common.Utils.Extensions
{
///
/// Extension methods for use with reflection objects.
///
public static class ReflectionExtensions
{
///
/// Returns the custom attributes attached to the member.
///
///
///
///
///
public static IEnumerable GetCustomAttributes(this MemberInfo extends, bool inherits)
where T : Attribute
{
if (extends == null)
throw new ArgumentNullException("extends");
return extends.GetCustomAttributes(typeof(T), inherits).Cast();
}
}
}
#endif