restore nuget targets for mono build

This commit is contained in:
Luke Pulverenti
2014-09-02 22:30:24 -04:00
parent a3d553a7fb
commit 60d1d5cdee
27 changed files with 396 additions and 251 deletions

View File

@@ -39,6 +39,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
public bool Throttle { get; set; }
public long ThrottleLimit { get; set; }
public long MinThrottlePosition;
public Func<long, long, long> ThrottleCallback { get; set; }
public Action OnComplete { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="StreamWriter" /> class.
@@ -85,7 +87,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
{
responseStream = new ThrottledStream(responseStream, ThrottleLimit)
{
MinThrottlePosition = MinThrottlePosition
MinThrottlePosition = MinThrottlePosition,
ThrottleCallback = ThrottleCallback
};
}
var task = WriteToAsync(responseStream);
@@ -113,6 +116,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer
throw;
}
finally
{
if (OnComplete != null)
{
OnComplete();
}
}
}
}
}