Esempio n. 1
0
        public async Task CanGetSecretDvinApps()
        {
            var repository     = vContainer.Resolve <ISecretRepository>();
            var dvinAppsSecret = new SecretDvinApps();
            var errorsAndInfos = new ErrorsAndInfos();
            var dvinApps       = await repository.GetAsync(dvinAppsSecret, errorsAndInfos);

            Assert.IsFalse(errorsAndInfos.AnyErrors(), errorsAndInfos.ErrorsToString());
            Assert.IsTrue(dvinApps.Any(c => c.Id == "GraspNetCore"));
        }
Esempio n. 2
0
        private async Task <IList <DvinApp> > LoadAsync(bool resolve, IErrorsAndInfos errorsAndInfos)
        {
            var dvinAppsSecret = new SecretDvinApps();
            var secretDvinApps = await SecretRepository.GetAsync(dvinAppsSecret, errorsAndInfos);

            if (!resolve || errorsAndInfos.AnyErrors())
            {
                return(secretDvinApps);
            }

            await secretDvinApps.ResolveFoldersAsync(FolderResolver, errorsAndInfos);

            return(secretDvinApps);
        }