public void WriteThing(SomeMemoryStreamWrapperThing dest, object subject)
        {
            dest.Write(fullTypeBinaryRepresentationCache.GetOrCompute(simplifiedType));

            using (dest.ReserveLength())
                using (var slotCountReservation = dest.ReserveCount()) {
                    var writer = new WriterThing(thisIsTotesTheRealLegitThingReaderWriterThing, dest);
                    userTypeSerializer.Serialize(writer, (TUserType)subject);
                    slotCountReservation.SetValue(writer.SlotCount);
                }
        }
        public void WriteThing(SomeMemoryStreamWrapperThing dest, object subject)
        {
            var byteArraySlice = (ByteArraySlice)subject;

            dest.Write(fullTypeBinaryRepresentationCache.GetOrCompute(typeof(byte[])));

            using (dest.ReserveLength())
                using (var countReservation = dest.ReserveCount()) {
                    for (var i = 0; i < byteArraySlice.Length; i++)
                    {
                        byteReaderWriter.WriteThing(dest, byteArraySlice.Buffer[i + byteArraySlice.Offset]);
                    }
                    countReservation.SetValue(byteArraySlice.Length);
                }
        }
        public void WriteThing(SomeMemoryStreamWrapperThing dest, object subject)
        {
            dest.Write(fullTypeBinaryRepresentationCache.GetOrCompute(simplifiedCollectionType));

            using (dest.ReserveLength())
                using (var countReservation = dest.ReserveCount()) {
                    int count = 0;
                    foreach (var x in (IEnumerable)subject)
                    {
                        count++;
                        thingReaderWriterDispatcherThing.WriteThing(dest, x);
                    }
                    countReservation.SetValue(count);
                }
        }