refactoring ApiConnection.EmptyBody to RequestBody.Empty to break the inverse dependency from Connection to ApiConnection

This commit is contained in:
David Alpert
2015-07-31 23:43:37 -05:00
parent c54dfa196f
commit b4d71c8fe9
11 changed files with 22 additions and 7 deletions
-3
View File
@@ -15,9 +15,6 @@ namespace Octokit
{
readonly IApiPagination _pagination;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible")]
public static object EmptyBody = new object();
/// <summary>
/// Initializes a new instance of the <see cref="ApiConnection"/> class.
/// </summary>
+12
View File
@@ -0,0 +1,12 @@
namespace Octokit
{
/// <summary>
/// Container for the static <see cref="Empty"/> method that represents an
/// intentional empty request body to avoid overloading <code>null</code>.
/// </summary>
public static class RequestBody
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible")]
public static object Empty = new object();
}
}