jellyfin/MediaBrowser.Controller/Net/StaticResultOptions.cs

45 lines
1 KiB
C#
Raw Normal View History

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