From ff71007bf6a45c6631b2393134a00052e11f9f9a Mon Sep 17 00:00:00 2001 From: Perry Taylor Date: Wed, 30 Oct 2013 21:26:56 -0400 Subject: [PATCH 1/3] Add Simple constructors --- Octokit.Reactive/ObservableGitHubClient.cs | 24 +++++++++++++++++++++- Octokit.Reactive/Octokit.Reactive.csproj | 3 ++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Octokit.Reactive/ObservableGitHubClient.cs b/Octokit.Reactive/ObservableGitHubClient.cs index 455bee46..f35049b2 100644 --- a/Octokit.Reactive/ObservableGitHubClient.cs +++ b/Octokit.Reactive/ObservableGitHubClient.cs @@ -1,4 +1,6 @@ -using Octokit.Reactive.Clients; +using System; +using System.Net.Http.Headers; +using Octokit.Reactive.Clients; namespace Octokit.Reactive { @@ -6,6 +8,26 @@ namespace Octokit.Reactive { readonly IGitHubClient _gitHubClient; + public ObservableGitHubClient(ProductHeaderValue productInformation) + : this(new GitHubClient(productInformation)) + { + } + + public ObservableGitHubClient(ProductHeaderValue productInformation, ICredentialStore credentialStore) + :this (new GitHubClient(productInformation, credentialStore)) + { + } + + public ObservableGitHubClient(ProductHeaderValue productInformation, Uri baseAddress) + :this(new GitHubClient(productInformation, baseAddress)) + { + } + + public ObservableGitHubClient(ProductHeaderValue productInformation, ICredentialStore credentialStore, Uri baseAddress) + :this(new GitHubClient(productInformation, credentialStore, baseAddress)) + { + + } public ObservableGitHubClient(IGitHubClient gitHubClient) { Ensure.ArgumentNotNull(gitHubClient, "githubClient"); diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj index 05186304..a318c61b 100644 --- a/Octokit.Reactive/Octokit.Reactive.csproj +++ b/Octokit.Reactive/Octokit.Reactive.csproj @@ -41,6 +41,7 @@ + False ..\packages\Rx-Core.2.1.30214.0\lib\Net40\System.Reactive.Core.dll @@ -119,4 +120,4 @@ --> - + \ No newline at end of file From eac14ae72eeda1fb12c4c2198484e96cf87b767d Mon Sep 17 00:00:00 2001 From: Perry Taylor Date: Wed, 30 Oct 2013 21:34:17 -0400 Subject: [PATCH 2/3] Fix whitespaces --- Octokit.Reactive/ObservableGitHubClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Octokit.Reactive/ObservableGitHubClient.cs b/Octokit.Reactive/ObservableGitHubClient.cs index f35049b2..464d15c2 100644 --- a/Octokit.Reactive/ObservableGitHubClient.cs +++ b/Octokit.Reactive/ObservableGitHubClient.cs @@ -14,7 +14,7 @@ namespace Octokit.Reactive } public ObservableGitHubClient(ProductHeaderValue productInformation, ICredentialStore credentialStore) - :this (new GitHubClient(productInformation, credentialStore)) + :this(new GitHubClient(productInformation, credentialStore)) { } @@ -26,8 +26,8 @@ namespace Octokit.Reactive public ObservableGitHubClient(ProductHeaderValue productInformation, ICredentialStore credentialStore, Uri baseAddress) :this(new GitHubClient(productInformation, credentialStore, baseAddress)) { - } + public ObservableGitHubClient(IGitHubClient gitHubClient) { Ensure.ArgumentNotNull(gitHubClient, "githubClient"); From 46e9a57443b58e11d27e229bf39cb3c65c9721dc Mon Sep 17 00:00:00 2001 From: Perry Taylor Date: Wed, 30 Oct 2013 21:39:35 -0400 Subject: [PATCH 3/3] I was concentrating on different white spaces. And it was right in front of me:) --- Octokit.Reactive/ObservableGitHubClient.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Octokit.Reactive/ObservableGitHubClient.cs b/Octokit.Reactive/ObservableGitHubClient.cs index 464d15c2..ba15a9b7 100644 --- a/Octokit.Reactive/ObservableGitHubClient.cs +++ b/Octokit.Reactive/ObservableGitHubClient.cs @@ -14,17 +14,17 @@ namespace Octokit.Reactive } public ObservableGitHubClient(ProductHeaderValue productInformation, ICredentialStore credentialStore) - :this(new GitHubClient(productInformation, credentialStore)) + : this(new GitHubClient(productInformation, credentialStore)) { } public ObservableGitHubClient(ProductHeaderValue productInformation, Uri baseAddress) - :this(new GitHubClient(productInformation, baseAddress)) - { + : this(new GitHubClient(productInformation, baseAddress)) + { } public ObservableGitHubClient(ProductHeaderValue productInformation, ICredentialStore credentialStore, Uri baseAddress) - :this(new GitHubClient(productInformation, credentialStore, baseAddress)) + : this(new GitHubClient(productInformation, credentialStore, baseAddress)) { }