Exemplo n.º 1
0
        /// <summary>
        /// Get list of project names for a bucket.
        /// </summary>
        public async Task <ICollection <string> > GetProjectNamesAsync(OssBucket bucket = null)
        {
            bucket ??= await _userResolver.GetBucketAsync(true);

            var objectDetails = (await bucket.GetObjectsAsync(ONC.ProjectsMask));
            var projectNames  = objectDetails
                                .Select(objDetails => ONC.ToProjectName(objDetails.ObjectKey))
                                .ToList();

            return(projectNames);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Get list of project names for a bucket.
 /// </summary>
 private async Task <ICollection <string> > GetProjectNamesAsync(OssBucket bucket)
 {
     return((await bucket.GetObjectsAsync(ONC.ProjectsMask))
            .Select(objDetails => ONC.ToProjectName(objDetails.ObjectKey))
            .ToList());
 }