Interface IHttpResultFactory
Interface IHttpResultFactory
Assembly: MediaBrowser.Controller.dll
public interface IHttpResultFactory
Methods
Declaration
object GetRedirectResult(string url)
Parameters
Type |
Name |
Description |
System.String |
url |
|
Returns
Type |
Description |
System.Object |
|
Declaration
object GetResult(IRequest requestContext, Stream content, string contentType, IDictionary<string, string> responseHeaders = null)
Parameters
Type |
Name |
Description |
IRequest |
requestContext |
|
System.IO.Stream |
content |
|
System.String |
contentType |
|
System.Collections.Generic.IDictionary<System.String, System.String> |
responseHeaders |
|
Returns
Type |
Description |
System.Object |
|
Declaration
object GetResult(IRequest requestContext, ReadOnlyMemory<byte> content, string contentType, IDictionary<string, string> responseHeaders = null)
Parameters
Type |
Name |
Description |
IRequest |
requestContext |
|
System.ReadOnlyMemory<System.Byte> |
content |
|
System.String |
contentType |
|
System.Collections.Generic.IDictionary<System.String, System.String> |
responseHeaders |
|
Returns
Type |
Description |
System.Object |
|
Declaration
object GetResult(IRequest requestContext, ReadOnlySpan<char> content, string contentType, IDictionary<string, string> responseHeaders = null)
Parameters
Type |
Name |
Description |
IRequest |
requestContext |
|
System.ReadOnlySpan<System.Char> |
content |
|
System.String |
contentType |
|
System.Collections.Generic.IDictionary<System.String, System.String> |
responseHeaders |
|
Returns
Type |
Description |
System.Object |
|
Declaration
object GetResult(ReadOnlySpan<char> content, string contentType, IDictionary<string, string> responseHeaders = null)
Parameters
Type |
Name |
Description |
System.ReadOnlySpan<System.Char> |
content |
|
System.String |
contentType |
|
System.Collections.Generic.IDictionary<System.String, System.String> |
responseHeaders |
|
Returns
Type |
Description |
System.Object |
|
Declaration
object GetResult<T>(IRequest requestContext, T result, IDictionary<string, string> responseHeaders = null)
where T : class
Parameters
Type |
Name |
Description |
IRequest |
requestContext |
|
T |
result |
|
System.Collections.Generic.IDictionary<System.String, System.String> |
responseHeaders |
|
Returns
Type |
Description |
System.Object |
|
Type Parameters
Gets the static file result.
Declaration
Task<object> GetStaticFileResult(IRequest requestContext, StaticFileResultOptions options)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Object> |
System.Object.
|
Gets the static file result.
Declaration
Task<object> GetStaticFileResult(IRequest requestContext, string path, FileShareMode fileShare = FileShareMode.Read)
Parameters
Type |
Name |
Description |
IRequest |
requestContext |
The request context.
|
System.String |
path |
The path.
|
FileShareMode |
fileShare |
The file share.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Object> |
System.Object.
|
Declaration
Task<object> GetStaticResult(IRequest requestContext, StaticResultOptions options)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Object> |
System.Object.
|
Declaration
Task<object> GetStaticResult(IRequest requestContext, Guid cacheKey, DateTimeOffset? lastDateModified, TimeSpan? cacheDuration, string contentType, Func<long, long, CancellationToken, Task<StreamHandler>> contentFactory, IDictionary<string, string> responseHeaders = null, bool isHeadRequest = false)
Parameters
Type |
Name |
Description |
IRequest |
requestContext |
|
System.Guid |
cacheKey |
|
System.Nullable<System.DateTimeOffset> |
lastDateModified |
|
System.Nullable<System.TimeSpan> |
cacheDuration |
|
System.String |
contentType |
|
System.Func<System.Int64, System.Int64, System.Threading.CancellationToken, System.Threading.Tasks.Task<StreamHandler>> |
contentFactory |
|
System.Collections.Generic.IDictionary<System.String, System.String> |
responseHeaders |
|
System.Boolean |
isHeadRequest |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Object> |
|
Extension Methods