//#if !DOTNETFW // internal static T GetAttribute<T>(Type type) where T : Attribute // { // var attr = type.GetTypeInfo().GetCustomAttribute<T>(); // return (T)attr; // } //#endif #if NET40 public static T GetAttribute <T>(TypeInfoPolyfill typeInfo) where T : Attribute { return(typeInfo.GetCustomAttribute <T>()); }
public bool IsAssignableFrom(TypeInfoPolyfill otherType) { return(Type.IsAssignableFrom(otherType.Type)); }