Class FileStreamResult
Sends binary content to the response by using a Stream instance.
public class FileStreamResult : FileResult
- Inheritance
-
FileStreamResult
- Inherited Members
Constructors
FileStreamResult(Stream, string)
Initializes a new instance of the FileStreamResult class.
public FileStreamResult(Stream fileStream, string contentType)
Parameters
fileStream
StreamThe stream to send to the response.
contentType
stringThe content type to use for the response.
Exceptions
- ArgumentNullException
The
fileStream
parameter is null.
Properties
FileStream
Gets the stream that will be sent to the response.
public Stream FileStream { get; }
Property Value
- Stream
The file stream.
Methods
WriteFile(HttpResponseBase)
Writes the file to the response.
protected override void WriteFile(HttpResponseBase response)
Parameters
response
HttpResponseBaseThe response.