public void DisplayProducts() { IChair chair = factory.CreateChair(); Console.WriteLine($"{chair.Name}, has legs: {chair.HasLegs}"); ISofa sofa = factory.CreateSofa(); Console.WriteLine($"{sofa.Name}, can sit on: {sofa.CanSitOn}"); }
protected override void When() { try { _result = _sut.CrearSofa(); } catch (Exception exception) { _exception = exception; } }
void ShowRoomProject(IRoomFactory roomFactory) { Console.WriteLine(); Console.WriteLine("Budujemy pokoj w stylu " + roomFactory.GetType().Name); Console.WriteLine("Pokoj będzię się składał z:"); IChair chair = roomFactory.CreateChair(); Console.WriteLine(chair.Show()); ISofa sofa = roomFactory.CreateSofa(); Console.WriteLine(sofa.Show()); Console.WriteLine(); }
public FurnitureSeller() { factory = new T(); sofa = factory.CreateSofa(); chair = factory.CreateChair(); }
public void CreateFurniture() { Chair = Factory.CreateChair(); Sofa = Factory.CreateSofa(); }
public ShopClient(IShop s, CommonEnums.ChairTypes cTypes, CommonEnums.SofaTypes sTypes) { chair = s.GetChair(cTypes); sofa = s.GetSofa(sTypes); }
public Set(IChair chair, ICoffeTable coffeTable, ISofa sofa) : this(chair, coffeTable) { Sofa = sofa; }
public void DeleteSofa(ISofa sofa) { totalCost -= sofa.Cost; --installationNumber; }
public Clients(IFurniture furniture, string segment) { chair = furniture.CreateChair(segment); table = furniture.CreateTable(segment); sofa = furniture.CreateSofa(segment); }