示例#1
0
        public void DoTest()
        {
            Console.WriteLine("DoTest thread: {0}", Thread.CurrentThread.ManagedThreadId);
            client = WcfServiceClient <INameEntityService> .Create("test1");

            client.AsyncCompleted += new EventHandler <GenericAsyncCompletedEventArgs>(client1_AsynchCompleted);

            //client.AsyncBegin(client.Instance.GetAddress, null, 8);

            client.AsyncBegin("GetAddress", null, 8);
            client.AsyncBegin("DoSomethingElse", null, "comm");     //test a void return type
            client.AsyncBegin("DoNothing", null, null);             //test void return type with no params
        }