Detailed Description

Represents a path to a file with a protocol. e.g. http://www.site.com/aFile.png The path may also be relative to some other path (aFile.png relative to http://www.site.com).

Inheritance diagram for Dom.Location:
PowerUI.URL

Public Member Functions

 Location (string url)
 Creates a new filepath from the given url. More...
 
 Location (string url, Location relativeTo)
 Creates a new filepath from the given url. More...
 
void reload ()
 Reloads the current URL. More...
 
void assign (string url)
 Assign (go to) the given URL. More...
 
void assign (string url, bool addHistory)
 Assign (go to) the given URL. More...
 
void replace (string url)
 Replaces the current URL with the given one. The same as assign in PowerUI. More...
 
override string ToString ()
 Gets the full path as a string. More...
 
FileProtocol GetProtocol ()
 Gets the file protocol for this location. Default is resources://. More...
 

Static Public Member Functions

static void LoadUrlString (string getString, Dictionary< string, string > set)
 Loads a set of parameters from a typical URL formatted string. E.g. hello=1&hi=2. Loads into the given set - it will overwrite any existing values. More...
 
static string ToPunycode (string host)
 Converts a host to punycode. More...
 
static string FromPunycode (string host)
 Converts punycode back to unicode. More...
 

Public Attributes

string RawUrl
 The raw Url/Path More...
 
string Protocol
 The protocol to use when accessing this file. More...
 
string[] Segments
 The pieces of the path split up by /. More...
 
string RelativeTo
 The raw Url that this path is relative to. More...
 
string Hash
 The hash section of the URL, if there is one. Separated here because it should not be sent to the server. More...
 
Document document
 The parent document that this location is used by, if any. More...
 
string Query
 The ?queryString if there is one. More...
 
string authorization
 Auth string alongside the hostname. 'user:pass' More...
 

Properties

bool hasHostname [get]
 True if this path has a hostname. More...
 
string absoluteNoHash [get]
 This path as its resolved absolute form, without the hash (if there is one). More...
 
string absolute [get]
 This path as its resolved absolute form, including the hash. More...
 
string[] authParts [get]
 The authorization string split by colon. More...
 
string username [get, set]
 Username. More...
 
string password [get, set]
 Password. More...
 
string Filename [get]
 Gets the filename without the filetype. More...
 
string File [get, set]
 Gets the full filename with the type included. More...
 
string Filetype [get]
 Gets the type of file this path points to. More...
 
string Directory [get]
 Gets the full directory path this file is in. More...
 
string Path [get]
 Gets the url of this file without the protocol. More...
 
string host [get, set]
 The host name of this path. More...
 
string hostname [get, set]
 The hostname with no port number. More...
 
string port [get, set]
 The port number, if there is one. More...
 
string href [get, set]
 The path, as it was declared. More...
 
string origin [get]
 The hostname combined with the protocol. More...
 
string protocol [get, set]
 This locations protocol, including the trailing colon (":"). More...
 
string hash [get, set]
 The hash section of the URL, if there is one. More...
 
string pathname [get, set]
 Gets everything between host and the search string. More...
 
string file [get]
 The file without a query string. More...
 
Dictionary< string, string > searchParams [get]
 The search parameters in a parsed set. More...
 
string relative [get]
 This location relative to host. More...
 
string search [get, set]
 Gets the query string, if there is one. More...
 
bool web [get]
 Is this a web location? More...
 
static
System.Globalization.IdnMapping 
PunyMapper [get]
 Used to map punycode domains. More...
 
FileProtocol Handler [get]
 The protocol which will handle this URL. More...
 
HtmlDocument htmlDocument [get]
 The HTML document that this path belongs to, if any. More...
 
bool fullAccess [get]
 Does this location have full access to the game? Depends on the protocol. E.g. http does not. More...
 
PowerUI.Http.CookieJar CookieJar [get]
 Gets the cookie jar for this path. More...
 

Private Member Functions

void SetPath (string url, Location relativeTo)
 Applies the given url to this filepath object. More...
 

Static Private Attributes

static string[] Colon =new string[]{":"}
 A colon for splitting. More...
 
static
System.Globalization.IdnMapping 
PunyMapper_
 Used to map punycode domains. More...
 

Constructor & Destructor Documentation

Dom.Location.Location ( string  url)
inline

Creates a new filepath from the given url.

Parameters
urlThe url of the file.
Dom.Location.Location ( string  url,
Location  relativeTo 
)
inline

Creates a new filepath from the given url.

Parameters
urlThe url of the file.
relativeToThe path that url is relative to.

Member Function Documentation

void Dom.Location.assign ( string  url)
inline

Assign (go to) the given URL.

void Dom.Location.assign ( string  url,
bool  addHistory 
)
inline

Assign (go to) the given URL.

static string Dom.Location.FromPunycode ( string  host)
inlinestatic

Converts punycode back to unicode.

FileProtocol Dom.Location.GetProtocol ( )
inline

Gets the file protocol for this location. Default is resources://.

static void Dom.Location.LoadUrlString ( string  getString,
Dictionary< string, string >  set 
)
inlinestatic

Loads a set of parameters from a typical URL formatted string. E.g. hello=1&hi=2. Loads into the given set - it will overwrite any existing values.

void Dom.Location.reload ( )
inline

Reloads the current URL.

void Dom.Location.replace ( string  url)
inline

Replaces the current URL with the given one. The same as assign in PowerUI.

void Dom.Location.SetPath ( string  url,
Location  relativeTo 
)
inlineprivate

Applies the given url to this filepath object.

Parameters
urlThe url of the file.
relativeToThe path that url is relative to, or null if none.
static string Dom.Location.ToPunycode ( string  host)
inlinestatic

Converts a host to punycode.

override string Dom.Location.ToString ( )
inline

Gets the full path as a string.

Member Data Documentation

string Dom.Location.authorization

Auth string alongside the hostname. 'user:pass'

string [] Dom.Location.Colon =new string[]{":"}
staticprivate

A colon for splitting.

Document Dom.Location.document

The parent document that this location is used by, if any.

string Dom.Location.Hash

The hash section of the URL, if there is one. Separated here because it should not be sent to the server.

string Dom.Location.Protocol

The protocol to use when accessing this file.

System.Globalization.IdnMapping Dom.Location.PunyMapper_
staticprivate

Used to map punycode domains.

string Dom.Location.Query

The ?queryString if there is one.

string Dom.Location.RawUrl

The raw Url/Path

string Dom.Location.RelativeTo

The raw Url that this path is relative to.

string [] Dom.Location.Segments

The pieces of the path split up by /.

Property Documentation

string Dom.Location.absolute
get

This path as its resolved absolute form, including the hash.

string Dom.Location.absoluteNoHash
get

This path as its resolved absolute form, without the hash (if there is one).

string [] Dom.Location.authParts
getprivate

The authorization string split by colon.

PowerUI.Http.CookieJar Dom.Location.CookieJar
get

Gets the cookie jar for this path.

string Dom.Location.Directory
get

Gets the full directory path this file is in.

string Dom.Location.File
getset

Gets the full filename with the type included.

string Dom.Location.file
get

The file without a query string.

string Dom.Location.Filename
get

Gets the filename without the filetype.

string Dom.Location.Filetype
get

Gets the type of file this path points to.

bool Dom.Location.fullAccess
get

Does this location have full access to the game? Depends on the protocol. E.g. http does not.

FileProtocol Dom.Location.Handler
get

The protocol which will handle this URL.

string Dom.Location.hash
getset

The hash section of the URL, if there is one.

bool Dom.Location.hasHostname
get

True if this path has a hostname.

string Dom.Location.host
getset

The host name of this path.

string Dom.Location.hostname
getset

The hostname with no port number.

string Dom.Location.href
getset

The path, as it was declared.

HtmlDocument Dom.Location.htmlDocument
get

The HTML document that this path belongs to, if any.

string Dom.Location.origin
get

The hostname combined with the protocol.

string Dom.Location.password
getset

Password.

string Dom.Location.Path
get

Gets the url of this file without the protocol.

string Dom.Location.pathname
getset

Gets everything between host and the search string.

string Dom.Location.port
getset

The port number, if there is one.

string Dom.Location.protocol
getset

This locations protocol, including the trailing colon (":").

System.Globalization.IdnMapping Dom.Location.PunyMapper
staticget

Used to map punycode domains.

string Dom.Location.relative
get

This location relative to host.

string Dom.Location.search
getset

Gets the query string, if there is one.

Dictionary<string,string> Dom.Location.searchParams
get

The search parameters in a parsed set.

string Dom.Location.username
getset

Username.

bool Dom.Location.web
get

Is this a web location?