Пример #1
0
        protected override async Task <IEnumerable <string> > GetSuggestionsAsync(ArtifactoryCredentials credentials, IComponentConfiguration config)
        {
            using (var client = credentials.CreateClient())
                using (var response = await client.GetAsync("api/build").ConfigureAwait(false))
                {
                    var builds = await this.ParseResponseAsync <BuildCollection>(response).ConfigureAwait(false);

                    return(builds.Builds?.Select(b => b.Uri.Trim('/')));
                }
        }
Пример #2
0
        protected override async Task <IEnumerable <string> > GetSuggestionsAsync(ArtifactoryCredentials credentials, IComponentConfiguration config)
        {
            using (var client = credentials.CreateClient())
                using (var response = await client.GetAsync("api/repositories").ConfigureAwait(false))
                {
                    var repositories = await this.ParseResponseAsync <IEnumerable <Repository> >(response).ConfigureAwait(false);

                    return(repositories?.Select(r => r.Key));
                }
        }
Пример #3
0
 protected abstract Task <IEnumerable <string> > GetSuggestionsAsync(ArtifactoryCredentials credentials, IComponentConfiguration config);