public VariableValueBus(Delegates.Function<string, string> variableValueGetter, string[] suppresedVariables) { if (variableValueGetter == null) throw new ArgumentNullException("Variable value getter method is required."); this.variableValueGetter = variableValueGetter; foreach (string varName in suppresedVariables) this.suppresedVariables.Add(varName, varName); }
public static Delegates.Function <bool> Or(Delegates.Function <bool> a, Delegates.Function <bool> b) { return(delegate() { if (a == null || b == null) { return false; } return (a() || b()); }); }
public static Delegates.Function <bool> Not(Delegates.Function <bool> a) { if (a == null) { return(null); } return(delegate() { return !a(); }); }
/// <summary> /// Set a callback method for the last call /// </summary> public static IMethodOptions <object> Callback <TArg0, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8, TArg9>( Delegates.Function <bool, TArg0, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8, TArg9> callback) { return(Callback((Delegate)callback)); }
/// <summary> /// Set a callback method for the last call /// </summary> public static IMethodOptions <object> Callback <TArg0, TArg1, TArg2>(Delegates.Function <bool, TArg0, TArg1, TArg2> callback) { return(Callback((Delegate)callback)); }
/// <summary> /// Set a callback method for the last call /// </summary> public static IMethodOptions <object> Callback(Delegates.Function <bool> callback) { return(Callback((Delegate)callback)); }
/// <summary> /// Set a callback method for the last call /// </summary> public IMethodOptions <T> Callback <TArg0, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8>( Delegates.Function <bool, TArg0, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8> callback) { return(Callback((Delegate)callback)); }
/// <summary> /// Set a callback method for the last call /// </summary> public IMethodOptions <T> Callback <TArg0, TArg1>(Delegates.Function <bool, TArg0, TArg1> callback) { return(Callback((Delegate)callback)); }