Exemple #1
0
        /// <summary>
        ///     Get assets matching a particular set of properties. All are optional.
        /// </summary>
        /// <param name="name">Name of asset</param>
        /// <param name="version">Version of asset</param>
        /// <param name="buildId">ID of build producing the asset</param>
        /// <param name="nonShipping">Only non-shipping</param>
        /// <returns>List of assets.</returns>
        public async Task <IEnumerable <Asset> > GetAssetsAsync(string name      = null,
                                                                string version   = null,
                                                                int?buildId      = null,
                                                                bool?nonShipping = null)
        {
            PagedResponse <Asset> pagedResponse = await _barClient.Assets.ListAssetsAsync(name : name,
                                                                                          version : version, buildId : buildId, loadLocations : true);

            return(await pagedResponse.EnumerateAll().ToListAsync(CancellationToken.None));
        }