diff --git a/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs b/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs index ae1797b0..fb003b50 100644 --- a/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs @@ -1,6 +1,7 @@  using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace Octokit.Reactive.Clients @@ -26,7 +27,7 @@ namespace Octokit.Reactive.Clients /// The owner of the repository /// The name of the repository /// - IObservable> GetForRepository(string owner, string name); + IObservable GetForRepository(string owner, string name); /// /// Gets Issue Comments for a specified Issue. @@ -36,7 +37,7 @@ namespace Octokit.Reactive.Clients /// The name of the repository /// The issue number /// - IObservable> GetForIssue(string owner, string name, int number); + IObservable GetForIssue(string owner, string name, int number); /// /// Creates a new Issue Comment for a specified Issue. diff --git a/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs b/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs index d780f81b..6076d38c 100644 --- a/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs @@ -1,15 +1,19 @@ using System; +using System.Collections.Generic; +using Octokit.Reactive.Internal; namespace Octokit.Reactive.Clients { class ObservableIssueCommentsClient : IObservableIssueCommentsClient { + readonly IIssuesClient _client; readonly IConnection _connection; public ObservableIssueCommentsClient(IGitHubClient client) { Ensure.ArgumentNotNull(client, "client"); + _client = client.Issue; _connection = client.Connection; } /// @@ -24,10 +28,11 @@ namespace Octokit.Reactive.Clients /// The s for the specified Issue Comment. public IObservable Get(string owner, string name, int number) { - Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); - Ensure.ArgumentNotNullOrEmptyString(name, "name"); + //Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + //Ensure.ArgumentNotNullOrEmptyString(name, "name"); - return _connection.Get(ApiUrls.IssueComment(owner, name, number)); + //return _client.Get(ApiUrls.IssueComment(owner, name, number)); + throw new NotImplementedException(); } /// @@ -39,12 +44,12 @@ namespace Octokit.Reactive.Clients /// The owner of the repository /// The name of the repository /// The list of s for the specified Repository. - public IObservable> GetForRepository(string owner, string name) + public IObservable GetForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); - return _connection.GetAll(ApiUrls.IssueComments(owner, name)); + return _connection.GetAndFlattenAllPages(ApiUrls.IssueComments(owner, name)); } /// @@ -57,12 +62,12 @@ namespace Octokit.Reactive.Clients /// The name of the repository /// The issue number /// The list of s for the specified Issue. - public IObservable> GetForIssue(string owner, string name, int number) + public IObservable GetForIssue(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); - return _connection.GetAll(ApiUrls.IssueComments(owner, name, number)); + return _connection.GetAndFlattenAllPages(ApiUrls.IssueComments(owner, name, number)); } /// @@ -78,11 +83,12 @@ namespace Octokit.Reactive.Clients /// The s for that was just created. public IObservable Create(string owner, string name, int number, string newComment) { - Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); - Ensure.ArgumentNotNullOrEmptyString(name, "name"); - Ensure.ArgumentNotNull(newComment, "newComment"); + //Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + //Ensure.ArgumentNotNullOrEmptyString(name, "name"); + //Ensure.ArgumentNotNull(newComment, "newComment"); - return _connection.Post(ApiUrls.IssueComments(owner, name, number), newComment); + //return _connection.Post(ApiUrls.IssueComments(owner, name, number), newComment); + throw new NotImplementedException(); } /// @@ -98,11 +104,13 @@ namespace Octokit.Reactive.Clients /// The s for that was just updated. public IObservable Update(string owner, string name, int number, string commentUpdate) { - Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); - Ensure.ArgumentNotNullOrEmptyString(name, "name"); - Ensure.ArgumentNotNull(commentUpdate, "commentUpdate"); + //Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + //Ensure.ArgumentNotNullOrEmptyString(name, "name"); + //Ensure.ArgumentNotNull(commentUpdate, "commentUpdate"); - return _connection.Patch(ApiUrls.IssueComment(owner, name, number), commentUpdate); + //return _connection.Patch(ApiUrls.IssueComment(owner, name, number), commentUpdate); + + throw new NotImplementedException(); } } } diff --git a/Octokit/Clients/IIssueCommentsClient.cs b/Octokit/Clients/IIssueCommentsClient.cs index b8379759..3836c5e1 100644 --- a/Octokit/Clients/IIssueCommentsClient.cs +++ b/Octokit/Clients/IIssueCommentsClient.cs @@ -1,4 +1,5 @@ -using System.Diagnostics.CodeAnalysis; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Octokit diff --git a/Octokit/Clients/IssueCommentsClient.cs b/Octokit/Clients/IssueCommentsClient.cs index 895a0d8e..476e63ba 100644 --- a/Octokit/Clients/IssueCommentsClient.cs +++ b/Octokit/Clients/IssueCommentsClient.cs @@ -1,4 +1,5 @@  +using System.Collections.Generic; using System.Threading.Tasks; namespace Octokit diff --git a/Octokit/Octokit-netcore45.csproj b/Octokit/Octokit-netcore45.csproj index e50d4fbd..42a6a3c1 100644 --- a/Octokit/Octokit-netcore45.csproj +++ b/Octokit/Octokit-netcore45.csproj @@ -54,6 +54,7 @@ + @@ -63,6 +64,7 @@ + @@ -126,6 +128,7 @@ + diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index 7c33d18f..52dc3cc3 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -56,7 +56,6 @@ - @@ -214,4 +213,4 @@ --> - + \ No newline at end of file