diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-05-25 13:45:13 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-05-25 13:45:13 +0000 |
commit | db693e3cf4413690e5898d16b8651cf36b64a5bc (patch) | |
tree | a16dad9beb7811d225bd13b53356bc88af341cef /cs/demo/IceGrid/allocate/Server.cs | |
parent | Added IceGrid aloocate demo (diff) | |
download | ice-db693e3cf4413690e5898d16b8651cf36b64a5bc.tar.bz2 ice-db693e3cf4413690e5898d16b8651cf36b64a5bc.tar.xz ice-db693e3cf4413690e5898d16b8651cf36b64a5bc.zip |
Added IceGrid allocate demo
Diffstat (limited to 'cs/demo/IceGrid/allocate/Server.cs')
-rw-r--r-- | cs/demo/IceGrid/allocate/Server.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/cs/demo/IceGrid/allocate/Server.cs b/cs/demo/IceGrid/allocate/Server.cs new file mode 100644 index 00000000000..0270419690f --- /dev/null +++ b/cs/demo/IceGrid/allocate/Server.cs @@ -0,0 +1,29 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +public class Server : Ice.Application +{ + public override int run(string[] args) + { + Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello"); + Ice.Properties properties = communicator().getProperties(); + Ice.Identity id = communicator().stringToIdentity(properties.getProperty("Identity")); + adapter.add(new HelloI(properties.getProperty("Ice.ServerId")), id); + adapter.activate(); + communicator().waitForShutdown(); + return 0; + } + + static public void Main(string[] args) + { + Server app = new Server(); + int status = app.main(args); + System.Environment.Exit(status); + } +} |