mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 11:40:42 +00:00
Add null checks and fix CodeAnalysis errors.
I enabled code analysis to the Octokit.Reactive project and needed to fix things up.
This commit is contained in:
@@ -23,6 +23,8 @@ namespace Octokit.Reactive.Clients
|
||||
|
||||
public IObservable<IReadOnlyCollection<SshKey>> GetAll(string user)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(user, "user");
|
||||
|
||||
return client.GetAll(user).ToObservable();
|
||||
}
|
||||
|
||||
@@ -33,11 +35,15 @@ namespace Octokit.Reactive.Clients
|
||||
|
||||
public IObservable<SshKey> Create(SshKeyUpdate key)
|
||||
{
|
||||
Ensure.ArgumentNotNull(key, "key");
|
||||
|
||||
return client.Create(key).ToObservable();
|
||||
}
|
||||
|
||||
public IObservable<SshKey> Update(long id, SshKeyUpdate key)
|
||||
{
|
||||
Ensure.ArgumentNotNull(key, "key");
|
||||
|
||||
return client.Update(id, key).ToObservable();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user