Click or drag to resize
MimeKit

HeaderList Class

A list of Headers.
Inheritance Hierarchy
SystemObject
  MimeKitHeaderList

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 2.14.0
Syntax
C#
public sealed class HeaderList : IList<Header>, 
	ICollection<Header>, IEnumerable<Header>, IEnumerable

The HeaderList type exposes the following members.

Constructors
  NameDescription
Public methodHeaderList
Initialize a new instance of the HeaderList class.
Top
Properties
  NameDescription
Public propertyCount
Get the number of headers in the list.
Public propertyIsReadOnly
Get whether or not the header list is read only.
Public propertyItemInt32
Get or set the Header at the specified index.
Public propertyItemString
Get or set the value of the first occurance of a header with the specified field name.
Public propertyItemHeaderId
Get or set the value of the first occurance of a header with the specified field name.
Top
Methods
  NameDescription
Public methodAdd(Header)
Add the specified header.
Public methodAdd(String, String)
Add a header with the specified field and value.
Public methodAdd(HeaderId, String)
Add a header with the specified field and value.
Public methodAdd(String, Encoding, String)
Add a header with the specified field and value.
Public methodAdd(HeaderId, Encoding, String)
Add a header with the specified field and value.
Public methodClear
Clear the header list.
Public methodContains(String)
Check if the HeaderList contains a header with the specified field name.
Public methodContains(Header)
Check if the HeaderList contains the specified header.
Public methodContains(HeaderId)
Check if the HeaderList contains a header with the specified field name.
Public methodCopyTo
Copy all of the headers in the HeaderList to the specified array.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetEnumerator
Get an enumerator for the list of headers.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf(String)
Get the index of the requested header, if it exists.
Public methodIndexOf(Header)
Get the index of the requested header, if it exists.
Public methodIndexOf(HeaderId)
Get the index of the requested header, if it exists.
Public methodInsert(Int32, Header)
Insert the specified header at the given index.
Public methodInsert(Int32, HeaderId, String)
Insert a header with the specified field and value at the given index.
Public methodInsert(Int32, String, String)
Insert a header with the specified field and value at the given index.
Public methodInsert(Int32, HeaderId, Encoding, String)
Insert a header with the specified field and value at the given index.
Public methodInsert(Int32, String, Encoding, String)
Insert a header with the specified field and value at the given index.
Public methodLastIndexOf(String)
Get the last index of the requested header, if it exists.
Public methodLastIndexOf(HeaderId)
Get the last index of the requested header, if it exists.
Public methodStatic memberLoad(Stream, CancellationToken)
Load a HeaderList from the specified stream.
Public methodStatic memberLoad(String, CancellationToken)
Load a HeaderList from the specified file.
Public methodStatic memberLoad(ParserOptions, Stream, CancellationToken)
Load a HeaderList from the specified stream.
Public methodStatic memberLoad(ParserOptions, String, CancellationToken)
Load a HeaderList from the specified file.
Public methodStatic memberLoadAsync(Stream, CancellationToken)
Asynchronously load a HeaderList from the specified stream.
Public methodStatic memberLoadAsync(String, CancellationToken)
Asynchronously load a HeaderList from the specified file.
Public methodStatic memberLoadAsync(ParserOptions, Stream, CancellationToken)
Asynchronously load a HeaderList from the specified stream.
Public methodStatic memberLoadAsync(ParserOptions, String, CancellationToken)
Asynchronously load a HeaderList from the specified file.
Public methodRemove(String)
Remove the first occurance of the specified header field.
Public methodRemove(Header)
Remove the specified header.
Public methodRemove(HeaderId)
Remove the first occurance of the specified header field.
Public methodRemoveAll(String)
Remove all of the headers matching the specified field name.
Public methodRemoveAll(HeaderId)
Remove all of the headers matching the specified field name.
Public methodRemoveAt
Remove the header at the specified index.
Public methodReplace(Header)
Replace all headers with identical field names with the single specified header.
Public methodReplace(String, String)
Replace all headers with identical field names with the single specified header.
Public methodReplace(HeaderId, String)
Replace all headers with identical field names with the single specified header.
Public methodReplace(String, Encoding, String)
Replace all headers with identical field names with the single specified header.
Public methodReplace(HeaderId, Encoding, String)
Replace all headers with identical field names with the single specified header.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteTo(Stream, CancellationToken)
Write the HeaderList to the specified output stream.
Public methodWriteTo(FormatOptions, Stream, CancellationToken)
Write the HeaderList to the specified output stream.
Public methodWriteToAsync(Stream, CancellationToken)
Asynchronously write the HeaderList to the specified output stream.
Public methodWriteToAsync(FormatOptions, Stream, CancellationToken)
Asynchronously write the HeaderList to the specified output stream.
Top
Remarks
Represents a list of headers as found in a MimeMessage or MimeEntity.
See Also