Example #1
0
 public void Test()
 {
     if (Value && True != null)
     {
         True.Invoke();
     }
     else if (!Value && False != null)
     {
         False.Invoke();
     }
 }
        public void CompareTo()
        {
            switch (comparisonType)
            {
            case ComparisonType.Equal:
                if (firstValue == secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;

            case ComparisonType.NotEqual:
                if (firstValue != secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;

            case ComparisonType.Greater:
                if (firstValue > secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;

            case ComparisonType.Less:
                if (firstValue < secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;

            case ComparisonType.GreaterOrEqual:
                if (firstValue >= secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;

            case ComparisonType.LessOrEqual:
                if (firstValue <= secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;
            }
        }