C# Class URSA.Web.Http.HeaderCollection

Afficher le fichier Open project: alien-mcl/URSA Class Usage Examples

Méthodes publiques

Méthode Description
Add ( Header header ) : Header

Adds a new header.

If the header already exists, method will merge new value and parameters with the existing ones.

Add ( string name, string value ) : Header

Adds a new header.

If the header already exists, method will merge new value and parameters with the existing ones.

HeaderCollection ( ) : System

Initializes a new instance of the HeaderCollection class.

Merge ( HeaderCollection headers ) : void

Merges headers.

Parse ( string headers ) : HeaderCollection

Parses a given string as a HeaderCollection.

Remove ( string name ) : bool

Removes the header with given name.

Set ( Header header ) : Header

Sets a new header.

If the header already exists, it is replaced with the new one.

Set ( string name, string value ) : Header

Sets a new header.

If the header already exists, it is replaced with the new one.

TryParse ( string headers, HeaderCollection &headersCollection ) : bool

Tries to parse a given string as a HeaderCollection.

this ( string name ) : Header

Gets or sets the header by it's name.

Private Methods

Méthode Description
ToString ( ) : string

Method Details

Add() public méthode

Adds a new header.
If the header already exists, method will merge new value and parameters with the existing ones.
public Add ( Header header ) : Header
header Header Header to be added.
Résultat Header

Add() public méthode

Adds a new header.
If the header already exists, method will merge new value and parameters with the existing ones.
public Add ( string name, string value ) : Header
name string Name of the header to be added.
value string Value of the header to be added.
Résultat Header

HeaderCollection() public méthode

Initializes a new instance of the HeaderCollection class.
public HeaderCollection ( ) : System
Résultat System

Merge() public méthode

Merges headers.
public Merge ( HeaderCollection headers ) : void
headers HeaderCollection Headers to be merged.
Résultat void

Parse() public static méthode

Parses a given string as a HeaderCollection.
public static Parse ( string headers ) : HeaderCollection
headers string String to be parsed.
Résultat HeaderCollection

Remove() public méthode

Removes the header with given name.
public Remove ( string name ) : bool
name string Name of the header to be removed.
Résultat bool

Set() public méthode

Sets a new header.
If the header already exists, it is replaced with the new one.
public Set ( Header header ) : Header
header Header Header to be set.
Résultat Header

Set() public méthode

Sets a new header.
If the header already exists, it is replaced with the new one.
public Set ( string name, string value ) : Header
name string Name of the header to be added.
value string Value of the header to be added.
Résultat Header

TryParse() public static méthode

Tries to parse a given string as a HeaderCollection.
public static TryParse ( string headers, HeaderCollection &headersCollection ) : bool
headers string String to be parsed.
headersCollection HeaderCollection Resulting collection of headers if parsing was successful; otherwise null.
Résultat bool

this() public méthode

Gets or sets the header by it's name.
public this ( string name ) : Header
name string Name of the header.
Résultat Header