aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GraphicObject.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-12-07 04:32:57 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-12-07 04:32:57 +0100
commitfd3cf7597b2c3084c41993fe2043a484466c4fa9 (patch)
tree7e5ccf6829bf555eb4720a5c7593237caaa0ac5c /src/GraphicObjects/GraphicObject.cs
parentd8e417769988c76a7ebe9adc85c929e815583683 (diff)
debug for netcore standards 2
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
-rw-r--r--src/GraphicObjects/GraphicObject.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index ec4fa173..f90e06e0 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -1098,12 +1098,14 @@ namespace Crow
DynamicMethod dm = null;
ILGenerator il = null;
- dm = new DynamicMethod("dyn_loadDefValues",
+ /*dm = new DynamicMethod("dyn_loadDefValues",
MethodAttributes.Family | MethodAttributes.FamANDAssem | MethodAttributes.NewSlot,
CallingConventions.Standard,
- typeof(void),new Type[] {CompilerServices.TObject},thisType,true);
+ typeof(void),new Type[] {CompilerServices.TObject}, thisType, true);*/
- il = dm.GetILGenerator(256);
+ dm = new DynamicMethod("dyn_loadDefValues", null, new Type[] {CompilerServices.TObject}, thisType, true);
+
+ il = dm.GetILGenerator(256);
il.DeclareLocal(CompilerServices.TObject);
il.Emit(OpCodes.Nop);
//set local GraphicObject to root object passed as 1st argument
@@ -1129,9 +1131,9 @@ namespace Crow
il.Emit (OpCodes.Ldstr, trimed.Substring (1, trimed.Length - 2));
//push null as 3rd arg, currentNode, not known when instanciing
il.Emit (OpCodes.Ldnull);
- il.Emit (OpCodes.Callvirt, CompilerServices.miCompileDynEventHandler);
+ il.Emit (OpCodes.Call, CompilerServices.miCompileDynEventHandler);
il.Emit (OpCodes.Castclass, ei.EventHandlerType);
- il.Emit (OpCodes.Callvirt, ei.AddMethod);
+ il.Emit (OpCodes.Call, ei.AddMethod);
}else
Debug.WriteLine("error in styling, event not handled : " + trimed);
}