summaryrefslogtreecommitdiff
path: root/csharp/test/Ice/objects/UnexpectedObjectExceptionTestI.cs
blob: e0507505f671e413306b4407c86a59992ee818f5 (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
// **********************************************************************
//
// Copyright (c) 2003-2015 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 Test;

public sealed class UnexpectedObjectExceptionTestI : Ice.Blobject
{
    public override bool ice_invoke(byte[] inParams, out byte[] outParams, Ice.Current current)
    {
        Ice.Communicator communicator = current.adapter.getCommunicator();
        Ice.OutputStream @out = new Ice.OutputStream(communicator);
        @out.startEncapsulation(current.encoding, Ice.FormatType.DefaultFormat);
        AlsoEmpty ae = new AlsoEmpty();
        @out.writeObject(ae);
        @out.writePendingObjects();
        @out.endEncapsulation();
        outParams = @out.finished();
        return true;
    }
}