2019-01-13 20:01:16 +00:00
|
|
|
using System;
|
2018-12-27 23:27:57 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.IO;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
using MediaBrowser.Model.IO;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Net
|
|
|
|
{
|
|
|
|
public class StaticResultOptions
|
|
|
|
{
|
|
|
|
public string ContentType { get; set; }
|
|
|
|
public TimeSpan? CacheDuration { get; set; }
|
|
|
|
public DateTime? DateLastModified { get; set; }
|
|
|
|
public Func<Task<Stream>> ContentFactory { get; set; }
|
|
|
|
|
|
|
|
public bool IsHeadRequest { get; set; }
|
|
|
|
|
|
|
|
public IDictionary<string, string> ResponseHeaders { get; set; }
|
|
|
|
|
|
|
|
public Action OnComplete { get; set; }
|
|
|
|
public Action OnError { get; set; }
|
|
|
|
|
|
|
|
public string Path { get; set; }
|
|
|
|
public long? ContentLength { get; set; }
|
|
|
|
|
2020-01-08 16:52:50 +00:00
|
|
|
public FileShare FileShare { get; set; }
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
public StaticResultOptions()
|
|
|
|
{
|
|
|
|
ResponseHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
2020-01-08 16:52:50 +00:00
|
|
|
FileShare = FileShare.Read;
|
2018-12-27 23:27:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public class StaticFileResultOptions : StaticResultOptions
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|