using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Activities;

namespace WCFServiceClient
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("准备连接到WCF服务....");
            WorkflowInvoker invoker = new WorkflowInvoker(new Calculator());
            Dictionary<string, object> data = new Dictionary<string, object>();
            Console.Write("请输入数字：");
            int num = 0;
            int.TryParse(Console.ReadLine(), out num);
            data.Add("Data", num);
            Console.WriteLine("调用WCF服务，传送数据....");
            IDictionary<string, object> results = invoker.Invoke(data);
            Console.WriteLine("结果 = " + results["Result"]);
            Console.ReadLine();
        }
    }
}
