Пример #1
0
        public IGitHubClient GetClientForRepo(GitHubRepositoryReference repo)
        {
            if (_perRepoClients.TryGetValue(repo, out var client))
            {
                return(client);
            }
            if (_perOwnerClients.TryGetValue(repo.Owner, out client))
            {
                return(client);
            }

            return(_unauthenticatedClient);
        }
Пример #2
0
 public void SetForRepo(GitHubRepositoryReference repositoryReference, IGitHubClient client)
 {
     _perRepoClients[repositoryReference] = client;
 }