TryListAsync() 공개 메소드

Returns the list of all the subdirectories of a sub-directory, it it exists.
public TryListAsync ( IFdbReadOnlyTransaction trans ) : Task>
trans IFdbReadOnlyTransaction
리턴 Task>
예제 #1
0
        /// <summary>Returns the list of all the subdirectories of the current directory, it it exists.</summary>
        public static Task <List <string> > TryListAsync([NotNull] this FdbDirectorySubspace subspace, [NotNull] IFdbReadOnlyRetryable db, CancellationToken ct)
        {
            Contract.NotNull(subspace, nameof(subspace));
            Contract.NotNull(db, nameof(db));

            return(db.ReadAsync((tr) => subspace.TryListAsync(tr), ct));
        }
        /// <summary>Returns the list of all the subdirectories of the current directory, it it exists.</summary>
        public static Task <List <string> > TryListAsync([NotNull] this FdbDirectorySubspace subspace, [NotNull] IFdbReadOnlyRetryable db, CancellationToken ct)
        {
            if (subspace == null)
            {
                throw new ArgumentNullException(nameof(subspace));
            }
            if (db == null)
            {
                throw new ArgumentNullException(nameof(db));
            }

            return(db.ReadAsync((tr) => subspace.TryListAsync(tr), ct));
        }