Class StreamHttpResponse
Ответ в виде потока байт.
Inherited Members
Namespace:InfinniPlatform.Http
Assembly:InfinniPlatform.Core.Abstractions.dll
Syntax
public sealed class StreamHttpResponse : HttpResponse, IHttpResponse
Constructors
| Improve this Doc View SourceStreamHttpResponse(Func<Stream>, String)
Конструктор.
Declaration
public StreamHttpResponse(Func<Stream> fileStream, string contentType = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Stream> | fileStream | Содержимое файла. |
| System.String | contentType | Тип содержимого тела ответа. |
StreamHttpResponse(Byte[], String)
Declaration
public StreamHttpResponse(byte[] fileContent, string contentType = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | fileContent | |
| System.String | contentType |
StreamHttpResponse(String, String)
Конструктор.
Declaration
public StreamHttpResponse(string filePath, string contentType = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | Путь к файлу. |
| System.String | contentType | Тип содержимого тела ответа. |
Properties
| Improve this Doc View SourceContentLength
Размер файла в байтах.
Declaration
public long ? ContentLength { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int64> |
FileName
Наименование файла.
Declaration
public string FileName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
LastWriteTimeUtc
Время последнего изменения файла.
Declaration
public DateTime? LastWriteTimeUtc { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<DateTime> |