mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 11:24:44 +00:00
Make credential store awaitable
The storage mechanism for credentials is very likely to be an async data store. So might as well play it safe and make it awaitable.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace Octokit.Internal
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Octokit.Internal
|
||||
{
|
||||
public class InMemoryCredentialStore : ICredentialStore
|
||||
{
|
||||
@@ -11,9 +13,9 @@
|
||||
_credentials = credentials;
|
||||
}
|
||||
|
||||
public Credentials GetCredentials()
|
||||
public Task<Credentials> GetCredentials()
|
||||
{
|
||||
return _credentials;
|
||||
return Task.Factory.StartNew(() => _credentials);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user