using System;
using System.Text;
using System.Collections;
namespace OrdersParser{
/// <summary>
/// The class holds the collection of fictional orders.
/// </summary>
public class OrdersHistory
{
private ArrayList orders = new ArrayList();
public OrdersHistory()
{
}
public ArrayList Orders
{
get { return orders; }
}
public void AddOrder(Order order)
{
orders.Add(order);
}
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("==========================================");
foreach(Order order in orders)
{
sb.Append("\n")
.Append(order.ToString())
.Append("\n==========================================");
}
return sb.ToString();
}
}
}
|