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);
 }
예제 #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");
     }
 }
예제 #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);
     }
 }
예제 #4
0
 //Invoke Repairs event
 public virtual void OnRequest(RepairEventArgs e)
 {
     Repairs?.Invoke(this, e);
 }
예제 #5
0
 //Repairs event handler
 public abstract void RepairsHandler(object sender, RepairEventArgs e);