private static ArraySegment <char> SerializeToCharArraySegment(UpdateBatch batch, ISerializer serializer, object data) { var writer = batch.GetWriter(); serializer.ToJson(data, writer); return(writer.ToCharSegment()); }
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)); }