コード例 #1
0
        public static void WriteRaw(ref byte destination, ref byte source, int sourceBytesToCopy, ref int idx)
        {
            var nCount = (uint)sourceBytesToCopy;

            switch (nCount)
            {
            case 0u: return;

            case 1u: WriteRaw1(ref destination, ref source, ref idx); return;

            case 2u: WriteRaw2(ref destination, ref source, ref idx); return;

            case 3u: WriteRaw3(ref destination, ref source, ref idx); return;

            case 4u: WriteRaw4(ref destination, ref source, ref idx); return;

            case 5u: WriteRaw5(ref destination, ref source, ref idx); return;

            case 6u: WriteRaw6(ref destination, ref source, ref idx); return;

            case 7u: WriteRaw7(ref destination, ref source, ref idx); return;

            case 8u: WriteRaw8(ref destination, ref source, ref idx); return;

            case 9u: WriteRaw9(ref destination, ref source, ref idx); return;

            case 10u: WriteRaw10(ref destination, ref source, ref idx); return;

            case 11u: WriteRaw11(ref destination, ref source, ref idx); return;

            case 12u: WriteRaw12(ref destination, ref source, ref idx); return;

            case 13u: WriteRaw13(ref destination, ref source, ref idx); return;

            case 14u: WriteRaw14(ref destination, ref source, ref idx); return;

            case 15u: WriteRaw15(ref destination, ref source, ref idx); return;

            case 16u: WriteRaw16(ref destination, ref source, ref idx); return;

            case 17u: WriteRaw17(ref destination, ref source, ref idx); return;

            case 18u: WriteRaw18(ref destination, ref source, ref idx); return;

            case 19u: WriteRaw19(ref destination, ref source, ref idx); return;

            case 20u: WriteRaw20(ref destination, ref source, ref idx); return;

            case 21u: WriteRaw21(ref destination, ref source, ref idx); return;

            case 22u: WriteRaw22(ref destination, ref source, ref idx); return;

            case 23u: WriteRaw23(ref destination, ref source, ref idx); return;

            case 24u: WriteRaw24(ref destination, ref source, ref idx); return;

            case 25u: WriteRaw25(ref destination, ref source, ref idx); return;

            case 26u: WriteRaw26(ref destination, ref source, ref idx); return;

            case 27u: WriteRaw27(ref destination, ref source, ref idx); return;

            case 28u: WriteRaw28(ref destination, ref source, ref idx); return;

            case 29u: WriteRaw29(ref destination, ref source, ref idx); return;

            case 30u: WriteRaw30(ref destination, ref source, ref idx); return;

            case 31u: WriteRaw31(ref destination, ref source, ref idx); return;

            default: UnsafeMemory.WriteRawBytes(ref destination, ref source, sourceBytesToCopy, ref idx); return;
            }
        }
コード例 #2
0
        public static void WriteRaw(ref MessagePackWriter writer, byte[] source, ref int idx)
        {
            var nCount = (uint)source.Length;

            switch (nCount)
            {
            case 0u: return;

            case 1u: WriteRaw1(ref writer, source, ref idx); return;

            case 2u: WriteRaw2(ref writer, source, ref idx); return;

            case 3u: WriteRaw3(ref writer, source, ref idx); return;

            case 4u: WriteRaw4(ref writer, source, ref idx); return;

            case 5u: WriteRaw5(ref writer, source, ref idx); return;

            case 6u: WriteRaw6(ref writer, source, ref idx); return;

            case 7u: WriteRaw7(ref writer, source, ref idx); return;

            case 8u: WriteRaw8(ref writer, source, ref idx); return;

            case 9u: WriteRaw9(ref writer, source, ref idx); return;

            case 10u: WriteRaw10(ref writer, source, ref idx); return;

            case 11u: WriteRaw11(ref writer, source, ref idx); return;

            case 12u: WriteRaw12(ref writer, source, ref idx); return;

            case 13u: WriteRaw13(ref writer, source, ref idx); return;

            case 14u: WriteRaw14(ref writer, source, ref idx); return;

            case 15u: WriteRaw15(ref writer, source, ref idx); return;

            case 16u: WriteRaw16(ref writer, source, ref idx); return;

            case 17u: WriteRaw17(ref writer, source, ref idx); return;

            case 18u: WriteRaw18(ref writer, source, ref idx); return;

            case 19u: WriteRaw19(ref writer, source, ref idx); return;

            case 20u: WriteRaw20(ref writer, source, ref idx); return;

            case 21u: WriteRaw21(ref writer, source, ref idx); return;

            case 22u: WriteRaw22(ref writer, source, ref idx); return;

            case 23u: WriteRaw23(ref writer, source, ref idx); return;

            case 24u: WriteRaw24(ref writer, source, ref idx); return;

            case 25u: WriteRaw25(ref writer, source, ref idx); return;

            case 26u: WriteRaw26(ref writer, source, ref idx); return;

            case 27u: WriteRaw27(ref writer, source, ref idx); return;

            case 28u: WriteRaw28(ref writer, source, ref idx); return;

            case 29u: WriteRaw29(ref writer, source, ref idx); return;

            case 30u: WriteRaw30(ref writer, source, ref idx); return;

            case 31u: WriteRaw31(ref writer, source, ref idx); return;

            default: UnsafeMemory.WriteRawBytes(ref writer, source, ref idx); return;
            }
        }