C# Class URSA.Web.Http.Header

Describes an HTTP header.
显示文件 Open project: alien-mcl/URSA Class Usage Examples

Public Methods

Method Description
Equals ( object obj ) : bool
Header ( string name ) : System

Initializes a new instance of the Header class.

Header ( string name, IEnumerable values ) : System

Initializes a new instance of the Header class.

Parse ( string header ) : Header

Parses a given string as an Header.

ToString ( ) : string
TryParse ( string header, Header &httpHeader ) : bool

Tries to parse a given string as an Header.

Private Methods

Method Description
CreateInstance ( string name, IList values ) : Header
GetHashCode ( ) : int
ParseEscapeChar ( char chr, bool &isInString, bool &isEscape, StringBuilder value ) : void
ParseOtherChars ( char chr, bool &isInString, bool &isEscape, StringBuilder value ) : void
ParseSeparatorChar ( char chr, bool &isInString, bool &isEscape, StringBuilder value, IList values ) : void
ParseStringChar ( char chr, bool &isInString, bool &isEscape, StringBuilder value ) : void
ParseValues ( string name, IList values, string valuesString ) : void

Method Details

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

Header() public method

Initializes a new instance of the Header class.
public Header ( string name ) : System
name string Name of the header.
return System

Header() public method

Initializes a new instance of the Header class.
public Header ( string name, IEnumerable values ) : System
name string Name of the header.
values IEnumerable Value of the header.
return System

Parse() public static method

Parses a given string as an Header.
public static Parse ( string header ) : Header
header string String to be parsed.
return Header

ToString() public method

public ToString ( ) : string
return string

TryParse() public static method

Tries to parse a given string as an Header.
public static TryParse ( string header, Header &httpHeader ) : bool
header string String to be parsed.
httpHeader Header Resulting HTTP header if parsing was successful; otherwise null.
return bool