private void Record(RecordingDetails commandDetails, JsonOperationContext context)
 {
     using (var commandDetailsReader = SerializeRecordingCommandDetails(context, commandDetails))
         using (var writer = new BlittableJsonTextWriter(context, _txOpMerger._recording.Stream))
         {
             writer.WriteComma();
             context.Write(writer, commandDetailsReader);
         }
 }
                internal override void Record(DocumentsOperationContext ctx, TxInstruction tx, bool doRecord = true)
                {
                    if (doRecord == false)
                    {
                        return;
                    }

                    var commandDetails = new RecordingDetails(tx.ToString());

                    Record(commandDetails, ctx);
                }
            private static BlittableJsonReaderObject SerializeRecordingCommandDetails(
                JsonOperationContext context,
                RecordingDetails commandDetails)
            {
                using (var writer = new BlittableJsonWriter(context))
                {
                    var jsonSerializer = ReplayTxCommandHelper.GetJsonSerializer();

                    jsonSerializer.Serialize(writer, commandDetails);
                    writer.FinalizeDocument();

                    return(writer.CreateReader());
                }
            }