C# Класс LumiSoft.Net.Mime.HeaderFieldCollection

Mime entity header fields collection.
Наследование: IEnumerable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Add ( HeaderField headerField ) : void

Adds specified heade field to the end of the collection.

Add ( string fieldName, string value ) : void

Adds a new header field with specified name and value to the end of the collection.

Clear ( ) : void

Clears the collection of all header fields.

Contains ( HeaderField headerField ) : bool

Gets if collection contains specified header field.

Contains ( string fieldName ) : bool

Gets if collection contains specified header field.

Get ( string fieldName ) : LumiSoft.Net.Mime.HeaderField[]

Gets header fields with specified name, returns null if specified field doesn't exist.

GetEnumerator ( ) : IEnumerator

Gets enumerator.

GetFirst ( string fieldName ) : HeaderField

Gets first header field with specified name, returns null if specified field doesn't exist.

HeaderFieldCollection ( ) : System

Default constructor.

Insert ( int index, string fieldName, string value ) : void

Inserts a new header field into the collection at the specified location.

Parse ( Stream stream ) : void

Parses header fields from stream. Stream position stays where header reading ends.

Parse ( string headerString ) : void

Parses header fields from string.

Remove ( HeaderField field ) : void

Removes specified header field from the collection.

Remove ( int index ) : void

Removes header field at the specified index from the collection.

RemoveAll ( string fieldName ) : void

Removes all header fields with specified name from the collection.

ToHeaderString ( string encodingCharSet ) : string

Converts header fields to rfc 2822 message header string.

this ( int index ) : HeaderField

Gets header field from specified index.

Приватные методы

Метод Описание
EncodeHeaderField ( string text ) : string

Encodes header field with quoted-printable encoding, if value contains ANSI or UNICODE chars.

Описание методов

Add() публичный Метод

Adds specified heade field to the end of the collection.
public Add ( HeaderField headerField ) : void
headerField HeaderField Header field.
Результат void

Add() публичный Метод

Adds a new header field with specified name and value to the end of the collection.
public Add ( string fieldName, string value ) : void
fieldName string Header field name.
value string Header field value.
Результат void

Clear() публичный Метод

Clears the collection of all header fields.
public Clear ( ) : void
Результат void

Contains() публичный Метод

Gets if collection contains specified header field.
public Contains ( HeaderField headerField ) : bool
headerField HeaderField Header field.
Результат bool

Contains() публичный Метод

Gets if collection contains specified header field.
public Contains ( string fieldName ) : bool
fieldName string Header field name.
Результат bool

Get() публичный Метод

Gets header fields with specified name, returns null if specified field doesn't exist.
public Get ( string fieldName ) : LumiSoft.Net.Mime.HeaderField[]
fieldName string Header field name.
Результат LumiSoft.Net.Mime.HeaderField[]

GetEnumerator() публичный Метод

Gets enumerator.
public GetEnumerator ( ) : IEnumerator
Результат IEnumerator

GetFirst() публичный Метод

Gets first header field with specified name, returns null if specified field doesn't exist.
public GetFirst ( string fieldName ) : HeaderField
fieldName string Header field name.
Результат HeaderField

HeaderFieldCollection() публичный Метод

Default constructor.
public HeaderFieldCollection ( ) : System
Результат System

Insert() публичный Метод

Inserts a new header field into the collection at the specified location.
public Insert ( int index, string fieldName, string value ) : void
index int The location in the collection where you want to add the header field.
fieldName string Header field name.
value string Header field value.
Результат void

Parse() публичный Метод

Parses header fields from stream. Stream position stays where header reading ends.
public Parse ( Stream stream ) : void
stream Stream Stream from where to parse.
Результат void

Parse() публичный Метод

Parses header fields from string.
public Parse ( string headerString ) : void
headerString string Header string.
Результат void

Remove() публичный Метод

Removes specified header field from the collection.
public Remove ( HeaderField field ) : void
field HeaderField Header field to remove.
Результат void

Remove() публичный Метод

Removes header field at the specified index from the collection.
public Remove ( int index ) : void
index int The index of the header field to remove.
Результат void

RemoveAll() публичный Метод

Removes all header fields with specified name from the collection.
public RemoveAll ( string fieldName ) : void
fieldName string Header field name.
Результат void

ToHeaderString() публичный Метод

Converts header fields to rfc 2822 message header string.
public ToHeaderString ( string encodingCharSet ) : string
encodingCharSet string CharSet to use for non ASCII header field values. Utf-8 is recommended value, if you explicity don't need other.
Результат string

this() публичный Метод

Gets header field from specified index.
public this ( int index ) : HeaderField
index int
Результат HeaderField