diff --git a/CreateNuGetPackage.cmd b/CreateNuGetPackage.cmd
new file mode 100644
index 0000000..1bda2f9
--- /dev/null
+++ b/CreateNuGetPackage.cmd
@@ -0,0 +1,17 @@
+@echo off
+
+# Usage CreateNuGetPackage.cmd 1.2.0
+
+set framework=v4.0.30319
+
+
+set configuration=Release
+
+rmdir /s /d bin\%configuration%
+
+"%SystemDrive%\Windows\Microsoft.NET\Framework\%framework%\MSBuild.exe" IronGitHub.sln /p:Configuration=%configuration% /p:Platform="Any CPU" /p:OutputPath=bin\%configuration%\net40
+"%SystemDrive%\Windows\Microsoft.NET\Framework\%framework%\MSBuild.exe" IronGitHub.sln /p:Configuration=%configuration% /p:Platform="Any CPU" /p:TargetFrameworkVersion=4.5 /p:OutputPath=bin\%configuration%\net45
+
+.nuget\NuGet.exe pack IronGitHub.nuspec -BasePath IronGitHub\bin\%configuration% -Version %1
+
+pause
\ No newline at end of file
diff --git a/IntegrationTests/HookTests.cs b/IntegrationTests/HookTests.cs
index 5f0511a..39a2552 100644
--- a/IntegrationTests/HookTests.cs
+++ b/IntegrationTests/HookTests.cs
@@ -51,7 +51,7 @@ public void FixtureSetup()
.ContinueWith(
t =>
{
- Task.Delay(10000);
+ TaskEx.Delay(10000);
_tempHook =
Api.Hooks.Create(
_testUsername,
diff --git a/IntegrationTests/IntegrationTests.csproj b/IntegrationTests/IntegrationTests.csproj
index 1bd3179..d1f2424 100644
--- a/IntegrationTests/IntegrationTests.csproj
+++ b/IntegrationTests/IntegrationTests.csproj
@@ -9,10 +9,11 @@
Properties
IntegrationTests
IntegrationTests
- v4.5
+ v4.0
512
..\
true
+
true
@@ -34,7 +35,16 @@
False
- ..\packages\FluentAssertions.2.1.0.0\lib\net45\FluentAssertions.dll
+ ..\packages\FluentAssertions.2.1.0.0\lib\net40\FluentAssertions.dll
+
+
+ ..\packages\Microsoft.Bcl.Async.1.0.16\lib\net40\Microsoft.Threading.Tasks.dll
+
+
+ ..\packages\Microsoft.Bcl.Async.1.0.16\lib\net40\Microsoft.Threading.Tasks.Extensions.dll
+
+
+ ..\packages\Microsoft.Bcl.Async.1.0.16\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
..\packages\NUnit.2.6.2\lib\nunit.framework.dll
@@ -45,7 +55,14 @@
+
+
+ ..\packages\Microsoft.Bcl.1.0.19\lib\net40\System.Runtime.dll
+
+
+ ..\packages\Microsoft.Bcl.1.0.19\lib\net40\System.Threading.Tasks.dll
+
@@ -77,6 +94,11 @@
+
+
+
+
+
- $id$
+ IronGitHub
$version$
IronGitHub
in2bits (Tim Erickson)
@@ -12,9 +12,24 @@
https://github.com/in2bits/IronGitHub/blob/master/License.txt
https://github.com/in2bits/IronGitHub
true
- $description$
+ C# client for GitHub Api v3
Supports auth, Gist create/read/delete, Repository read, User read, Organization read, Search Users, Search Repositories.
Copyright 2013 in2bits (Tim Erickson)
github api v3 gist
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IronGitHub.sln b/IronGitHub.sln
index 3859c29..3db24c4 100644
--- a/IronGitHub.sln
+++ b/IronGitHub.sln
@@ -14,6 +14,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTests", "Integra
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{591FFECE-2193-4633-9600-17AE215F0F26}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5B181261-CB13-4795-8DEB-967A2FBB53A4}"
+ ProjectSection(SolutionItems) = preProject
+ Contrib.md = Contrib.md
+ IronGitHub.nuspec = IronGitHub.nuspec
+ License.txt = License.txt
+ README.md = README.md
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
diff --git a/IronGitHub/Configuration.cs b/IronGitHub/Configuration.cs
index 52009dc..2b56cfa 100644
--- a/IronGitHub/Configuration.cs
+++ b/IronGitHub/Configuration.cs
@@ -22,10 +22,11 @@ public Configuration(string defaultDomain)
{
Domain = defaultDomain;
var version = "0.1";
- var versionAttribute = Assembly.GetExecutingAssembly().CustomAttributes
- .First(x => x.AttributeType == typeof(AssemblyFileVersionAttribute));
+ var versionAttribute = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true)
+ .OfType()
+ .First();
if (versionAttribute != null)
- version = versionAttribute.ConstructorArguments[0].Value as string;
+ version = versionAttribute.Version.ToString();
UserAgent = "IronGitHub API v" + version;
}
public string Domain { get; set; }
diff --git a/IronGitHub/GitHubApiBase.cs b/IronGitHub/GitHubApiBase.cs
index 14bf7fb..ded0963 100644
--- a/IronGitHub/GitHubApiBase.cs
+++ b/IronGitHub/GitHubApiBase.cs
@@ -55,7 +55,7 @@ protected HttpWebRequest CreateRequest(string path, IDictionary
}
}
var uri = new Uri(uriString);
- var request = WebRequest.CreateHttp(uri);
+ var request = (HttpWebRequest)WebRequest.Create(uri);
var auth = Context.Authorization;
if (auth != Authorization.Anonymous)
{
diff --git a/IronGitHub/IronGitHub.csproj b/IronGitHub/IronGitHub.csproj
index 1707f31..23a1929 100644
--- a/IronGitHub/IronGitHub.csproj
+++ b/IronGitHub/IronGitHub.csproj
@@ -9,10 +9,11 @@
Properties
IronGitHub
IronGitHub
- v4.5
+ v4.0
512
..\
true
+
true
@@ -33,18 +34,29 @@
4
+
+ ..\packages\Microsoft.Bcl.Async.1.0.16\lib\net40\Microsoft.Threading.Tasks.dll
+
+
+ ..\packages\Microsoft.Bcl.Async.1.0.16\lib\net40\Microsoft.Threading.Tasks.Extensions.dll
+
+
+ ..\packages\Microsoft.Bcl.Async.1.0.16\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
+
False
..\packages\ServiceStack.Text.3.9.62\lib\net35\ServiceStack.Text.dll
+
+
+ ..\packages\Microsoft.Bcl.1.0.19\lib\net40\System.Runtime.dll
+
-
-
-
-
-
+
+ ..\packages\Microsoft.Bcl.1.0.19\lib\net40\System.Threading.Tasks.dll
+
@@ -111,6 +123,11 @@
+
+
+
+
+