Ejemplo n.º 1
0
        private static ArraySegment <char> SerializeToCharArraySegment(UpdateBatch batch, ISerializer serializer, object data)
        {
            var writer = batch.GetWriter();

            serializer.ToJson(data, writer);
            return(writer.ToCharSegment());
        }
Ejemplo n.º 2
0
        static ArraySegment <char> SerializeToCharArraySegment(UpdateBatch batch, ISerializer serializer, object data)
        {
            var writer = batch.GetWriter();

            serializer.ToJson(data, writer);
            return(new ArraySegment <char>(writer.Buffer, 0, writer.Size));
        }