public Procuct MakeToyCar() { Procuct procuct = new Procuct(); procuct.Name = "Toy car"; return(procuct); }
public Procuct MakePizza() { Procuct procuct = new Procuct(); procuct.Name = "Pizza"; return(procuct); }
public Box WrapProdect(Func <Procuct> getProduct, Action <Procuct> logCallback) { Box box = new Box(); Procuct procuct = getProduct(); box.Procuct = procuct; logCallback(procuct); return(box); }
public void Log(Procuct product) { Console.WriteLine("Procduct {0} created at {1},price is {2}", product.Name, DateTime.UtcNow, product.Price); }