mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-29 09:22:25 +00:00
Add Connection property to IObservableGitHubClient
Sometimes we need to be able to make raw requests. This makes that easier.
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
namespace Octokit.Reactive
|
||||
using Octokit.Http;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
public interface IObservableGitHubClient
|
||||
{
|
||||
IConnection Connection { get; }
|
||||
|
||||
IObservableAuthorizationsClient Authorization { get; }
|
||||
IObservableMiscellaneousClient Miscellaneous { get; }
|
||||
IObservableOrganizationsClient Organization { get; }
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
using Octokit.Reactive.Clients;
|
||||
using Octokit.Http;
|
||||
using Octokit.Reactive.Clients;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
public class ObservableGitHubClient : IObservableGitHubClient
|
||||
{
|
||||
readonly IGitHubClient _gitHubClient;
|
||||
|
||||
public ObservableGitHubClient(IGitHubClient gitHubClient)
|
||||
{
|
||||
Ensure.ArgumentNotNull(gitHubClient, "githubClient");
|
||||
|
||||
|
||||
_gitHubClient = gitHubClient;
|
||||
Authorization = new ObservableAuthorizationsClient(gitHubClient.Authorization);
|
||||
Miscellaneous = new ObservableMiscellaneousClient(gitHubClient.Miscellaneous);
|
||||
Organization = new ObservableOrganizationsClient(gitHubClient.Organization);
|
||||
@@ -16,6 +20,7 @@ namespace Octokit.Reactive
|
||||
User = new ObservableUsersClient(gitHubClient.User);
|
||||
}
|
||||
|
||||
public IConnection Connection { get { return _gitHubClient.Connection; }}
|
||||
public IObservableAuthorizationsClient Authorization { get; private set; }
|
||||
public IObservableMiscellaneousClient Miscellaneous { get; private set; }
|
||||
public IObservableOrganizationsClient Organization { get; private set; }
|
||||
|
||||
Reference in New Issue
Block a user