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


C# Reactive.ObservableReleasesClient类代码示例

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


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

示例1: 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

示例2: EnsuresNonNullArguments

            public async Task EnsuresNonNullArguments()
            {
                var releasesClient = new ObservableReleasesClient(Substitute.For<IGitHubClient>());

                await AssertEx.Throws<ArgumentNullException>(async () => await releasesClient.GetAll(null, "name"));
                await AssertEx.Throws<ArgumentNullException>(async () => await releasesClient.GetAll("owner", null));
            }
开发者ID:pgarbe,项目名称:octokit.net,代码行数:7,代码来源:ObservableReleasesClientTests.cs

示例3: EnsuresNonNullArguments

            public void EnsuresNonNullArguments()
            {
                var releasesClient = new ObservableReleasesClient(Substitute.For<IGitHubClient>());

                Assert.Throws<ArgumentNullException>(() => releasesClient.GetAll(null, "name"));
                Assert.Throws<ArgumentNullException>(() => releasesClient.GetAll("owner", null));
            }
开发者ID:jrusbatch,项目名称:octokit.net,代码行数:7,代码来源:ObservableReleasesClientTests.cs

示例4: CallsIntoClient

            public void CallsIntoClient()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableReleasesClient(gitHubClient);

                client.GetLatest("fake", "repo");

                gitHubClient.Repository.Release.Received(1).GetLatest("fake", "repo");
            }
开发者ID:jrusbatch,项目名称:octokit.net,代码行数:9,代码来源:ObservableReleasesClientTests.cs

示例5: RequestsTheCorrectUrl

            public void RequestsTheCorrectUrl()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableReleasesClient(gitHubClient);

                client.Get("fake", "repo", 1);

                gitHubClient.Connection.GetAsync<IReadOnlyList<Release>>(
                    new Uri("repos/fake/repo/releases/1", UriKind.Relative), null, null);
            }
开发者ID:pgarbe,项目名称:octokit.net,代码行数:10,代码来源:ObservableReleasesClientTests.cs

示例6: RequestsTheCorrectUrl

            public void RequestsTheCorrectUrl()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableReleasesClient(gitHubClient);

                client.GetAll("fake", "repo");

                gitHubClient.Connection.Received(1).Get<List<Release>>(
                    new Uri("repos/fake/repo/releases", UriKind.Relative), Args.EmptyDictionary, null);
            }
开发者ID:jrusbatch,项目名称:octokit.net,代码行数:10,代码来源:ObservableReleasesClientTests.cs

示例7: CallsIntoClient

            public void CallsIntoClient()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var releasesClient = new ObservableReleasesClient(gitHubClient);
                var data = new ReleaseUpdate("fake-tag");

                releasesClient.CreateRelease("fake", "repo", data);

                gitHubClient.Release.Received(1).CreateRelease("fake", "repo", data);
            }
开发者ID:harunpehlivan,项目名称:octokit.net,代码行数:10,代码来源:ObservableReleasesClientTests.cs

示例8: RequestsCorrectUrl

            public void RequestsCorrectUrl()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var releasesClient = new ObservableReleasesClient(gitHubClient);
                var data = new ReleaseUpdate("fake-tag");

                releasesClient.CreateRelease("fake", "repo", data);

                gitHubClient.Connection.PostAsync<Release>(
                    new Uri("repos/fake/repo/releases", UriKind.Relative), data, null, null);
            }
开发者ID:pgarbe,项目名称:octokit.net,代码行数:11,代码来源:ObservableReleasesClientTests.cs

示例9: ObservableGitHubClient

        public ObservableGitHubClient(IGitHubClient gitHubClient)
        {
            Ensure.ArgumentNotNull(gitHubClient, "githubClient");

            _gitHubClient = gitHubClient;
            Authorization = new ObservableAuthorizationsClient(gitHubClient);
            Miscellaneous = new ObservableMiscellaneousClient(gitHubClient.Miscellaneous);
            Notification = new ObservableNotificationsClient(gitHubClient);
            Organization = new ObservableOrganizationsClient(gitHubClient);
            Repository = new ObservableRepositoriesClient(gitHubClient);
            SshKey = new ObservableSshKeysClient(gitHubClient);
            User = new ObservableUsersClient(gitHubClient);
            Release = new ObservableReleasesClient(gitHubClient);
        }
开发者ID:ninjanye,项目名称:octokit.net,代码行数:14,代码来源:ObservableGitHubClient.cs

示例10: RequestsTheCorrectUrlWithRepositoryIdWithApiOptions

            public void RequestsTheCorrectUrlWithRepositoryIdWithApiOptions()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableReleasesClient(gitHubClient);

                var options = new ApiOptions
                {
                    PageCount = 1,
                    PageSize = 1,
                    StartPage = 1
                };

                client.GetAll(1, options);

                gitHubClient.Connection.Received(1).Get<List<Release>>(
                    new Uri("repositories/1/releases", UriKind.Relative), Arg.Is<IDictionary<string, string>>(d => d.Count == 2), null);
            }
开发者ID:daveaglick,项目名称:octokit.net,代码行数:17,代码来源:ObservableReleasesClientTests.cs

示例11: ObservableGitHubClient

        public ObservableGitHubClient(IGitHubClient gitHubClient)
        {
            Ensure.ArgumentNotNull(gitHubClient, "githubClient");

            _gitHubClient = gitHubClient;
            Authorization = new ObservableAuthorizationsClient(gitHubClient);
            Activity = new ObservableActivitiesClient(gitHubClient);
            Issue = new ObservableIssuesClient(gitHubClient);
            Miscellaneous = new ObservableMiscellaneousClient(gitHubClient.Miscellaneous);
            Notification = new ObservableNotificationsClient(gitHubClient);
            Organization = new ObservableOrganizationsClient(gitHubClient);
            Repository = new ObservableRepositoriesClient(gitHubClient);
            SshKey = new ObservableSshKeysClient(gitHubClient);
            User = new ObservableUsersClient(gitHubClient);
            Release = new ObservableReleasesClient(gitHubClient);
            GitDatabase = new ObservableGitDatabaseClient(gitHubClient);
            Gist = new ObservableGistsClient(gitHubClient);
            Search = new ObservableSearchClient(gitHubClient);
        }
开发者ID:nsavga,项目名称:octokit.net,代码行数:19,代码来源:ObservableGitHubClient.cs

示例12: 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);
            Collaborator = new ObservableRepoCollaboratorsClient(client);
            Deployment = new ObservableDeploymentsClient(client);
            Statistics = new ObservableStatisticsClient(client);
            PullRequest = new ObservablePullRequestsClient(client);
            Comment = new ObservableRepositoryCommentsClient(client);
            Commit = new ObservableRepositoryCommitsClient(client);
            Release = new ObservableReleasesClient(client);
            DeployKeys = new ObservableRepositoryDeployKeysClient(client);
            Content = new ObservableRepositoryContentsClient(client);
            Merging = new ObservableMergingClient(client);
            Page = new ObservableRepositoryPagesClient(client);
            Invitation = new ObservableRepositoryInvitationsClient(client);
        }
开发者ID:rlugojr,项目名称:octokit.net,代码行数:22,代码来源:ObservableRepositoriesClient.cs

示例13: RequestsTheCorrectUrlWithRepositoryId

            public void RequestsTheCorrectUrlWithRepositoryId()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var releasesClient = new ObservableReleasesClient(gitHubClient);
                var data = new NewRelease("fake-tag");

                releasesClient.Create(1, data);

                gitHubClient.Repository.Release.Received(1).Create(1, data);
            }
开发者ID:daveaglick,项目名称:octokit.net,代码行数:10,代码来源:ObservableReleasesClientTests.cs

示例14: EnsuresArgumentsNotNull

            public void EnsuresArgumentsNotNull()
            {
                var releasesClient = new ObservableReleasesClient(Substitute.For<IGitHubClient>());

                var release = new Release("https://uploads.github.com/anything");
                var uploadData = new ReleaseAssetUpload("good", "good/good", Stream.Null, null);

                Assert.Throws<ArgumentNullException>(() => releasesClient.UploadAsset(null, uploadData));
                Assert.Throws<ArgumentNullException>(() => releasesClient.UploadAsset(release, null));
            }
开发者ID:jrusbatch,项目名称:octokit.net,代码行数:10,代码来源:ObservableReleasesClientTests.cs

示例15: RequestsTheCorrectUrlWithApiOptions

            public void RequestsTheCorrectUrlWithApiOptions()
            {
                var expectedUrl = string.Format("repos/{0}/{1}/releases/1/assets", "fake", "repo");

                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableReleasesClient(gitHubClient);

                var options = new ApiOptions
                {
                    StartPage = 1,
                    PageCount = 1,
                    PageSize = 1
                };

                client.GetAllAssets("fake", "repo", 1, options);
                
                gitHubClient.Connection.Received(1).Get<List<ReleaseAsset>>(
                    Arg.Is<Uri>(u => u.ToString() == expectedUrl), 
                    Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2), 
                    null);
            }
开发者ID:jrusbatch,项目名称:octokit.net,代码行数:21,代码来源:ObservableReleasesClientTests.cs


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