Share via


ContentDispositionHeaderValue Class

Definition

Represents the value of a Content-Disposition header.

public ref class ContentDispositionHeaderValue
public class ContentDispositionHeaderValue
type ContentDispositionHeaderValue = class
Public Class ContentDispositionHeaderValue
Inheritance
ContentDispositionHeaderValue

Remarks

Note this is for use both in HTTP (https://tools.ietf.org/html/rfc6266) and MIME (https://tools.ietf.org/html/rfc2183).

Constructors

ContentDispositionHeaderValue(String)
ContentDispositionHeaderValue(StringSegment)

Initializes a new instance of ContentDispositionHeaderValue.

Properties

CreationDate

Gets or sets the DateTimeOffset at which the file was created.

DispositionType

Gets or sets a content disposition type.

FileName

Gets or sets a value that suggests how to construct a filename for storing the message payload to be used if the entity is detached and stored in a separate file.

FileNameStar

Gets or sets a value that suggests how to construct filenames for storing message payloads to be used if the entities are detached and stored in a separate files.

ModificationDate

Gets or sets the DateTimeOffset at which the file was last modified.

Name

Gets or sets the name of the content body part.

Parameters

Gets a collection of parameters included the Content-Disposition header.

ReadDate

Gets or sets the DateTimeOffset at which the file was last read.

Size

Gets or sets the approximate size, in bytes, of the file.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

Parse(String)
Parse(StringSegment)

Parses input as a ContentDispositionHeaderValue value.

SetHttpFileName(String)

Sets both FileName and FileNameStar using encodings appropriate for HTTP headers.

SetHttpFileName(StringSegment)

Sets both FileName and FileNameStar using encodings appropriate for HTTP headers.

SetMimeFileName(String)

Sets the FileName parameter using encodings appropriate for MIME headers. The FileNameStar paraemter is removed.

SetMimeFileName(StringSegment)

Sets the FileName parameter using encodings appropriate for MIME headers. The FileNameStar parameter is removed.

ToString()

Returns a string that represents the current object.

TryParse(String, ContentDispositionHeaderValue)
TryParse(StringSegment, ContentDispositionHeaderValue)

Attempts to parse the specified input as a ContentDispositionHeaderValue.

Extension Methods

IsFileDisposition(ContentDispositionHeaderValue)

Checks if the content disposition header is a file disposition

IsFormDisposition(ContentDispositionHeaderValue)

Checks if the content disposition header is a form disposition

Applies to