예제 #1
0
파일: Program.cs 프로젝트: quan-ma/SOAP
        static void Main(string[] args)
        {
            var client = new PizzaClient();

            System.Console.WriteLine(client.Prepare().Message);
            System.Console.ReadLine();
        }
예제 #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();
        }