/// <summary>
        /// Visits the specified element.
        /// </summary>
        /// <param name="abstractElement">The abstract element.</param>
        public void Visit(AbstractElement abstractElement)
        {
            ConcreteEmployee concreteEmployee = abstractElement as ConcreteEmployee;

            if (concreteEmployee == null)
            {
                throw new NotImplementedException();
            }
            //Console.WriteLine("{0} {1}'s new vacation days: {2}", concreteEmployee.GetType().Name, concreteEmployee.Name, concreteEmployee.VacationDays);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Detaches the specified concrete employee.
 /// </summary>
 /// <param name="concreteEmployee">The concrete employee.</param>
 public void Detach(ConcreteEmployee concreteEmployee)
 {
     this._concreteEmployees.Remove(concreteEmployee);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Attaches the specified concrete employee.
 /// </summary>
 /// <param name="concreteEmployee">The concrete employee.</param>
 public void Attach(ConcreteEmployee concreteEmployee)
 {
     this._concreteEmployees.Add(concreteEmployee);
 }