Interface IMessageAttachments

Assembly: redb.Route.dll

The attachments of one message, in order. Unlike Camel's map, names may repeat: a form posts several files under one
field and two files may share a name, and a map would lose all but one. Lookups by name return the first match.
Names compare ordinally (file names and Content-IDs are case-sensitive).

public interface IMessageAttachments : IReadOnlyList<Attachment>, IReadOnlyCollection<Attachment>, IEnumerable<Attachment>, IEnumerable

Methods

Add(Attachment)

Appends an attachment; an attachment with the same name may already be there.

void Add(Attachment attachment)

Clear()

Removes all attachments.

void Clear()

Find(string)

The first attachment named name, or null.

Attachment? Find(string name)

FindAll(string)

Every attachment named name, in order; empty when there is none.

IReadOnlyList<Attachment> FindAll(string name)

Remove(string)

Removes every attachment named name.

int Remove(string name)

Set(Attachment)

Puts attachment in place of every attachment with its name: at the position of the first one,

void Set(Attachment attachment)

Remarks

Not thread-safe, like .