SubspaceLocationExtensions
Namespace: FoundationDB.Client · class
Extension methods for ISubspaceLocation
Methods
AsDirectory
static FdbDirectorySubspaceLocation AsDirectory(ISubspaceLocation self)
Return a directory version of the current location
self— Existing subspace location
Returns: A FdbDirectorySubspaceLocation that points to the same location as self.
WithPrefix
static ISubspaceLocation WithPrefix(ISubspaceLocation self, Slice prefix)
Returns a location that will always add the given prefix to all the keys, relative to the current location
self— Existing subspace pathprefix— Prefix added between the resolved path prefix, and the rest of the key
If, for example, location "/Foo/Bar" will resolve to the prefix (123,), call WithPrefix(TuPack.EncodeKey(0)) will create a new location that will use (123, 0) for all keys, without having to explicitly repeat subspace.GetKey(0, ...) everytime.