示例#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();
        }