/// <summary>Change the layer id of this directory</summary> public static Task<FdbDirectorySubspace> ChangeLayerAsync(this FdbDirectorySubspace subspace, IFdbTransactional db, Slice newLayer, CancellationToken cancellationToken) { if (subspace == null) throw new ArgumentNullException("subspace"); if (db == null) throw new ArgumentNullException("db"); return db.ReadWriteAsync((tr) => subspace.ChangeLayerAsync(tr, newLayer), cancellationToken); }
/// <summary>Change the layer id of the directory at <param name="path"/></summary> public static Task<FdbDirectorySubspace> ChangeLayerAsync(this FdbDirectoryLayer directory, IFdbTransactional db, IEnumerable<string> path, Slice newLayer, CancellationToken cancellationToken) { if (directory == null) throw new ArgumentNullException("directory"); if (db == null) throw new ArgumentNullException("db"); if (path == null) throw new ArgumentNullException("path"); return db.ReadWriteAsync((tr) => directory.ChangeLayerAsync(tr, path, newLayer), cancellationToken); }