Files
octokit.net/Octokit.Reactive/ObservableExtensions.cs
Haacked e07b6d62c2 Add null checks and fix CodeAnalysis errors.
I enabled code analysis to the Octokit.Reactive project and
needed to fix things up.
2013-01-29 14:36:24 -08:00

21 lines
629 B
C#

using System;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
namespace Octokit.Reactive
{
public static class ObservableExtensions
{
public static IObservable<string> GetReadmeAsHtml(this IObservableRepositoriesClient client,
string owner,
string name)
{
Ensure.ArgumentNotNull(client, "client");
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
return client.GetReadme(owner, name).SelectMany(r => r.GetHtmlContent().ToObservable());
}
}
}