summaryrefslogtreecommitdiff
path: root/cs/demo/Ice/hello/HelloI.cs
blob: 5d3c56ac15d5a52430d70fdeadbc5d115a88cc26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// **********************************************************************
//
// Copyright (c) 2003-2007 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 Demo;

public class HelloI : HelloDisp_
{
    public override void sayHello(int delay, Ice.Current current)
    {
        if(delay > 0)
        {
            System.Threading.Thread.Sleep(delay);
        }
        System.Console.Out.WriteLine("Hello World!");
    }
    
    public override void shutdown(Ice.Current current)
    {
        System.Console.Out.WriteLine("Shutting down...");
        current.adapter.getCommunicator().shutdown();
    }
}