예제 #1
0
        static void WriteBufferedBytes(CustomBuffer customBuffer, byte[] buffer, int tag)
        {
            var lengthBuffer = Int32ToBytes(buffer.Length);

            customBuffer.Write(EncodeLength(lengthBuffer.Length, tag));
            customBuffer.Write(lengthBuffer);
            customBuffer.Write(buffer);
        }
예제 #2
0
 public static void WriteTypeIDFor(CustomBuffer customBuffer, Type baseType, Type type)
 {
     if (baseType == ObjectType)
     {
         return;
     }
     TypeIDByteArray[0] = TypeMapping[baseType][type];
     customBuffer.Write(TypeIDByteArray);
 }
예제 #3
0
 static void WriteUnBufferedBytes(CustomBuffer customBuffer, byte[] buffer, int tag)
 {
     customBuffer.Write(EncodeLength(buffer.Length, tag));
     customBuffer.Write(buffer);
 }