Пример #1
0
 private GitHubService(GitHubOAuthClient client) {
     Client = client;
     Organizations = new GitHubOrganizationsEndpoint(this);
     Repositories = new GitHubRepositoriesEndpoint(this);
     User = new GitHubUserEndpoint(this);
     Users = new GitHubUsersEndpoint(this);
 }
Пример #2
0
        /// <summary>
        /// Initialize a new service instance from the specified OAuth client.
        /// </summary>
        /// <param name="client">The OAuth client.</param>
        public static GitHubService CreateFromOAuthClient(GitHubOAuthClient client) {

            // This should never be null
            if (client == null) throw new ArgumentNullException("client");

            // Initialize the service
            return new GitHubService();

        }
 internal GitHubUsersRawEndpoint(GitHubOAuthClient client) {
     Client = client;
 }
 internal GitHubRepositoriesRawEndpoint(GitHubOAuthClient client) {
     Client = client;
 }
 internal GitHubOrganizationsRawEndpoint(GitHubOAuthClient client) {
     Client = client;
 }