diff options
Diffstat (limited to 'cs/demo/Ice/invoke/Server.cs')
-rw-r--r-- | cs/demo/Ice/invoke/Server.cs | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/cs/demo/Ice/invoke/Server.cs b/cs/demo/Ice/invoke/Server.cs index c3f20e9454d..670d3bcc048 100644 --- a/cs/demo/Ice/invoke/Server.cs +++ b/cs/demo/Ice/invoke/Server.cs @@ -9,28 +9,37 @@ using Demo; using System; +using System.Reflection; -public class Server : Ice.Application +[assembly: CLSCompliant(true)] + +[assembly: AssemblyTitle("IceInvokeServer")] +[assembly: AssemblyDescription("Ice invoke demo server")] +[assembly: AssemblyCompany("ZeroC, Inc.")] + +public class Server { - public override int - run(string[] args) + public class App : Ice.Application { - if(args.Length > 0) + public override int run(string[] args) { - Console.Error.WriteLine(appName() + ": too many arguments"); - return 1; - } + if(args.Length > 0) + { + Console.Error.WriteLine(appName() + ": too many arguments"); + return 1; + } - Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Printer"); - adapter.add(new PrinterI(), communicator().stringToIdentity("printer")); - adapter.activate(); - communicator().waitForShutdown(); - return 0; + Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Printer"); + adapter.add(new PrinterI(), communicator().stringToIdentity("printer")); + adapter.activate(); + communicator().waitForShutdown(); + return 0; + } } public static void Main(string[] args) { - Server app = new Server(); + App app = new App(); int status = app.main(args, "config.server"); if(status != 0) { |