當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。