ContentDispositionHeaderValue 类

定义

表示 Content-Disposition 标头的值。

public ref class ContentDispositionHeaderValue
public ref class ContentDispositionHeaderValue : ICloneable
public class ContentDispositionHeaderValue
public class ContentDispositionHeaderValue : ICloneable
type ContentDispositionHeaderValue = class
type ContentDispositionHeaderValue = class
    interface ICloneable
Public Class ContentDispositionHeaderValue
Public Class ContentDispositionHeaderValue
Implements ICloneable
继承
ContentDispositionHeaderValue
实现

注解

Content-Disposition 标头通常用于处理文件上传和下载。 格式与其他标头的不同之处在于,它是具有处置类型的单个标头,后跟参数列表,其中一些参数已明确定义。

此标头在两个不同的上下文中使用:

  1. 类中 MultipartFormDataContent 嵌套正文内容的 MIME 标头。 有关详细信息,请参阅 IETF RFC 2183。

  2. 类中的 HttpContentHeaders HTTP 标头。 有关详细信息,请参阅 IETF RFC 6266。

构造函数

ContentDispositionHeaderValue(ContentDispositionHeaderValue)

初始化 ContentDispositionHeaderValue 类的新实例。

ContentDispositionHeaderValue(String)

初始化 ContentDispositionHeaderValue 类的新实例。

属性

CreationDate

文件的创建日期。

DispositionType

内容正文部分的处置类型。

FileName

有关如何构造文件名的建议,用于存储实体分离并存储在单独的文件中时要使用的消息有效负载。

FileNameStar

有关如何在实体分离并存储在单独的文件中时用于存储消息有效负载的文件名的建议。

ModificationDate

上次修改文件的日期。

Name

内容正文部分的名称。

Parameters

一组包含 Content-disposition 标头的参数。

ReadDate

上次读取文件的日期。

Size

文件的近似大小(以字节为单位)。

方法

Equals(Object)

确定指定的 Object 是否等于当前的 ContentDispositionHeaderValue 对象。

GetHashCode()

充当 ContentDispositionHeaderValue 对象的哈希函数。

GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
Parse(String)

将字符串转换为 ContentDispositionHeaderValue 实例。

ToString()

返回表示当前 ContentDispositionHeaderValue 对象的字符串。

TryParse(String, ContentDispositionHeaderValue)

确定一个字符串是否为有效的 ContentDispositionHeaderValue 信息。

显式接口实现

ICloneable.Clone()

创建作为当前 ContentDispositionHeaderValue 实例副本的新对象。

适用于