Add Simple constructors

This commit is contained in:
Perry Taylor
2013-10-30 21:26:56 -04:00
parent 89467b5b33
commit ff71007bf6
2 changed files with 25 additions and 2 deletions

View File

@@ -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");

View File

@@ -41,6 +41,7 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Reactive.Core, Version=2.1.30214.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Rx-Core.2.1.30214.0\lib\Net40\System.Reactive.Core.dll</HintPath>
@@ -119,4 +120,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>