@@ -205,18 +205,6 @@ private static bool TryGetLengthFromFixStr(DataTypes type, out uint length)
205205 return type . GetHighBits ( 3 ) == DataTypes . FixStr . GetHighBits ( 3 ) ;
206206 }
207207
208- protected static bool TryGetLengthFromFixArray ( DataTypes type , out uint length )
209- {
210- length = type - DataTypes . FixArray ;
211- return type . GetHighBits ( 4 ) == DataTypes . FixArray . GetHighBits ( 4 ) ;
212- }
213-
214- protected static bool TryGetLengthFromFixMap ( DataTypes type , out uint length )
215- {
216- length = type - DataTypes . FixMap ;
217- return type . GetHighBits ( 4 ) == DataTypes . FixMap . GetHighBits ( 4 ) ;
218- }
219-
220208 private void SkipMapItems ( uint count )
221209 {
222210 while ( count > 0 )
@@ -240,9 +228,40 @@ private void SkipBytes(uint bytesCount)
240228 {
241229 Seek ( bytesCount , SeekOrigin . Current ) ;
242230 }
243-
231+
232+ /// <summary>
233+ /// Try getting length fixed MessagePack Array
234+ /// </summary>
235+ /// <param name="type">MessagePack Array type <see cref="DataTypes.FixArray"/></param>
236+ /// <param name="length">Out length MessagePack Array</param>
237+ /// <returns>True if luck otherwise false</returns>
238+ protected static bool TryGetLengthFromFixArray ( DataTypes type , out uint length )
239+ {
240+ length = type - DataTypes . FixArray ;
241+ return type . GetHighBits ( 4 ) == DataTypes . FixArray . GetHighBits ( 4 ) ;
242+ }
243+
244+ /// <summary>
245+ /// Try getting length fixed MessagePack Map
246+ /// </summary>
247+ /// <param name="type">MessagePack Map type <see cref="DataTypes.FixMap"/></param>
248+ /// <param name="length">Out length MessagePack Map</param>
249+ /// <returns>True if luck otherwise false</returns>
250+ protected static bool TryGetLengthFromFixMap ( DataTypes type , out uint length )
251+ {
252+ length = type - DataTypes . FixMap ;
253+ return type . GetHighBits ( 4 ) == DataTypes . FixMap . GetHighBits ( 4 ) ;
254+ }
255+
256+ /// <summary>
257+ /// Stopping the collection of MessagePack token
258+ /// </summary>
259+ /// <returns>Array segment bytes <see cref="ArraySegment"/></returns>
244260 protected abstract ArraySegment ? StopTokenGathering ( ) ;
245261
262+ /// <summary>
263+ /// Start the collection of MessagePack token
264+ /// </summary>
246265 protected abstract void StartTokenGathering ( ) ;
247266 }
248267}
0 commit comments