-
Notifications
You must be signed in to change notification settings - Fork 1
jdubs edited this page Oct 21, 2016
·
1 revision
Performs a traditional If statement and returns the evaluated value.
SpecName (constant) The variable for assignment of the resulting boolean value.
CompareA (multiple) The first object of comparison.
CompareB (multiple) The second object of comparison.
ResultYes (multiple) The value resulting in a positive comparison.
ResultNo (multiple) The value resulting in a negative comparison.
ErrorMessage (multiple | optional) The error message to return when any error occurs.
This method takes the two comparison variables and performs an comparison. If the comparison is true the ResultYes value and if false ResultNo is assigned to the SpecName.
public static void If(string SpecName, object CompareA, object CompareB, object ResultYes, object ResultNo, object ErrorMessage)
{
Break();
try
{
Variable(SpecName).Value = CompareA.Equals(CompareB) ? (string)ResultYes : (string)ResultNo;
}
catch (Exception ex)
{
throw new Four51ActionsException(ex.Message, (string)ErrorMessage);
}
}