C# Class URSA.Web.Http.HttpUrl

Represents an HTTP/HTTPS url.
Inheritance: IpUrl
显示文件 Open project: alien-mcl/URSA Class Usage Examples

Public Methods

Method Description
Equals ( object obj ) : bool
GetHashCode ( ) : int
ToString ( ) : string
WithFragment ( string fragment, ExistingFragment handledAs = ExistingFragment.Throw ) : HttpUrl

Withes the fragment.

Depending on the existing fragment and the fragment being set, output may differ. Setting a null value will remove the fragment regardless the handledAs setting.

operator ( ) : HttpUrl

Adds two URLs.

One of the operands should be a relative URL.

Protected Methods

Method Description
CreateInstance ( IEnumerable segments, bool requiresParameters = false ) : IpUrl

Private Methods

Method Description
HttpUrl ( bool isAbsolute, string url, string scheme, string host, ushort port, string path, ParametersCollection query, string fragment ) : System
ToAbsoluteString ( string scheme, string host, ushort port, string path = null, ParametersCollection query = null, string fragment = null ) : string
ToRelativeString ( string path, ParametersCollection query = null, string fragment = null ) : string

Method Details

CreateInstance() protected method

protected CreateInstance ( IEnumerable segments, bool requiresParameters = false ) : IpUrl
segments IEnumerable
requiresParameters bool
return IpUrl

Equals() public method

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

GetHashCode() public method

public GetHashCode ( ) : int
return int

ToString() public method

public ToString ( ) : string
return string

WithFragment() public method

Withes the fragment.
Depending on the existing fragment and the fragment being set, output may differ. Setting a null value will remove the fragment regardless the handledAs setting.
public WithFragment ( string fragment, ExistingFragment handledAs = ExistingFragment.Throw ) : HttpUrl
fragment string The fragment.
handledAs ExistingFragment Instructs on how to behave when an URL has already a fragment.
return HttpUrl

operator() public static method

Adds two URLs.
One of the operands should be a relative URL.
public static operator ( ) : HttpUrl
return HttpUrl