public static void RegesterInstanceMethod(this SRUObject self, string name, SRUNativeProc.NativeProc proc) { if (!self.IsExistField("instance_methods") || !(self["instance_methods"] is SRUHash)) self["instance_methods"] = new SRUHash(); (self["instance_methods"] as SRUHash).Dict.Add(name.ToSRUObject(), new SRUNativeProc(proc)); }
public void RegesterMethod(string name, SRUNativeProc.NativeProc proc) { this.objectMap.Add(name, proc.ToSRUObject()); }