• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class MimeHeaderCollection

A collection of MimeHeader objects. Header names are case-insensitive.

Inheritance
object
MimeHeaderCollection
Implements
IEnumerable<MimeHeader>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Mail.Rfc.Mime
Assembly: DRIT.Mail.dll
Syntax
public sealed class MimeHeaderCollection : IEnumerable<MimeHeader>, IEnumerable

Constructors

View Source

MimeHeaderCollection()

Initializes a new instance of the MimeHeaderCollection class.

Declaration
public MimeHeaderCollection()

Properties

View Source

this[string]

Gets the first header with the specified name, or null if not found.

Declaration
public MimeHeader? this[string name] { get; }
Parameters
Type Name Description
string name
Property Value
Type Description
MimeHeader

Methods

View Source

Add(MimeHeader)

Adds a header to the collection.

Declaration
public void Add(MimeHeader header)
Parameters
Type Name Description
MimeHeader header

Specifies the header value.

View Source

Contains(string)

Determines whether a header with the specified name exists.

Declaration
public bool Contains(string name)
Parameters
Type Name Description
string name

Specifies the name value.

Returns
Type Description
bool
View Source

GetAll(string)

Gets all headers with the specified name.

Declaration
public IReadOnlyList<MimeHeader> GetAll(string name)
Parameters
Type Name Description
string name

Specifies the name value.

Returns
Type Description
IReadOnlyList<MimeHeader>
View Source

GetEnumerator()

Gets the enumerator.

Declaration
public IEnumerator<MimeHeader> GetEnumerator()
Returns
Type Description
IEnumerator<MimeHeader>
View Source

GetValue(string)

Gets the primary value of the first header with the specified name, or null.

Declaration
public string? GetValue(string name)
Parameters
Type Name Description
string name

Specifies the name value.

Returns
Type Description
string
View Source

Remove(string)

Removes all headers with the specified name.

Declaration
public void Remove(string name)
Parameters
Type Name Description
string name

Specifies the name value.

View Source

Set(MimeHeader)

Replaces all headers with the same name with the specified header.

Declaration
public void Set(MimeHeader header)
Parameters
Type Name Description
MimeHeader header

Specifies the header value.

Implements

IEnumerable<T>
IEnumerable
  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX