コード例 #1
0
        /// <summary>
        /// gold membership required
        /// </summary>
        public Task <HttpContent> DownloadRelease(ReleaseDownloadRequest request)
        {
            if (request is null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            if (request.ReleaseId == Guid.Empty)
            {
                throw new ArgumentException(nameof(ReleaseDownloadRequest.ReleaseId));
            }

            return(_service.DownloadRelease(request));
        }
コード例 #2
0
        /// <summary>
        /// gold membership required
        /// </summary>
        public static async Task <Stream> DownloadReleaseAsStream(this IMonstercatApi api, ReleaseDownloadRequest request)
        {
            var content = await api.DownloadRelease(request).ConfigureAwait(false);

            return(await content.ReadAsStreamAsync().ConfigureAwait(false));
        }