Beispiel #1
0
 public static void FireEvent(RuleDelegate ruleEvent, object sender, RuleEventArgs args)
 {
     if (ruleEvent != null)
     {
         ruleEvent(sender, args);
     }
 }
Beispiel #2
0
 public static void FireEvent(RuleDelegate ruleEvent, object sender, RuleEventArgs args)
 {
     if (ruleEvent != null)
     {
         ruleEvent(sender, args);
     }
 }
Beispiel #3
0
        public override void Invoke(object sender, RuleEventArgs e)
        {
            OnBeginRuleEvaluation(this);

            employee.OverTimeHours = 1.5*(employee.HoursWorked - 40.0);

            OnRulePassed(this);

            OnEndRuleEvaluation(this);
        }
Beispiel #4
0
        public override void Invoke(object sender, RuleEventArgs e)
        {
            bool pass = (GenerateRandomNumbers.GetRandomNumber(999))%2 == 0;

            _logger.Log(string.Format("Results: {1} :: Rule Name: {0}, ", Name, pass ? "PASSED" : "FAILED"));
            if (pass)
                OnRulePassed(this);
            else
                OnRuleFailed(this);
        }
Beispiel #5
0
        public override void Invoke(object sender, RuleEventArgs e)
        {
            OnBeginRuleEvaluation(this);

            if (employee.HoursWorked > 40 && employee.HoursWorked <= 60)
            {
                OnRulePassed(this);
            }
            else
            {
                OnRuleFailed(this);
            }

            OnEndRuleEvaluation(this);
        }
Beispiel #6
0
 public virtual void Invoke(object sender, RuleEventArgs e)
 {
     throw new NotImplementedException();
 }
Beispiel #7
0
		public override void Invoke(object sender, RuleEventArgs e)
		{
			OnBeginRuleEvaluation(this);

			OnEndRuleEvaluation(this);
		}
Beispiel #8
0
		public override void Invoke(object sender, RuleEventArgs e)
		{
			OnBeginRuleEvaluation(this);

			if (employee.EmployeeType == EmployeeType.Salary)
			{
				OnRulePassed(this);
			}
			else
			{
				OnRuleFailed(this);
			}

			OnEndRuleEvaluation(this);
		}
Beispiel #9
0
 public virtual void Invoke(object sender, RuleEventArgs e)
 {
     throw new NotImplementedException();
 }