Ejemplo n.º 1
0
        public void Unsubscribe(CarFactory carFactory)
        {
            if (!_carFactories.Contains(carFactory))
            {
                throw new Exception("Not subscribe !");
            }

            RemoveCarCompany(carFactory);
            carFactory.RemoveClient(this);
        }
Ejemplo n.º 2
0
        public void Subscription(CarFactory carFactory)
        {
            if (_carFactories.Contains(carFactory))
            {
                throw new Exception("You already have a subscription to this company !");
            }

            AddCarCompany(carFactory);
            carFactory.AddClient(this);
        }
Ejemplo n.º 3
0
        public void Subscription(CarFactory carFactory)
        {
            if (_carFactory.Contains(carFactory))
            {
                throw new Exception("Already subscribe !");
            }

            AddCarCompany(carFactory);
            carFactory.AddClient(this);
        }
Ejemplo n.º 4
0
 public void Unsubscribe(CarFactory carFactory)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 5
0
 void RemoveCarCompany(CarFactory carFactoryCompany) => _carFactories.Remove(carFactoryCompany);
Ejemplo n.º 6
0
 void AddCarCompany(CarFactory carFactoryCompany) => _carFactories.Add(carFactoryCompany);