当前位置: 首页>>代码示例>>C#>>正文


C# IGitHubClient类代码示例

本文整理汇总了C#中IGitHubClient的典型用法代码示例。如果您正苦于以下问题:C# IGitHubClient类的具体用法?C# IGitHubClient怎么用?C# IGitHubClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IGitHubClient类属于命名空间,在下文中一共展示了IGitHubClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ObservableFollowersClient

        /// <summary>
        /// Initializes a new User Followers API client.
        /// </summary>
        /// <param name="client">An <see cref="IGitHubClient" /> used to make the requests</param>
        public ObservableFollowersClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.User.Followers;
            _connection = client.Connection;
        }
开发者ID:cloudRoutine,项目名称:octokit.net,代码行数:11,代码来源:ObservableFollowersClient.cs

示例2: ObservableOrganizationsClient

        public ObservableOrganizationsClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.Organization;
            _connection = client.Connection;
        }
开发者ID:ninjanye,项目名称:octokit.net,代码行数:7,代码来源:ObservableOrganizationsClient.cs

示例3: ObservableRepositoriesClient

        public ObservableRepositoriesClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.Repository;
            _connection = client.Connection;
            Status = new ObservableCommitStatusClient(client);
            Hooks = new ObservableRepositoryHooksClient(client);
            Forks = new ObservableRepositoryForksClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
            RepoCollaborators = new ObservableRepoCollaboratorsClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
            Collaborator = new ObservableRepoCollaboratorsClient(client);
            Deployment = new ObservableDeploymentsClient(client);
            Statistics = new ObservableStatisticsClient(client);
            PullRequest = new ObservablePullRequestsClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
            RepositoryComments = new ObservableRepositoryCommentsClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
            Comment = new ObservableRepositoryCommentsClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
            Commits = new ObservableRepositoryCommitsClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
            Commit = new ObservableRepositoryCommitsClient(client);
            Release = new ObservableReleasesClient(client);
            DeployKeys = new ObservableRepositoryDeployKeysClient(client);
            Content = new ObservableRepositoryContentsClient(client);
            Merging = new ObservableMergingClient(client);
            Page = new ObservableRepositoryPagesClient(client);
        }
开发者ID:KonstantinDavidov,项目名称:octokit.net,代码行数:30,代码来源:ObservableRepositoriesClient.cs

示例4: ObservableReferencesClient

        public ObservableReferencesClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _reference = client.GitDatabase.Reference;
            _connection = client.Connection;
        }
开发者ID:harunpehlivan,项目名称:octokit.net,代码行数:7,代码来源:ObservableReferencesClient.cs

示例5: ObservablePullRequestReviewCommentReactionsClient

        public ObservablePullRequestReviewCommentReactionsClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.Reaction.PullRequestReviewComment;
            _connection = client.Connection;
        }
开发者ID:daveaglick,项目名称:octokit.net,代码行数:7,代码来源:ObservablePullRequestReviewCommentReactionsClient.cs

示例6: LogInViewModel

        public LogInViewModel(IScreen host, IGitHubClient ghClient)
        {
            this.HostScreen = host;
            this.GHClient = ghClient;

            // Only allow a submit when the user name is valid
            var validStuffTyped = this.WhenAny(x => x.UserName, x => x.Password,
                (user, pass) => !string.IsNullOrWhiteSpace(user.Value) && !string.IsNullOrWhiteSpace(pass.Value));

            Submit = new ReactiveCommand(validStuffTyped);

            //todo: better make a cancel or else you'll get very mad!
            //Submit.Subscribe(_ =>
            //{
            //    GHClient.Authorization.Create();
            //    //try
            //    //{
            //    //    //if (user != null)
            //    //    //{
            //    //    // Insert the user into the cache
            //    //    BlobCache.UserAccount.InsertObject<User>("MyUser", user);
            //    //    //}
            //    //}
            //    //catch (AuthorizationException authEx)
            //    //{
            //    //    Debug.Print("CRAP!");
            //    //    Debug.Print(authEx.Message);
            //    //    Debug.Print(authEx.StackTrace);
            //    //}
            //});

            MessageBus.Current.RegisterMessageSource(Submit);
        }
开发者ID:jugglingnutcase,项目名称:StarHub,代码行数:33,代码来源:LogInViewModel.cs

示例7: ObservableSshKeysClient

 public ObservableSshKeysClient(IGitHubClient client)
 {
     Ensure.ArgumentNotNull(client, "client");
     
     _client = client.SshKey;
     _connection = client.Connection;
 }
开发者ID:ninjanye,项目名称:octokit.net,代码行数:7,代码来源:ObservableSshKeysClient.cs

示例8: ObservableRepoCollaboratorsClient

        /// <summary>
        /// Initializes a new GitHub Repo Collaborators API client.
        /// </summary>
        /// <param name="client">An IGitHubClient client.</param>
        public ObservableRepoCollaboratorsClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.Repository.Collaborator;
            _connection = client.Connection;
        }
开发者ID:rlugojr,项目名称:octokit.net,代码行数:11,代码来源:ObservableRepoCollaboratorsClient.cs

示例9: InstallController

 public InstallController(IConfiguration configuration, IGitHubClient gitHubClient)
 {
     if (configuration == null) throw new ArgumentNullException("configuration");
     if (gitHubClient == null) throw new ArgumentNullException("gitHubClient");
     _configuration = configuration;
     _gitHubClient = gitHubClient;
 }
开发者ID:hadouken,项目名称:peach,代码行数:7,代码来源:InstallController.cs

示例10: CreateRepository

        static Repository CreateRepository(IGitHubClient github)
        {
            var repoName = Helper.MakeNameWithTimestamp("create-hooks-test");
            var repository = github.Repository.Create(new NewRepository(repoName) { AutoInit = true });

            return repository.Result;
        }
开发者ID:rlugojr,项目名称:octokit.net,代码行数:7,代码来源:RepositoriesHooksFixture.cs

示例11: ObservableDeploymentStatusClient

        public ObservableDeploymentStatusClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.Deployment.Status;
            _connection = client.Connection;
        }
开发者ID:pgarbe,项目名称:octokit.net,代码行数:7,代码来源:ObservableDeploymentStatusClient.cs

示例12: ObservableIssueReactionsClient

        public ObservableIssueReactionsClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.Reaction.Issue;
            _connection = client.Connection;
        }
开发者ID:Sarmad93,项目名称:octokit.net,代码行数:7,代码来源:ObservableIssueReactionsClient.cs

示例13: ObservableUserEmailsClient

        public ObservableUserEmailsClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.User.Email;
            _connection = client.Connection;
        }
开发者ID:kevfromireland,项目名称:octokit.net,代码行数:7,代码来源:ObservableUserEmailsClient.cs

示例14: ObservableReleasesClient

        public ObservableReleasesClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.Release;
            _connection = client.Connection;
        }
开发者ID:nsavga,项目名称:octokit.net,代码行数:7,代码来源:ObservableReleasesClient.cs

示例15: ObservableIssuesLabelsClient

        public ObservableIssuesLabelsClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _connection = client.Connection;
            _client = client.Issue.Labels;
        }
开发者ID:daveaglick,项目名称:octokit.net,代码行数:7,代码来源:ObservableIssuesLabelsClient.cs


注:本文中的IGitHubClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。