public static Event DoEvent(this IEventSource self, string name, EventReturnMethod returnMethod, PythonDictionary args = null) { args = args ?? new PythonDictionary(); var argList = args.Select(EventArg.Convert) .ToList(); return(self.DoEvent(name, returnMethod, argList)); }
public static void Has(this IEventSource self, string action, PythonDictionary args = null) { self.DoEvent("ch_" + action, EventReturnMethod.None, args); }
public static void Has(this IEventSource self, string action, params EventArg[] args) { self.DoEvent("ch_" + action, EventReturnMethod.None, args); }
public static bool Can(this IEventSource self, string action, params EventArg[] args) { var @event = self.DoEvent("ch_can_" + action, EventReturnMethod.And, args); return(@event.ReturnValue); }
public static bool Can(this IEventSource self, string action, PythonDictionary args = null) { var canEvent = self.DoEvent("ch_can_" + action, EventReturnMethod.And, args); return(canEvent.ReturnValue); }