diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-04-21 15:59:33 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-04-21 15:59:33 -0230 |
commit | ae58d9f09835de8d57e5ad27d9b33ffbcd0d5092 (patch) | |
tree | f96fbf2fd2643bf02c64931dedfd3b6772169705 /cs/demo/Ice/plugin/Server.cs | |
parent | Bug 2504 - added getPlugins method to PluginManager (diff) | |
download | ice-ae58d9f09835de8d57e5ad27d9b33ffbcd0d5092.tar.bz2 ice-ae58d9f09835de8d57e5ad27d9b33ffbcd0d5092.tar.xz ice-ae58d9f09835de8d57e5ad27d9b33ffbcd0d5092.zip |
Bug 3912 - added logger plugin demo
Diffstat (limited to 'cs/demo/Ice/plugin/Server.cs')
-rw-r--r-- | cs/demo/Ice/plugin/Server.cs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/cs/demo/Ice/plugin/Server.cs b/cs/demo/Ice/plugin/Server.cs new file mode 100644 index 00000000000..33b2415819a --- /dev/null +++ b/cs/demo/Ice/plugin/Server.cs @@ -0,0 +1,48 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2009 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. +// +// ********************************************************************** + +using System; +using System.Reflection; + +[assembly: CLSCompliant(true)] + +[assembly: AssemblyTitle("IcePluginServer")] +[assembly: AssemblyDescription("Ice plugin demo server")] +[assembly: AssemblyCompany("ZeroC, Inc.")] + +public class Server +{ + class App : Ice.Application + { + public override int run(string[] args) + { + 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; + } + } + + public static void Main(string[] args) + { + App app = new App(); + int status = app.main(args, "config.server"); + if(status != 0) + { + System.Environment.Exit(status); + } + } +} |