mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-21 22:55:12 +00:00
Move Response to its own file and Internal namespace
A class named "Response" could conflict with a lot of things.
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using NSubstitute;
|
||||
using Octokit.Internal;
|
||||
using Octokit.Tests.Helpers;
|
||||
using Xunit;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using NSubstitute;
|
||||
using Octokit.Internal;
|
||||
using Xunit;
|
||||
|
||||
namespace Octokit.Tests.Clients
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using Octokit.Internal;
|
||||
using Xunit;
|
||||
|
||||
namespace Octokit.Tests.Exceptions
|
||||
|
||||
@@ -101,6 +101,7 @@ Global
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{01687D54-1D87-4562-A721-C57F1C94052C} = {CEC9D451-6291-4EDF-971A-D398144FBF96}
|
||||
{B84274D7-BE51-4613-8DB1-58E7C0EC45A8} = {397C742D-291E-46BD-99A5-57BB6902FA7B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
|
||||
@@ -25,20 +25,4 @@ namespace Octokit
|
||||
HttpStatusCode StatusCode { get; set; }
|
||||
string ContentType { get; set; }
|
||||
}
|
||||
|
||||
public class Response : IResponse
|
||||
{
|
||||
public Response()
|
||||
{
|
||||
Headers = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
public object BodyAsObject { get; set; }
|
||||
public string Body { get; set; }
|
||||
public Dictionary<string, string> Headers { get; private set; }
|
||||
public Uri ResponseUri { get; set; }
|
||||
public ApiInfo ApiInfo { get; set; }
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
public string ContentType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
22
Octokit/Http/Response.cs
Normal file
22
Octokit/Http/Response.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
|
||||
namespace Octokit.Internal
|
||||
{
|
||||
public class Response : IResponse
|
||||
{
|
||||
public Response()
|
||||
{
|
||||
Headers = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
public object BodyAsObject { get; set; }
|
||||
public string Body { get; set; }
|
||||
public Dictionary<string, string> Headers { get; private set; }
|
||||
public Uri ResponseUri { get; set; }
|
||||
public ApiInfo ApiInfo { get; set; }
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
public string ContentType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -358,6 +358,7 @@
|
||||
<Compile Include="Models\Response\SignatureResponse.cs" />
|
||||
<Compile Include="Helpers\PropertyOrField.cs" />
|
||||
<Compile Include="Models\Response\SearchResult.cs" />
|
||||
<Compile Include="Http\Response.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -370,6 +370,7 @@
|
||||
<Compile Include="Models\Response\SignatureResponse.cs" />
|
||||
<Compile Include="Helpers\PropertyOrField.cs" />
|
||||
<Compile Include="Models\Response\SearchResult.cs" />
|
||||
<Compile Include="Http\Response.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -365,6 +365,7 @@
|
||||
<Compile Include="Models\Response\SignatureResponse.cs" />
|
||||
<Compile Include="Helpers\PropertyOrField.cs" />
|
||||
<Compile Include="Models\Response\SearchResult.cs" />
|
||||
<Compile Include="Http\Response.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" />
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
@@ -356,6 +356,7 @@
|
||||
<Compile Include="Models\Response\SignatureResponse.cs" />
|
||||
<Compile Include="Helpers\PropertyOrField.cs" />
|
||||
<Compile Include="Models\Response\SearchResult.cs" />
|
||||
<Compile Include="Http\Response.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CodeAnalysisDictionary Include="..\CustomDictionary.xml">
|
||||
|
||||
@@ -360,6 +360,7 @@
|
||||
<Compile Include="Models\Response\SignatureResponse.cs" />
|
||||
<Compile Include="Helpers\PropertyOrField.cs" />
|
||||
<Compile Include="Models\Response\SearchResult.cs" />
|
||||
<Compile Include="Http\Response.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CodeAnalysisDictionary Include="..\CustomDictionary.xml">
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
<Compile Include="Http\ProductHeaderValue.cs" />
|
||||
<Compile Include="Models\Request\Signature.cs" />
|
||||
<Compile Include="Models\Request\CreateFileRequest.cs" />
|
||||
<Compile Include="Http\Response.cs" />
|
||||
<Compile Include="Models\Request\MarkAsReadRequest.cs" />
|
||||
<Compile Include="Models\Request\NewDeployKey.cs" />
|
||||
<Compile Include="Models\Request\NewRelease.cs" />
|
||||
|
||||
Reference in New Issue
Block a user