+ static MethodInfo listener_proxy_value;
+ internal void EmitValueChangedCallback (EmitContext ec, string name, TypeSpec type, Location loc)
+ {
+ if (listener_id == null)
+ listener_id = ListenerProxy.Register (ModificationListener);
+
+ if (listener_proxy_value == null)
+ listener_proxy_value = typeof (ListenerProxy).GetMethod ("ValueChanged");
+
+#if STATIC
+ throw new NotSupportedException ();
+#else
+ // object value, int row, int col, string name, int listenerId
+ if (type.IsStructOrEnum)
+ ec.Emit (OpCodes.Box, type);
+
+ ec.EmitInt (loc.Row);
+ ec.EmitInt (loc.Column);
+ ec.Emit (OpCodes.Ldstr, name);
+ ec.EmitInt (listener_id.Value);
+ ec.Emit (OpCodes.Call, listener_proxy_value);
+#endif
+ }
+