Browse Source

Added fixes for Net3

pull/34/head
Anairkoen Schno 4 years ago
parent
commit
51d841dcb2
2 changed files with 8 additions and 1 deletions
  1. +4
    -0
      IPA.Loader/Utilities/Accessor.cs
  2. +4
    -1
      Net3-Proxy/Extensions.cs

+ 4
- 0
IPA.Loader/Utilities/Accessor.cs View File

@ -3,6 +3,10 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Reflection.Emit; using System.Reflection.Emit;
#if NET3
using Net3_Proxy;
using Array = Net3_Proxy.Array;
#endif
namespace IPA.Utilities namespace IPA.Utilities
{ {


+ 4
- 1
Net3-Proxy/Extensions.cs View File

@ -19,14 +19,17 @@ namespace Net3_Proxy
=> (T)GetCustomAttribute(element, typeof(T)); => (T)GetCustomAttribute(element, typeof(T));
public static T GetCustomAttribute<T>(this ConstructorInfo element) where T : Attribute public static T GetCustomAttribute<T>(this ConstructorInfo element) where T : Attribute
=> (T)GetCustomAttribute(element, typeof(T)); => (T)GetCustomAttribute(element, typeof(T));
public static T GetCustomAttribute<T>(this Type element) where T : Attribute
=> (T)GetCustomAttribute(element, typeof(T));
public static Attribute GetCustomAttribute(this MemberInfo element, Type attributeType) public static Attribute GetCustomAttribute(this MemberInfo element, Type attributeType)
=> Attribute.GetCustomAttribute(element, attributeType); => Attribute.GetCustomAttribute(element, attributeType);
public static Attribute GetCustomAttribute(this ConstructorInfo element, Type attributeType) public static Attribute GetCustomAttribute(this ConstructorInfo element, Type attributeType)
=> Attribute.GetCustomAttribute(element, attributeType); => Attribute.GetCustomAttribute(element, attributeType);
public static Attribute GetCustomAttribute(this ParameterInfo element, Type attributeType) public static Attribute GetCustomAttribute(this ParameterInfo element, Type attributeType)
=> Attribute.GetCustomAttribute(element, 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) public static StringBuilder Clear(this StringBuilder sb)
=> sb.Remove(0, sb.Length); => sb.Remove(0, sb.Length);


Loading…
Cancel
Save