aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Net/IAsyncStreamSource.cs
diff options
context:
space:
mode:
authorsoftworkz <softworkz@hotmail.com>2016-08-05 06:08:11 +0200
committersoftworkz <softworkz@hotmail.com>2016-08-07 02:00:36 +0200
commit433254c498d2e43acfd34e5c4fcee2fdcc2e767b (patch)
treee04ddf9e4202800f5f4658d0bfe9e2f01675bfeb /MediaBrowser.Controller/Net/IAsyncStreamSource.cs
parent894d87fabb812152c76443afcf1739fda7c578ff (diff)
Async stream handling: Use interface instead of Func<Stream,Task>
No functional changes
Diffstat (limited to 'MediaBrowser.Controller/Net/IAsyncStreamSource.cs')
-rw-r--r--MediaBrowser.Controller/Net/IAsyncStreamSource.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Net/IAsyncStreamSource.cs b/MediaBrowser.Controller/Net/IAsyncStreamSource.cs
new file mode 100644
index 000000000..0f41f60a5
--- /dev/null
+++ b/MediaBrowser.Controller/Net/IAsyncStreamSource.cs
@@ -0,0 +1,18 @@
+using ServiceStack.Web;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Controller.Net
+{
+ /// <summary>
+ /// Interface IAsyncStreamSource
+ /// Enables asynchronous writing to http resonse streams
+ /// </summary>
+ public interface IAsyncStreamSource
+ {
+ /// <summary>
+ /// Asynchronously write to the response stream.
+ /// </summary>
+ Task WriteToAsync(Stream responseStream);
+ }
+}