Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 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)));
 }