Exemple #1
0
        public async Task <IReadOnlyList <string> > List(QueryParameter queryParameter, CancellationToken token = default)
        {
            queryParameter
            .VerifyNotNull(nameof(queryParameter))
            .VerifyAssert(x => !x.Namespace.IsEmpty(), x => $"{nameof(x.Namespace)} is required");

            IArtifactStorage getStorage(string nameSpace) => _artifactStorageProvider.Create(queryParameter.Namespace !)
            .VerifyNotNull($"{queryParameter.Namespace} {nameof(queryParameter.Namespace)} not found");

            IArtifactStorage artifactStorage = _namespaceCache.GetOrAdd(queryParameter.Namespace !, x => getStorage(queryParameter.Namespace !));

            return(await artifactStorage.List(queryParameter, token));
        }