summaryrefslogtreecommitdiff
path: root/cs/demo/Ice/hello/Server.cs
diff options
context:
space:
mode:
Diffstat (limited to 'cs/demo/Ice/hello/Server.cs')
-rw-r--r--cs/demo/Ice/hello/Server.cs36
1 files changed, 24 insertions, 12 deletions
diff --git a/cs/demo/Ice/hello/Server.cs b/cs/demo/Ice/hello/Server.cs
index 8d17253cc75..b4fc2a08f6b 100644
--- a/cs/demo/Ice/hello/Server.cs
+++ b/cs/demo/Ice/hello/Server.cs
@@ -7,26 +7,38 @@
//
// **********************************************************************
-public class Server : Ice.Application
+using System;
+using System.Reflection;
+
+[assembly: CLSCompliant(true)]
+
+[assembly: AssemblyTitle("IceHelloServer")]
+[assembly: AssemblyDescription("Ice hello demo server")]
+[assembly: AssemblyCompany("ZeroC, Inc.")]
+
+public class Server
{
- public override int run(string[] args)
+ 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;
+ }
- Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello");
- adapter.add(new HelloI(), communicator().stringToIdentity("hello"));
- adapter.activate();
- communicator().waitForShutdown();
- return 0;
+ Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello");
+ adapter.add(new HelloI(), communicator().stringToIdentity("hello"));
+ 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)
{