Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var manager   = OrderSpecificationManagerFactory.CreateNewOrderSpecificationManager();
            var orderList = new List <Order>()
            {
                new Order()
                {
                    CustomerInfo = new Customer()
                    {
                        CustomerType = CustomerTypeEnum.Vip
                    }
                },
                new Order()
                {
                    CustomerInfo = new Customer()
                    {
                        CustomerType = CustomerTypeEnum.Normal
                    }
                }
            };
            OrderBusiness business = new OrderBusiness(manager);

            using (manager)
            {
                orderList.ForEach(p => business.SubmitOrder(p));
            }
        }
Ejemplo n.º 2
0
 public void Dispose()
 {
     OrderSpecificationManagerFactory.FreezeOrderSpecificationManagerObject(this);
 }