Merge pull request #2025 from softworkz/AsyncStreamInterface

Async stream handling: Use interface instead of Func<Stream,Task>
This commit is contained in:
Luke
2016-08-15 17:59:28 -04:00
committed by GitHub
8 changed files with 64 additions and 25 deletions

View File

@@ -704,9 +704,9 @@ namespace MediaBrowser.Server.Implementations.HttpServer
throw error;
}
public object GetAsyncStreamWriter(Func<Stream, Task> streamWriter, IDictionary<string, string> responseHeaders = null)
public object GetAsyncStreamWriter(IAsyncStreamSource streamSource)
{
return new AsyncStreamWriterFunc(streamWriter, responseHeaders);
return new AsyncStreamWriter(streamSource);
}
}
}