summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2015-03-11 11:47:16 -0400
committerJoe George <joe@zeroc.com>2015-05-12 11:42:05 -0400
commit528f1bc75e77c996954bec57de7a258ce444d97f (patch)
tree0f5f27600fa5d302a1d095138aac193c7ac3691f
parentIce 3.4.2 Patch 4 (diff)
downloadice-528f1bc75e77c996954bec57de7a258ce444d97f.tar.bz2
ice-528f1bc75e77c996954bec57de7a258ce444d97f.tar.xz
ice-528f1bc75e77c996954bec57de7a258ce444d97f.zip
Ice 3.4.2 Patch 5
Add missing C# methods in BasicStream
-rw-r--r--cs/src/Ice/BasicStream.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/cs/src/Ice/BasicStream.cs b/cs/src/Ice/BasicStream.cs
index f11def4ec0d..021187be39a 100644
--- a/cs/src/Ice/BasicStream.cs
+++ b/cs/src/Ice/BasicStream.cs
@@ -1050,6 +1050,15 @@ namespace IceInternal
_buf.b.putShort(v);
}
+ public virtual void writeShort(short v, int end)
+ {
+ if(v < 0 || v >= end)
+ {
+ throw new Ice.MarshalException("enumerator out of range");
+ }
+ writeShort(v);
+ }
+
public virtual void writeShortSeq(short[] v)
{
if(v == null)
@@ -1134,6 +1143,16 @@ namespace IceInternal
}
}
+ public virtual short readShort(int end)
+ {
+ short v = readShort();
+ if(v < 0 || v >= end)
+ {
+ throw new Ice.MarshalException("enumerator out of range");
+ }
+ return v;
+ }
+
public virtual short[] readShortSeq()
{
try
@@ -1199,6 +1218,15 @@ namespace IceInternal
_buf.b.putInt(v);
}
+ public virtual void writeInt(int v, int end)
+ {
+ if(v < 0 || v >= end)
+ {
+ throw new Ice.MarshalException("enumerator out of range");
+ }
+ writeInt(v);
+ }
+
public virtual void writeIntSeq(int[] v)
{
if(v == null)
@@ -1283,6 +1311,16 @@ namespace IceInternal
}
}
+ public virtual int readInt(int end)
+ {
+ int v = readInt();
+ if(v < 0 || v >= end)
+ {
+ throw new Ice.MarshalException("enumerator out of range");
+ }
+ return v;
+ }
+
public virtual int[] readIntSeq()
{
try