Energy Core Library
Energy.Base.Url Class Reference
Inheritance diagram for Energy.Base.Url:
Energy.Interface.ICopy< Url >

Public Member Functions

override string ToString ()
 Represent URL structure as string More...
 
Url Combine (Url url, bool overwrite)
 Combine with another URL, overwriting all or only empty values. More...
 
Url Combine (Url url)
 Combine with another URL, overwriting empty values. More...
 
Url Copy ()
 Make a copy of object More...
 
- Public Member Functions inherited from Energy.Interface.ICopy< Url >
Copy ()
 Make copy of object More...
 

Static Public Member Functions

static Url Explode (string url)
 Create Url structure object from text More...
 
static implicit operator Url (string url)
 Create object from string representation More...
 
static string SetHost (string url, string host)
 Set host in URL text More...
 
static string SetPort (string url, string port)
 Set port in URL text More...
 
static string SetHostAndPort (string url, string host, string port)
 Set host and port in URL text More...
 
static string Make (string url, string scheme, string host, string port, string path, string query, string fragment, string user, string password, string value)
 Make URL address overriding parts of it. Use null as parameter to ignore or empty value to remove it. More...
 
static Url Combine (Url url1, Url url2, bool overwrite)
 Combine two URLs, overwriting all or only empty values with second one. More...
 
static Url Combine (Url url1, Url url2)
 Combine two URLs, overwriting empty values with second one. More...
 

Public Attributes

string Scheme
 Scheme More...
 
string Host
 Host More...
 
string Port
 Port More...
 
string Path
 Path More...
 
string Query
 Query More...
 
string Fragment
 Fragment More...
 
string User
 User More...
 
string Password
 Password More...
 

Member Function Documentation

◆ Combine() [1/4]

static Url Energy.Base.Url.Combine ( Url  url1,
Url  url2,
bool  overwrite 
)
static

Combine two URLs, overwriting all or only empty values with second one.

Parameters
url1
url2
overwriteWhen overwrite is true, not null parameters from second object will always be overwritten. If not, only null and empty values will be overwritten.
Returns

◆ Combine() [2/4]

static Url Energy.Base.Url.Combine ( Url  url1,
Url  url2 
)
static

Combine two URLs, overwriting empty values with second one.

Parameters
url1
url2
Returns

◆ Combine() [3/4]

Url Energy.Base.Url.Combine ( Url  url,
bool  overwrite 
)

Combine with another URL, overwriting all or only empty values.

Parameters
url
overwriteWhen overwrite is true, not null parameters from second object will always be overwritten. If not, only null and empty values will be overwritten.
Returns

◆ Combine() [4/4]

Url Energy.Base.Url.Combine ( Url  url)

Combine with another URL, overwriting empty values.

Parameters
url
Returns

◆ Copy()

Url Energy.Base.Url.Copy ( )

Make a copy of object

Returns

◆ Explode()

static Url Energy.Base.Url.Explode ( string  url)
static

Create Url structure object from text

Parameters
url
Returns

◆ Make()

static string Energy.Base.Url.Make ( string  url,
string  scheme,
string  host,
string  port,
string  path,
string  query,
string  fragment,
string  user,
string  password,
string  value 
)
static

Make URL address overriding parts of it. Use null as parameter to ignore or empty value to remove it.

Parameters
url
scheme
host
port
path
query
fragment
user
password
valueOptionally replace placeholder {0} as value
Returns

◆ operator Url()

static implicit Energy.Base.Url.operator Url ( string  url)
static

Create object from string representation

Parameters
url
Returns

◆ SetHost()

static string Energy.Base.Url.SetHost ( string  url,
string  host 
)
static

Set host in URL text

Parameters
url
host
Returns

◆ SetHostAndPort()

static string Energy.Base.Url.SetHostAndPort ( string  url,
string  host,
string  port 
)
static

Set host and port in URL text

Parameters
url
host
port
Returns

◆ SetPort()

static string Energy.Base.Url.SetPort ( string  url,
string  port 
)
static

Set port in URL text

Parameters
url
port
Returns

◆ ToString()

override string Energy.Base.Url.ToString ( )

Represent URL structure as string

Returns

Member Data Documentation

◆ Fragment

string Energy.Base.Url.Fragment

Fragment

◆ Host

string Energy.Base.Url.Host

Host

◆ Password

string Energy.Base.Url.Password

Password

◆ Path

string Energy.Base.Url.Path

Path

◆ Port

string Energy.Base.Url.Port

Port

◆ Query

string Energy.Base.Url.Query

◆ Scheme

string Energy.Base.Url.Scheme

Scheme

◆ User

string Energy.Base.Url.User

User


The documentation for this class was generated from the following file: