Rename to Octokit to be consistent with other API libs

GitHub is naming all of the libraries Octokit for their respective
platforms
This commit is contained in:
Haacked
2013-01-29 14:00:27 -08:00
parent 4370788c34
commit 997e955f38
124 changed files with 225 additions and 226 deletions
+53
View File
@@ -0,0 +1,53 @@
using System.Diagnostics.CodeAnalysis;
namespace Octokit.Http
{
public class Credentials
{
[SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes"
, Justification = "Credentials is immutable")]
public readonly static Credentials Anonymous = new Credentials();
private Credentials()
{
AuthenticationType = AuthenticationType.Anonymous;
}
public Credentials(string token)
{
Ensure.ArgumentNotNullOrEmptyString(token, "token");
Login = null;
Password = token;
AuthenticationType = AuthenticationType.Oauth;
}
public Credentials(string login, string password)
{
Ensure.ArgumentNotNullOrEmptyString(login, "login");
Ensure.ArgumentNotNullOrEmptyString(password, "password");
Login = login;
Password = password;
AuthenticationType = AuthenticationType.Basic;
}
public string Login
{
get;
private set;
}
public string Password
{
get;
private set;
}
public AuthenticationType AuthenticationType
{
get;
private set;
}
}
}