FileContentResult 构造函数

定义

重载

FileContentResult(Byte[], MediaTypeHeaderValue)

使用提供的 和contentType提供的 fileContents 创建一个新FileContentResult实例。

FileContentResult(Byte[], String)

使用提供的 和contentType提供的 fileContents 创建一个新FileContentResult实例。

FileContentResult(Byte[], MediaTypeHeaderValue)

使用提供的 和contentType提供的 fileContents 创建一个新FileContentResult实例。

public:
 FileContentResult(cli::array <System::Byte> ^ fileContents, Microsoft::Net::Http::Headers::MediaTypeHeaderValue ^ contentType);
public FileContentResult (byte[] fileContents, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType);
new Microsoft.AspNetCore.Mvc.FileContentResult : byte[] * Microsoft.Net.Http.Headers.MediaTypeHeaderValue -> Microsoft.AspNetCore.Mvc.FileContentResult
Public Sub New (fileContents As Byte(), contentType As MediaTypeHeaderValue)

参数

fileContents
Byte[]

表示文件内容的字节。

contentType
MediaTypeHeaderValue

响应的 Content-Type 标头。

适用于

FileContentResult(Byte[], String)

使用提供的 和contentType提供的 fileContents 创建一个新FileContentResult实例。

public:
 FileContentResult(cli::array <System::Byte> ^ fileContents, System::String ^ contentType);
public FileContentResult (byte[] fileContents, string contentType);
new Microsoft.AspNetCore.Mvc.FileContentResult : byte[] * string -> Microsoft.AspNetCore.Mvc.FileContentResult
Public Sub New (fileContents As Byte(), contentType As String)

参数

fileContents
Byte[]

表示文件内容的字节。

contentType
String

响应的 Content-Type 标头。

适用于