Cosmos/source2/IL2CPU/Cosmos.IL2CPU/Plugs/System/MulticastDelegateImplRefs.cs
kudzu_cp 2249797e61
2012-08-13 00:39:42 +00:00

25 lines
867 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Cosmos.IL2CPU.X86.Plugs.CustomImplementations.System {
public static class MulticastDelegateImplRefs {
public static readonly Assembly RuntimeAssemblyDef;
static MulticastDelegateImplRefs() {
Type xType = typeof(MulticastDelegateImpl);
foreach (FieldInfo xField in typeof(MulticastDelegateImplRefs).GetFields()) {
if (xField.Name.EndsWith("Ref")) {
MethodBase xTempMethod = xType.GetMethod(xField.Name.Substring(0, xField.Name.Length - "Ref".Length));
if (xTempMethod == null) {
throw new Exception("Method '" + xField.Name.Substring(0, xField.Name.Length - "Ref".Length) + "' not found on MulticastDelegateImpl!");
}
xField.SetValue(null, xTempMethod);
}
}
}
}
}