ReadOnlySpan <byte> ValueToByteArray(TValue value, ref SpanWriter writer) { IWriterCtx ctx = null; if (_valueHandler.NeedsCtx()) { ctx = new DBWriterCtx(_tr); } _valueWriter(value, ref writer, ctx); return(writer.GetPersistentSpanAndReset()); }
ByteBuffer KeyToByteArray(TKey key) { var writer = new ByteBufferWriter(); IWriterCtx ctx = null; if (_keyHandler.NeedsCtx()) { ctx = new DBWriterCtx(_tr, writer); } _keyWriter(key, writer, ctx); return(writer.Data); }
ReadOnlySpan <byte> KeyToByteArray(TKey key, ref SpanWriter writer) { writer.WriteBlock(_prefix); IWriterCtx ctx = null; if (_keyHandler.NeedsCtx()) { ctx = new DBWriterCtx(_tr); } _keyWriter(key, ref writer, ctx); return(writer.GetPersistentSpanAndReset()); }
ReadOnlySpan <byte> ValueToByteArray(TValue value) { var writer = new SpanWriter(); IWriterCtx ctx = null; if (_valueHandler.NeedsCtx()) { ctx = new DBWriterCtx(_tr); } _valueWriter(value, ref writer, ctx); return(writer.GetSpan()); }
ByteBuffer ValueToByteArray(TValue value) { var writer = new ByteBufferWriter(); IWriterCtx ctx = null; if (_valueHandler.NeedsCtx()) { ctx = new DBWriterCtx(_tr, writer); } _valueWriter(value, writer, ctx); return(writer.Data); }
ReadOnlySpan <byte> KeyToByteArray(TKey key) { var writer = new SpanWriter(); IWriterCtx ctx = null; if (_keyHandler.NeedsCtx()) { ctx = new DBWriterCtx(_tr); } writer.WriteBlock(_prefix); _keyWriter(key, ref writer, ctx); return(writer.GetSpan()); }