diff --git a/IPA.Loader/Utilities/Accessor.cs b/IPA.Loader/Utilities/Accessor.cs index a612e097..ad1cd89c 100644 --- a/IPA.Loader/Utilities/Accessor.cs +++ b/IPA.Loader/Utilities/Accessor.cs @@ -3,6 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Reflection.Emit; +#if NET3 +using Net3_Proxy; +using Array = Net3_Proxy.Array; +#endif namespace IPA.Utilities { diff --git a/Net3-Proxy/Extensions.cs b/Net3-Proxy/Extensions.cs index 89b75da0..499c63e5 100644 --- a/Net3-Proxy/Extensions.cs +++ b/Net3-Proxy/Extensions.cs @@ -19,14 +19,17 @@ namespace Net3_Proxy => (T)GetCustomAttribute(element, typeof(T)); public static T GetCustomAttribute(this ConstructorInfo element) where T : Attribute => (T)GetCustomAttribute(element, typeof(T)); + public static T GetCustomAttribute(this Type element) where T : Attribute + => (T)GetCustomAttribute(element, typeof(T)); public static Attribute GetCustomAttribute(this MemberInfo element, Type attributeType) => Attribute.GetCustomAttribute(element, attributeType); public static Attribute GetCustomAttribute(this ConstructorInfo element, Type attributeType) => Attribute.GetCustomAttribute(element, attributeType); - public static Attribute GetCustomAttribute(this ParameterInfo element, Type attributeType) => Attribute.GetCustomAttribute(element, attributeType); + public static Attribute GetCustomAttribute(this Type element, Type attributeType) + => Attribute.GetCustomAttribute(element, attributeType); public static StringBuilder Clear(this StringBuilder sb) => sb.Remove(0, sb.Length);