TryMoveToAsync() публичный Метод

Attempts to move the current directory to newPath. There is no effect on the physical prefix of the given directory, or on clients that already have the directory open.
public TryMoveToAsync ( IFdbTransaction trans, IEnumerable newPath ) : Task
trans IFdbTransaction Transaction to use for the operation
newPath IEnumerable Full path (from the root) where this directory will be moved
Результат Task
Пример #1
0
        /// <summary>Attempts to move the current directory to <paramref name="newPath"/>.
        /// There is no effect on the physical prefix of the given directory, or on clients that already have the directory open.
        /// </summary>
        public static Task <FdbDirectorySubspace> TryMoveToAsync([NotNull] this FdbDirectorySubspace subspace, [NotNull] IFdbRetryable db, FdbDirectoryPath newPath, CancellationToken ct)
        {
            Contract.NotNull(subspace, nameof(subspace));
            Contract.NotNull(db, nameof(db));

            return(db.ReadWriteAsync((tr) => subspace.TryMoveToAsync(tr, newPath), ct));
        }
        /// <summary>Attempts to move the current directory to <paramref name="newPath"/>.
        /// There is no effect on the physical prefix of the given directory, or on clients that already have the directory open.
        /// </summary>
        public static Task <FdbDirectorySubspace> TryMoveToAsync([NotNull] this FdbDirectorySubspace subspace, [NotNull] IFdbRetryable db, [NotNull] IEnumerable <string> newPath, CancellationToken ct)
        {
            if (subspace == null)
            {
                throw new ArgumentNullException(nameof(subspace));
            }
            if (db == null)
            {
                throw new ArgumentNullException(nameof(db));
            }
            if (newPath == null)
            {
                throw new ArgumentNullException(nameof(newPath));
            }

            return(db.ReadWriteAsync((tr) => subspace.TryMoveToAsync(tr, newPath), ct));
        }