added samples
[windows-sources.git] / sdk / samples / CrossTechnologySamples / WCFHostingWF2 / client / client.cs
blobe18a55eb12b0bad5aa0da032ff0a1d651a7fcd28
1 #region Using directives
3 using System;
4 using System.Collections.Generic;
5 using System.Text;
6 using System.ServiceModel;
7 using Microsoft.ServiceModel.Samples;
9 #endregion
11 namespace Microsoft.ServiceModel.Samples
13 class Client
15 static void Main(string[] args)
18 EchoableClient client = new EchoableClient();
20 try
22 string response = client.Echo("Hello");
23 Console.WriteLine("Client: Got {0} in response", response);
25 catch (FaultException<WorkflowAborted> ex)
27 Console.WriteLine("Client: Got {0} as a fault", ex.Detail.Message);
30 //Closing the client gracefully closes the connection and cleans up resources
31 client.Close();
33 Console.WriteLine();
34 Console.WriteLine("Press <ENTER> to terminate client.");
35 Console.ReadLine();