diff options
author | Mark Spruiell <mes@zeroc.com> | 2008-02-08 16:57:37 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2008-02-08 16:57:37 -0800 |
commit | e754cd9f687138f7d58b477718bf061801f68d95 (patch) | |
tree | 1ee35e6203ca8538bb30311d8e987eec56b205d3 /cs/demo/Ice/async/Server.cs | |
parent | cleaning up enum mapping (diff) | |
download | ice-e754cd9f687138f7d58b477718bf061801f68d95.tar.bz2 ice-e754cd9f687138f7d58b477718bf061801f68d95.tar.xz ice-e754cd9f687138f7d58b477718bf061801f68d95.zip |
bug 1960 - empty application name in Windows Firewall list
Diffstat (limited to 'cs/demo/Ice/async/Server.cs')
-rw-r--r-- | cs/demo/Ice/async/Server.cs | 58 |
1 files changed, 35 insertions, 23 deletions
diff --git a/cs/demo/Ice/async/Server.cs b/cs/demo/Ice/async/Server.cs index 2733c9f02c2..0c2598bd527 100644 --- a/cs/demo/Ice/async/Server.cs +++ b/cs/demo/Ice/async/Server.cs @@ -7,45 +7,57 @@ // // ********************************************************************** -public class Server : Ice.Application +using System; +using System.Reflection; + +[assembly: CLSCompliant(true)] + +[assembly: AssemblyTitle("IceAsyncServer")] +[assembly: AssemblyDescription("Ice async 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) { - System.Console.Error.WriteLine(appName() + ": too many arguments"); - return 1; - } + if(args.Length > 0) + { + System.Console.Error.WriteLine(appName() + ": too many arguments"); + return 1; + } - callbackOnInterrupt(); + callbackOnInterrupt(); - Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello"); - _workQueue = new WorkQueue(); - adapter.add(new HelloI(_workQueue), communicator().stringToIdentity("hello")); + Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello"); + _workQueue = new WorkQueue(); + adapter.add(new HelloI(_workQueue), communicator().stringToIdentity("hello")); - _workQueue.Start(); - adapter.activate(); + _workQueue.Start(); + adapter.activate(); - communicator().waitForShutdown(); - _workQueue.Join(); - return 0; - } + communicator().waitForShutdown(); + _workQueue.Join(); + return 0; + } - public override void interruptCallback(int sig) - { - _workQueue.destroy(); - communicator().shutdown(); + public override void interruptCallback(int sig) + { + _workQueue.destroy(); + communicator().shutdown(); + } + + private WorkQueue _workQueue; } public static void Main(string[] args) { - Server app = new Server(); + App app = new App(); int status = app.main(args, "config.server"); if(status != 0) { System.Environment.Exit(status); } } - - private WorkQueue _workQueue; } |