Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var client = new PizzaClient();

            System.Console.WriteLine(client.Prepare().Message);
            System.Console.ReadLine();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var client = new PizzaClient();
            var tc     = Transaction.Current;

            using (var t = new TransactionScope(tc))
            {
                try
                {
                    client.Prepare();
                    //client.Bake();
                    //client.Deliver();
                    t.Complete();
                }
                catch (Exception)
                {
                    t.Dispose();
                }
            }

            System.Console.WriteLine(client.Prepare().Message);
            System.Console.ReadLine();
        }