public static ByteStringContext.ExternalScope External(ByteStringContext context, byte *value, int size, ByteStringType type, out Slice slice) { var scope = context.FromPtr(value, size, type | ByteStringType.External, out ByteString str); slice = new Slice(str); return(scope); }
public static ByteStringContext.ExternalScope ToSlicePtr(ByteStringContext context, TreeNodeHeader *node, ByteStringType type, out Slice slice) { ByteString str; var scope = context.FromPtr((byte *)node + Constants.Tree.NodeHeaderSize, node->KeySize, type, out str); slice = new Slice(str); return(scope); }
public static Slice External(ByteStringContext context, byte *value, int size, ByteStringType type = ByteStringType.Mutable | ByteStringType.External) { return(new Slice(context.FromPtr(value, size, type | ByteStringType.External))); }
public static Slice ToSlicePtr(ByteStringContext context, TreeNodeHeader *node, ByteStringType type = ByteStringType.Mutable) { return(new Slice(context.FromPtr((byte *)node + Constants.NodeHeaderSize, node->KeySize, type | (ByteStringType)SliceOptions.Key))); }