diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index 6d7037e22..691787f1c 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -81,7 +81,6 @@ - diff --git a/MediaBrowser.Common/Net/HttpServer.cs b/MediaBrowser.Common/Net/HttpServer.cs index 9acccbf2d..69ded6f81 100644 --- a/MediaBrowser.Common/Net/HttpServer.cs +++ b/MediaBrowser.Common/Net/HttpServer.cs @@ -20,8 +20,7 @@ namespace MediaBrowser.Common.Net private IObservable ObservableHttpContext() { return Observable.Create(obs => - Observable.FromAsyncPattern(listener.BeginGetContext, - listener.EndGetContext)() + Observable.FromAsync(() => listener.GetContextAsync()) .Subscribe(obs)) .Repeat() .Retry() diff --git a/MediaBrowser.Common/Net/StreamExtensions.cs b/MediaBrowser.Common/Net/StreamExtensions.cs deleted file mode 100644 index c10e458ad..000000000 --- a/MediaBrowser.Common/Net/StreamExtensions.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.IO; -using System.Reactive.Linq; - -namespace MediaBrowser.Common.Net -{ - public static class StreamExtensions - { - public static IObservable ReadBytes(this Stream stream, int count) - { - var buffer = new byte[count]; - return Observable.FromAsyncPattern((cb, state) => stream.BeginRead(buffer, 0, count, cb, state), ar => - { - stream.EndRead(ar); - return buffer; - })(); - } - } -} \ No newline at end of file