Exemplo n.º 1
0
        public GitHubClient(OAuth2Token credentials)
        {
            #region Preconditions

            if (credentials == null)
                throw new ArgumentNullException(nameof(credentials));

            #endregion

            this.auth = credentials;
        }
Exemplo n.º 2
0
        public GitHubRepository(Uri url, OAuth2Token credentials)
        {
            // https://github.com/orgName/repoName.git

            var info = RepositoryInfo.Parse(url.ToString());
      
            AccountName = info.AccountName;
            RepositoryName = info.Name;

            client = new GitHubClient(credentials);
        }
Exemplo n.º 3
0
        public GitHubRepository(string accountName, string repositoryName, OAuth2Token credentials)
        {
            #region Preconditions

            if (accountName == null) throw new ArgumentNullException(nameof(accountName));
            if (repositoryName == null) throw new ArgumentNullException(nameof(repositoryName));

            #endregion

            AccountName = accountName;
            RepositoryName = repositoryName;

            client = new GitHubClient(credentials);
        }
Exemplo n.º 4
0
 public GitHubClient(OAuth2Token accessToken)
 {
     this.accessToken = accessToken;
 }