csharp: add ObjectPacker

This commit is contained in:
Kazuki Oikawa 2011-04-10 12:52:14 +09:00
parent 68a98d3dd0
commit 60643f023f
8 changed files with 404 additions and 6 deletions

View file

@ -15,7 +15,7 @@ namespace msgpack
_strm = strm;
}
void Write (byte x)
public void Write (byte x)
{
if (x < 128) {
_strm.WriteByte (x);
@ -27,7 +27,7 @@ namespace msgpack
}
}
void Write (ushort x)
public void Write (ushort x)
{
if (x < 0x100) {
Write ((byte)x);
@ -74,7 +74,7 @@ namespace msgpack
}
}
void Write (sbyte x)
public void Write (sbyte x)
{
if (x >= -32 && x <= -1) {
_strm.WriteByte ((byte)(0xe0 | (byte)x));
@ -88,7 +88,7 @@ namespace msgpack
}
}
void Write (short x)
public void Write (short x)
{
if (x >= sbyte.MinValue && x <= sbyte.MaxValue) {
Write ((sbyte)x);