| // This file automatically generated by: |
| // Apache Etch 1.2.0-incubating (LOCAL-0) / csharp 1.2.0-incubating (LOCAL-0) |
| // Mon Mar 28 12:14:36 CEST 2011 |
| // This file is automatically created for your convenience and will not be |
| // overwritten once it exists! Please edit this file as necessary to implement |
| // your service logic. |
| |
| using System; |
| |
| using org.apache.etch.examples.mixin.types.Example; |
| |
| namespace org.apache.etch.examples.mixin |
| { |
| ///<summary>Main implementation for ExampleClient.</summary> |
| public class MainExampleClient : ExampleHelper.ExampleClientFactory |
| { |
| ///<summary>Main for ExampleClient</summary> |
| ///<param name="args">Command Line Arguments</param> |
| public static void Main(String[] args) |
| { |
| // TODO: Change to correct URI |
| string uri = "tcp://127.0.0.1:4001"; |
| |
| RemoteExampleServer server = ExampleHelper.NewServer( uri, null, new MainExampleClient()); |
| |
| // Connect to the service |
| server._StartAndWaitUp( 4000 ); |
| |
| // define result string |
| string res = null; |
| |
| res = server.say_hello("Hello"); |
| Console.WriteLine(res); |
| |
| res = server.say_hello_mixin("Hello"); |
| Console.WriteLine(res); |
| |
| // Disconnect from the service |
| server._StopAndWaitDown( 4000 ); |
| } |
| |
| ///<summary>Return a new instance of ExampleClient.</summary> |
| ///<param name="server">Reference to remote service</param> |
| ///<returns>Client Implementation</returns> |
| public ExampleClient NewExampleClient( RemoteExampleServer server ) |
| { |
| return new ImplExampleClient( server ); |
| } |
| } |
| } |