using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
public class Util
{
public static T GetAttribute(MemberInfo info) where T : class
{
return Attribute.GetCustomAttribute(info, typeof(T), false) as T;
}
public static IQueryable GetAttributes(MemberInfo info) where T : System.Attribute
{
List items = new List();
foreach (T attrib in Attribute.GetCustomAttributes(info, typeof(T), false))
{
items.Add(attrib);
}
return items.AsQueryable();
}
}