public async Task <byte[]> GetPackage(int packageId, IFileRetriever fileRetriever)
        {
            ProgramPackageInfo pkg = await this.telimenaPortalContext.ProgramPackages.FirstOrDefaultAsync(x => x.Id == packageId).ConfigureAwait(false);

            if (pkg != null)
            {
                return(await fileRetriever.GetFile(pkg, this.containerName).ConfigureAwait(false));
            }

            return(null);
        }
Esempio n. 2
0
        public async Task <byte[]> GetPackage(Guid packageId, IFileRetriever fileRetriever)
        {
            ProgramUpdatePackageInfo pkg = await this.GetUpdatePackageInfo(packageId).ConfigureAwait(false);

            if (pkg != null)
            {
                return(await fileRetriever.GetFile(pkg, this.containerName).ConfigureAwait(false));
            }

            return(null);
        }
Esempio n. 3
0
        public async Task <byte[]> GetPackage(int toolkitDataId, IFileRetriever fileRetriever)
        {
            TelimenaToolkitData toolkitData = await this.TelimenaPortalContext.TelimenaToolkitData.FirstOrDefaultAsync(x => x.Id == toolkitDataId).ConfigureAwait(false);

            TelimenaPackageInfo pkg = toolkitData?.TelimenaPackageInfo;

            if (pkg != null)
            {
                return(await fileRetriever.GetFile(pkg, this.containerName).ConfigureAwait(false));
            }

            return(null);
        }