Skip to content

Commit b82627a

Browse files
committed
Fix MPO represents ext type returns byte[] type for UnderlyingType property. A part of #269.
1 parent 44a9446 commit b82627a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/MsgPack/MessagePackObject.Utilities.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,14 @@ public Type UnderlyingType
10371037
{
10381038
return asMps.GetUnderlyingType();
10391039
}
1040+
else if ( this._handleOrTypeCode is byte[] )
1041+
{
1042+
// It should be MPETO
1043+
#if DEBUG
1044+
Contract.Assert( ( this._value & 0xFFFFFFFFFFFFFF00 ) == 0, "( " + this._value.ToString( "X16" ) + " & 0xFFFFFFFFFFFFFF00 ) != 0" );
1045+
#endif // DEBUG
1046+
return typeof( MessagePackExtendedTypeObject );
1047+
}
10401048
else
10411049
{
10421050
return this._handleOrTypeCode.GetType();

0 commit comments

Comments
 (0)