Пример #1
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);
        }
Пример #2
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);
        }