mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 20:13:40 +00:00
adfb50198e
Just trying to make @half-ogre happy
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Reactive.Threading.Tasks;
|
|
|
|
namespace Octokit.Reactive.Clients
|
|
{
|
|
public class ObservableOrganizationsClient : IObservableOrganizationsClient
|
|
{
|
|
readonly IOrganizationsClient _client;
|
|
|
|
public ObservableOrganizationsClient(IOrganizationsClient client)
|
|
{
|
|
Ensure.ArgumentNotNull(client, "client");
|
|
|
|
_client = client;
|
|
}
|
|
|
|
public IObservable<Organization> Get(string org)
|
|
{
|
|
Ensure.ArgumentNotNullOrEmptyString(org, "org");
|
|
|
|
return _client.Get(org).ToObservable();
|
|
}
|
|
|
|
public IObservable<IReadOnlyCollection<Organization>> GetAllForCurrent()
|
|
{
|
|
return _client.GetAllForCurrent().ToObservable();
|
|
}
|
|
|
|
public IObservable<IReadOnlyCollection<Organization>> GetAll(string user)
|
|
{
|
|
Ensure.ArgumentNotNullOrEmptyString(user, "user");
|
|
|
|
return _client.GetAll(user).ToObservable();
|
|
}
|
|
}
|
|
}
|