PeterO.Mail.DispositionBuilder

PeterO.Mail.DispositionBuilder

public class DispositionBuilder

Deprecated. Use ContentDisposition.Builder instead.

A mutable data type that allows a content disposition to be built.

Member Summary

DispositionBuilder Constructor

public DispositionBuilder(
    PeterO.Mail.ContentDisposition mt);

Initializes a new instance of the PeterO.Mail.DispositionBuilder class using the data from the given content disposition.

Parameters:

Exceptions:

DispositionBuilder Constructor

public DispositionBuilder(
    string type);

Initializes a new instance of the PeterO.Mail.DispositionBuilder class using the given disposition type.

Parameters:

Exceptions:

DispositionBuilder Constructor

public DispositionBuilder();

Initializes a new instance of the PeterO.Mail.DispositionBuilder class using the disposition type "attachment" .

DispositionType

public string DispositionType { get; set; }

Gets or sets this value's disposition type, such as "inline" or "attachment".

Returns:

This value's disposition type, such as "inline" or "attachment" .

Exceptions:

IsMultipart

public bool IsMultipart { get; }

Deprecated. Irrelevant for content dispositions; will be removed in the future.

Gets a value indicating whether this is a multipart media type.

Returns:

true If this is a multipart media type; otherwise, false .

IsText

public bool IsText { get; }

Deprecated. Irrelevant for content dispositions; will be removed in the future.

Gets a value indicating whether this is a text media type.

Returns:

true If this is a text media type; otherwise, false .

RemoveParameter

public PeterO.Mail.DispositionBuilder RemoveParameter(
    string name);

Removes a parameter from this content disposition. Does nothing if the parameter's name doesn't exist.

Parameters:

Return Value:

This instance.

Exceptions:

SetDispositionType

public PeterO.Mail.DispositionBuilder SetDispositionType(
    string str);

Sets the disposition type, such as "inline". This method enables the pattern of method chaining (e.g., new ...().Set...().Set...() ) unlike with the DispositionType property in .NET or the setDispositionType method (with small s) in Java.

Parameters:

Return Value:

This instance.

Exceptions:

SetParameter

public PeterO.Mail.DispositionBuilder SetParameter(
    string name,
    string value);

Sets a parameter of this content disposition.

Parameters:

Return Value:

This instance.

Exceptions:

ToDisposition

public PeterO.Mail.ContentDisposition ToDisposition();

Converts this object to an immutable ContentDisposition object.

Return Value:

A MediaType object.

ToString

public override string ToString();

Converts this object to a text string.

Return Value:

A string representation of this object.

Back to MailLib start page.