@@ -27,7 +27,6 @@ public static IApiClient Create(UriString repositoryUrl, IKeychain keychain, IPr
27
27
public UriString OriginalUrl { get ; }
28
28
29
29
private readonly IKeychain keychain ;
30
- private readonly IGitHubClient githubClient ;
31
30
private readonly IProcessManager processManager ;
32
31
private readonly ITaskManager taskManager ;
33
32
private readonly NPath nodeJsExecutablePath ;
@@ -43,7 +42,6 @@ public ApiClient(UriString hostUrl, IKeychain keychain, IGitHubClient githubClie
43
42
HostAddress = HostAddress . Create ( hostUrl ) ;
44
43
OriginalUrl = hostUrl ;
45
44
this . keychain = keychain ;
46
- this . githubClient = githubClient ;
47
45
this . processManager = processManager ;
48
46
this . taskManager = taskManager ;
49
47
this . nodeJsExecutablePath = nodeJsExecutablePath ;
@@ -114,7 +112,7 @@ public async Task Login(string username, string password, Action<LoginResult> ne
114
112
LoginResultData res = null ;
115
113
try
116
114
{
117
- res = await loginManager . Login ( OriginalUrl , githubClient , username , password ) ;
115
+ res = await loginManager . Login ( OriginalUrl , username , password ) ;
118
116
}
119
117
catch ( Exception ex )
120
118
{
@@ -160,7 +158,7 @@ public async Task<bool> LoginAsync(string username, string password, Func<LoginR
160
158
LoginResultData res = null ;
161
159
try
162
160
{
163
- res = await loginManager . Login ( OriginalUrl , githubClient , username , password ) ;
161
+ res = await loginManager . Login ( OriginalUrl , username , password ) ;
164
162
}
165
163
catch ( Exception )
166
164
{
@@ -216,17 +214,19 @@ private async Task<GitHubRepository> CreateRepositoryInternal(NewRepository newR
216
214
{
217
215
logger . Trace ( "Creating repository for organization" ) ;
218
216
219
- repository = ( await githubClient . Repository . Create ( organization , newRepository ) ) . ToGitHubRepository ( ) ;
217
+ // repository = (await githubClient.Repository.Create(organization, newRepository)).ToGitHubRepository();
220
218
}
221
219
else
222
220
{
223
221
logger . Trace ( "Creating repository for user" ) ;
224
222
225
- repository = ( await githubClient . Repository . Create ( newRepository ) ) . ToGitHubRepository ( ) ;
223
+ // repository = (await githubClient.Repository.Create(newRepository)).ToGitHubRepository();
226
224
}
227
225
228
- logger . Trace ( "Created Repository" ) ;
229
- return repository ;
226
+ throw new NotImplementedException ( ) ;
227
+
228
+ //logger.Trace("Created Repository");
229
+ //return repository;
230
230
}
231
231
catch ( Exception ex )
232
232
{
@@ -244,20 +244,22 @@ private async Task GetOrganizationInternal(Action<Organization[]> onSuccess, Act
244
244
await ValidateKeychain ( ) ;
245
245
await ValidateCurrentUserInternal ( ) ;
246
246
247
- var organizations = await githubClient . Organization . GetAllForCurrent ( ) ;
248
-
249
- logger . Trace ( "Obtained {0} Organizations" , organizations ? . Count . ToString ( ) ?? "NULL" ) ;
250
-
251
- if ( organizations != null )
252
- {
253
- var array = organizations . Select ( organization => new Organization ( ) {
254
- Name = organization . Name ,
255
- Login = organization . Login
256
- } ) . ToArray ( ) ;
257
- onSuccess ( array ) ;
258
- }
247
+ throw new NotImplementedException ( ) ;
248
+
249
+ // var organizations = await githubClient.Organization.GetAllForCurrent();
250
+ //
251
+ // logger.Trace("Obtained {0} Organizations", organizations?.Count.ToString() ?? "NULL");
252
+ //
253
+ // if (organizations != null)
254
+ // {
255
+ // var array = organizations.Select(organization => new Organization() {
256
+ // Name = organization.Name,
257
+ // Login = organization.Login
258
+ // }).ToArray();
259
+ // onSuccess(array);
260
+ // }
259
261
}
260
- catch ( Exception ex )
262
+ catch ( Exception ex )
261
263
{
262
264
logger . Error ( ex , "Error Getting Organizations" ) ;
263
265
onError ? . Invoke ( ex ) ;
@@ -271,7 +273,9 @@ private async Task<GitHubUser> GetCurrentUserInternal()
271
273
logger . Trace ( "Getting Current User" ) ;
272
274
await ValidateKeychain ( ) ;
273
275
274
- return ( await githubClient . User . Current ( ) ) . ToGitHubUser ( ) ;
276
+ throw new NotImplementedException ( ) ;
277
+
278
+ //return (await githubClient.User.Current()).ToGitHubUser();
275
279
}
276
280
catch ( KeychainEmptyException )
277
281
{
@@ -316,9 +320,7 @@ private async Task<bool> LoadKeychainInternal()
316
320
var uriString = keychain . Connections . First ( ) . Host ;
317
321
var keychainAdapter = await keychain . Load ( uriString ) ;
318
322
319
- logger . Trace ( "LoadKeychainInternal: Loaded" ) ;
320
-
321
- return keychainAdapter . OctokitCredentials != Credentials . Anonymous ;
323
+ throw new NotImplementedException ( ) ;
322
324
}
323
325
324
326
logger . Trace ( "LoadKeychainInternal: No keys to load" ) ;
0 commit comments