mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
csharp: add ObjectPacker
This commit is contained in:
parent
68a98d3dd0
commit
60643f023f
8 changed files with 404 additions and 6 deletions
|
|
@ -37,6 +37,11 @@ namespace msgpack
|
|||
this.Type == TypePrefixes.Int32;
|
||||
}
|
||||
|
||||
public bool IsBoolean ()
|
||||
{
|
||||
return this.Type == TypePrefixes.True || this.Type == TypePrefixes.False;
|
||||
}
|
||||
|
||||
public bool IsSigned64 ()
|
||||
{
|
||||
return this.Type == TypePrefixes.Int64;
|
||||
|
|
@ -44,7 +49,8 @@ namespace msgpack
|
|||
|
||||
public bool IsUnsigned ()
|
||||
{
|
||||
return this.Type == TypePrefixes.UInt8 ||
|
||||
return this.Type == TypePrefixes.PositiveFixNum ||
|
||||
this.Type == TypePrefixes.UInt8 ||
|
||||
this.Type == TypePrefixes.UInt16 ||
|
||||
this.Type == TypePrefixes.UInt32;
|
||||
}
|
||||
|
|
@ -132,6 +138,7 @@ namespace msgpack
|
|||
break;
|
||||
case TypePrefixes.PositiveFixNum:
|
||||
ValueSigned = x & 0x7f;
|
||||
ValueUnsigned = (uint)ValueSigned;
|
||||
break;
|
||||
case TypePrefixes.UInt8:
|
||||
x = _strm.ReadByte ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue