public void Run() { IWearFactory wear = new BlackWearFactory(); IClothes clothes = wear.CreateClothes(); ITrousers trousers = wear.CreateTrousers(); IShoes shoes = wear.CreateShoes(); clothes.Wear(); trousers.Wear(); shoes.Wear(); }
public Cient(IClothesFactory factory) { _shirt = factory.CreateShirt(); _trousers = factory.CreateTrousers(); }
public AbstractFactoryDP(IClothesFactory factory) { _shirt = factory.CreateShirt(); _trousers = factory.CreateTrousers(); }