Class ContentDisposition
Represents the value of a Content-Disposition header field (RFC 2183).
Inherited Members
Namespace: DRIT.Mail.Rfc.Mime
Assembly: DRIT.Mail.dll
Syntax
public sealed class ContentDisposition
Constructors
View SourceContentDisposition(string, MimeHeaderParameterCollection)
Initializes a new instance of the ContentDisposition class.
Declaration
public ContentDisposition(string disposition, MimeHeaderParameterCollection parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| string | disposition | |
| MimeHeaderParameterCollection | parameters |
Properties
View SourceCreationDate
Gets the creation date parameter, or null if not specified.
Declaration
public DateTimeOffset? CreationDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset? |
Disposition
Gets the disposition type (inline or attachment).
Declaration
public string Disposition { get; }
Property Value
| Type | Description |
|---|---|
| string |
FileName
Gets the filename parameter, or null if not specified.
Declaration
public string? FileName { get; }
Property Value
| Type | Description |
|---|---|
| string |
IsAttachment
Gets a value indicating whether this is an attachment disposition.
Declaration
public bool IsAttachment { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsInline
Gets a value indicating whether this is an inline disposition.
Declaration
public bool IsInline { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ModificationDate
Gets the modification date parameter, or null if not specified.
Declaration
public DateTimeOffset? ModificationDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset? |
Parameters
Gets the parameters associated with this Content-Disposition.
Declaration
public MimeHeaderParameterCollection Parameters { get; }
Property Value
| Type | Description |
|---|---|
| MimeHeaderParameterCollection |
ReadDate
Gets the read date parameter, or null if not specified.
Declaration
public DateTimeOffset? ReadDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset? |
Size
Gets the size parameter, or null if not specified.
Declaration
public long? Size { get; }
Property Value
| Type | Description |
|---|---|
| long? |
Methods
View SourceParse(string)
Parses a Content-Disposition header value (e.g.
attachment; filename="file.ext").
Declaration
public static ContentDisposition Parse(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The value to process. |
Returns
| Type | Description |
|---|---|
| ContentDisposition |
ToString()
Processes the to string data.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |