//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
namespace Ice
{
///
/// Unknown sliced value holds an instance of an unknown Slice class type.
///
public sealed class UnknownSlicedValue : Value
{
///
/// Represents an instance of a Slice class type having the given Slice type.
///
/// The Slice type ID of the unknown object.
public UnknownSlicedValue(string unknownTypeId)
{
_unknownTypeId = unknownTypeId;
}
///
/// Returns the sliced data if the value has a preserved-slice base class and has been sliced during
/// un-marshaling of the value, null is returned otherwise.
///
/// The sliced data or null.
public override SlicedData ice_getSlicedData()
{
return _slicedData;
}
///
/// Returns the Slice type ID associated with this object.
///
/// The type ID.
public override string ice_id()
{
return _unknownTypeId;
}
public override void iceWrite(OutputStream ostr)
{
ostr.startValue(_slicedData);
ostr.endValue();
}
public override void iceRead(InputStream istr)
{
istr.startValue();
_slicedData = istr.endValue(true);
}
private string _unknownTypeId;
private SlicedData _slicedData;
}
}