diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-15 01:49:35 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-15 01:49:35 +0200 |
| commit | 6c5120d8108af9ed53e7205d221cf96a281a28a4 (patch) | |
| tree | 194329bce587f3f7035f9d4d6258728ac45f3d2b /src/CompilerServices | |
| parent | 721fa8de23a9c56396c1df9f012682b7f65775fb (diff) | |
CurrentInterface in GraphicObject base
Diffstat (limited to 'src/CompilerServices')
| -rw-r--r-- | src/CompilerServices/CompilerServices.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs index d06cd29b..79d3745d 100644 --- a/src/CompilerServices/CompilerServices.cs +++ b/src/CompilerServices/CompilerServices.cs @@ -13,8 +13,14 @@ namespace Crow public static class CompilerServices { static MethodInfo miAddBinding = typeof(GraphicObject).GetMethod ("BindMember"); + static FieldInfo miSetCurIface = typeof(GraphicObject). + GetField ("CurrentInterface", BindingFlags.NonPublic | BindingFlags.Instance); - + public static void emitSetCurInterface(ILGenerator il){ + il.Emit (OpCodes.Ldloc_0); + il.Emit (OpCodes.Ldarg_1); + il.Emit (OpCodes.Stfld, miSetCurIface); + } public static void emitBindingCreation(ILGenerator il, string memberName, string expression){ il.Emit (OpCodes.Ldloc_0); il.Emit (OpCodes.Ldstr, memberName); |