FlipFlop Method
Definition
FlipFlop(bool, Action, Action)
Invokes one of two expressions depending on the value of condition.
public static void FlipFlop(bool condition, Action firstExpression, Action secondExpression)
Parameters
conditionboolWhen
true, thefirstExpressionis invoked; whenfalse, thesecondExpressionis invoked.firstExpressionActionThe delegate that is invoked when
conditionistrue.secondExpressionActionThe delegate that is invoked when
conditionisfalse.
FlipFlop<T>(bool, Action<T>, Action<T>, T)
Invokes one of two expressions depending on the value of condition.
public static void FlipFlop<T>(bool condition, Action<T> firstExpression, Action<T> secondExpression, T arg)
Parameters
conditionboolWhen
true, thefirstExpressionis invoked; whenfalse, thesecondExpressionis invoked.firstExpressionAction<T>The delegate that is invoked when
conditionistrue.secondExpressionAction<T>The delegate that is invoked when
conditionisfalse.argTThe parameter of the delegates
firstExpressionandsecondExpression.
Type Parameters
TThe type of the parameter of the delegates
firstExpressionandsecondExpression.
FlipFlop<T1, T2>(bool, Action<T1, T2>, Action<T1, T2>, T1, T2)
Invokes one of two expressions depending on the value of condition.
public static void FlipFlop<T1, T2>(bool condition, Action<T1, T2> firstExpression, Action<T1, T2> secondExpression, T1 arg1, T2 arg2)
Parameters
conditionboolWhen
true, thefirstExpressionis invoked; whenfalse, thesecondExpressionis invoked.firstExpressionAction<T1, T2>The delegate that is invoked when
conditionistrue.secondExpressionAction<T1, T2>The delegate that is invoked when
conditionisfalse.arg1T1The first parameter of the delegates
firstExpressionandsecondExpression.arg2T2The second parameter of the delegates
firstExpressionandsecondExpression.
Type Parameters
T1The type of the first parameter of the delegates
firstExpressionandsecondExpression.T2The type of the second parameter of the delegates
firstExpressionandsecondExpression.
FlipFlop<T1, T2, T3>(bool, Action<T1, T2, T3>, Action<T1, T2, T3>, T1, T2, T3)
Invokes one of two expressions depending on the value of condition.
public static void FlipFlop<T1, T2, T3>(bool condition, Action<T1, T2, T3> firstExpression, Action<T1, T2, T3> secondExpression, T1 arg1, T2 arg2, T3 arg3)
Parameters
conditionboolWhen
true, thefirstExpressionis invoked; whenfalse, thesecondExpressionis invoked.firstExpressionAction<T1, T2, T3>The delegate that is invoked when
conditionistrue.secondExpressionAction<T1, T2, T3>The delegate that is invoked when
conditionisfalse.arg1T1The first parameter of the delegates
firstExpressionandsecondExpression.arg2T2The second parameter of the delegates
firstExpressionandsecondExpression.arg3T3The third parameter of the delegates
firstExpressionandsecondExpression.
Type Parameters
T1The type of the first parameter of the delegates
firstExpressionandsecondExpression.T2The type of the second parameter of the delegates
firstExpressionandsecondExpression.T3The type of the third parameter of the delegates
firstExpressionandsecondExpression.
FlipFlop<T1, T2, T3, T4>(bool, Action<T1, T2, T3, T4>, Action<T1, T2, T3, T4>, T1, T2, T3, T4)
Invokes one of two expressions depending on the value of condition.
public static void FlipFlop<T1, T2, T3, T4>(bool condition, Action<T1, T2, T3, T4> firstExpression, Action<T1, T2, T3, T4> secondExpression, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
Parameters
conditionboolWhen
true, thefirstExpressionis invoked; whenfalse, thesecondExpressionis invoked.firstExpressionAction<T1, T2, T3, T4>The delegate that is invoked when
conditionistrue.secondExpressionAction<T1, T2, T3, T4>The delegate that is invoked when
conditionisfalse.arg1T1The first parameter of the delegates
firstExpressionandsecondExpression.arg2T2The second parameter of the delegates
firstExpressionandsecondExpression.arg3T3The third parameter of the delegates
firstExpressionandsecondExpression.arg4T4The fourth parameter of the delegates
firstExpressionandsecondExpression.
Type Parameters
T1The type of the first parameter of the delegates
firstExpressionandsecondExpression.T2The type of the second parameter of the delegates
firstExpressionandsecondExpression.T3The type of the third parameter of the delegates
firstExpressionandsecondExpression.T4The type of the fourth parameter of the delegates
firstExpressionandsecondExpression.
FlipFlop<T1, T2, T3, T4, T5>(bool, Action<T1, T2, T3, T4, T5>, Action<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5)
Invokes one of two expressions depending on the value of condition.
public static void FlipFlop<T1, T2, T3, T4, T5>(bool condition, Action<T1, T2, T3, T4, T5> firstExpression, Action<T1, T2, T3, T4, T5> secondExpression, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
Parameters
conditionboolWhen
true, thefirstExpressionis invoked; whenfalse, thesecondExpressionis invoked.firstExpressionAction<T1, T2, T3, T4, T5>The delegate that is invoked when
conditionistrue.secondExpressionAction<T1, T2, T3, T4, T5>The delegate that is invoked when
conditionisfalse.arg1T1The first parameter of the delegates
firstExpressionandsecondExpression.arg2T2The second parameter of the delegates
firstExpressionandsecondExpression.arg3T3The third parameter of the delegates
firstExpressionandsecondExpression.arg4T4The fourth parameter of the delegates
firstExpressionandsecondExpression.arg5T5The fifth parameter of the delegates
firstExpressionandsecondExpression.
Type Parameters
T1The type of the first parameter of the delegates
firstExpressionandsecondExpression.T2The type of the second parameter of the delegates
firstExpressionandsecondExpression.T3The type of the third parameter of the delegates
firstExpressionandsecondExpression.T4The type of the fourth parameter of the delegates
firstExpressionandsecondExpression.T5The type of the fifth parameter of the delegates
firstExpressionandsecondExpression.