Rename LdapDn to LdapDistinguishedName and use [Parameter(Key = "ldap_dn")] to set the API field name

This commit is contained in:
Ryan Gribble
2016-02-17 22:55:11 +10:00
parent 8be8c41966
commit 6a0ef92a84
7 changed files with 35 additions and 39 deletions
+5 -7
View File
@@ -2,6 +2,7 @@ using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using Octokit.Internal;
namespace Octokit
{
@@ -13,13 +14,11 @@ namespace Octokit
{
public User() { }
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Dn")]
[SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Dn")]
public User(string avatarUrl, string bio, string blog, int collaborators, string company, DateTimeOffset createdAt, int diskUsage, string email, int followers, int following, bool? hireable, string htmlUrl, int totalPrivateRepos, int id, string location, string login, string name, int ownedPrivateRepos, Plan plan, int privateGists, int publicGists, int publicRepos, string url, bool siteAdmin, string ldapDn)
public User(string avatarUrl, string bio, string blog, int collaborators, string company, DateTimeOffset createdAt, int diskUsage, string email, int followers, int following, bool? hireable, string htmlUrl, int totalPrivateRepos, int id, string location, string login, string name, int ownedPrivateRepos, Plan plan, int privateGists, int publicGists, int publicRepos, string url, bool siteAdmin, string ldapDistinguishedName)
: base(avatarUrl, bio, blog, collaborators, company, createdAt, diskUsage, email, followers, following, hireable, htmlUrl, totalPrivateRepos, id, location, login, name, ownedPrivateRepos, plan, privateGists, publicGists, publicRepos, AccountType.User, url)
{
SiteAdmin = siteAdmin;
LdapDn = ldapDn;
LdapDistinguishedName = ldapDistinguishedName;
}
/// <summary>
@@ -30,9 +29,8 @@ namespace Octokit
/// <summary>
/// LDAP Binding (GitHub Enterprise only)
/// </summary>
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Dn")]
[SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Dn")]
public string LdapDn { get; protected set; }
[Parameter(Key = "ldap_dn")]
public string LdapDistinguishedName { get; protected set; }
internal string DebuggerDisplay
{