public void Dispose()
 {
     if (authorization != null)
     {
         authService.DeleteAuthorization(authorization);
         authorization = null;
     }
 }
 public Authorization GetAuthorization(string username, string password)
 {
     if (authorization == null)
     {
         authService = new AuthorizationService(username, password);
         authorization = authService.CreateAuthorization("testGHTestSuite",
             scopes: new[] {"user", "repo"});
     }
     return authorization;
 }
 public void DeleteAuthorization(Authorization authorization)
 {
     impl.DeleteAuthorization(authorization);
 }
示例#4
0
 public GithubService(Authorization authorization, string rootUri = Constants.GithubUri)
     : base(new HttpClient(new OAuth2Handler(authorization)), rootUri)
 {
 }
示例#5
0
 public GithubService(Authorization authorization, string rootUri = Constants.GithubUri)
     : base(new HttpClient(new OAuth2Handler(authorization)), rootUri)
 {
 }