private ZeroAction BuildAction(ZeroModule parent, MethodInfo info) { if(runOnBackground) return new ZeroBackgroundAction(name, ResolveDelegate(parent,info), ruleToSatisfy, isOnMenu, async); return new ZeroAction(name, ResolveDelegate(parent,info), ruleToSatisfy, isOnMenu); }
public ZeroAction GetAction(ZeroModule parent, MethodInfo info) { var action = BuildAction(parent,info); foreach (var attribute in info.GetCustomAttributes(typeof(ZeroActionParameterAttribute), true).Cast<ZeroActionParameterAttribute>()) { action.AddParam(attribute.Key, attribute.IsMandatory); } return action; }
private Action<object> ResolveDelegate(ZeroModule parent, MethodInfo info) { return (Action<object>)Delegate.CreateDelegate(typeof(Action<object>), parent,info); }
public Predicate<object> GetPredicate(ZeroModule parent, MethodInfo info) { return (Predicate<object>)Delegate.CreateDelegate(typeof(Predicate<object>), parent, info); }