public override void RepairsHandler(object sender, RepairEventArgs e)
 {
     if (e.Repairs.approved == false)
     {
         Console.WriteLine("Diagnosed car for repairs");
     }
     else
     {
         Console.WriteLine("Made repairs");
     }
     SuccessorA.RepairsHandler(this, e);
 }
Example #2
0
 public override void RepairsHandler(object sender, RepairEventArgs e)
 {
     if (e.Repairs.approved == false)
     {
         Console.WriteLine("Created new schedule for car repair");
         SuccessorA.RepairsHandler(this, e);
     }
     else
     {
         Console.WriteLine("Billed customer for work rendered");
     }
 }
Example #3
0
 public override void RepairsHandler(object sender, RepairEventArgs e)
 {
     if (e.Repairs.approved == false)
     {
         e.Repairs.approved = true;
         Console.WriteLine("Approved parts & labor for repairs");
         SuccessorA.RepairsHandler(this, e);
     }
     else
     {
         Console.WriteLine("Approved repaired car");
         SuccessorB.RepairsHandler(this, e);
     }
 }
Example #4
0
 //Invoke Repairs event
 public virtual void OnRequest(RepairEventArgs e)
 {
     Repairs?.Invoke(this, e);
 }
Example #5
0
 //Repairs event handler
 public abstract void RepairsHandler(object sender, RepairEventArgs e);