Class GpxWebLink
A link to an external resource (Web page, digital photo, video clip, etc) with additional information.
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.IO.GPX.dll
Syntax
public sealed class GpxWebLink : ICanWriteToXmlWriter
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the simple type "linkType".
Constructors
| Improve this Doc View SourceGpxWebLink(String, String, String)
Initializes a new instance of the GpxWebLink class.
If hrefString
is never longer than 65519 characters, then favor using
GpxWebLink(Uri, String, String) instead of this, since Href
will never be null when using that constructor.
Declaration
public GpxWebLink(string hrefString, string text, string contentType)
Parameters
Type | Name | Description |
---|---|---|
String | hrefString | The value of HrefString. |
String | text | The value of Text. |
String | contentType | The value of ContentType. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
ArgumentException |
|
GpxWebLink(Uri)
Initializes a new instance of the GpxWebLink class.
Declaration
public GpxWebLink(Uri href)
Parameters
Type | Name | Description |
---|---|---|
Uri | href | The value of Href. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
GpxWebLink(Uri, String, String)
Initializes a new instance of the GpxWebLink class.
Declaration
public GpxWebLink(Uri href, string text, string contentType)
Parameters
Type | Name | Description |
---|---|---|
Uri | href | The value of Href. |
String | text | The value of Text. |
String | contentType | The value of ContentType. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Properties
| Improve this Doc View SourceContentType
Gets the MIME type of content (e.g., image/jpeg).
Declaration
public string ContentType { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "type" element.
Href
Gets the URL of the hyperlink, or null if this instance was created from a valid-looking data URI whose total length exceeded 65519 characters.
Declaration
public Uri Href { get; }
Property Value
Type | Description |
---|---|
Uri |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "href" attribute.
HrefString
Gets the URL of the hyperlink, as a string.
Declaration
public string HrefString { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "href" attribute.
Text
Gets the text of the hyperlink.
Declaration
public string Text { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "text" element.
Methods
| Improve this Doc View SourceEquals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceWithContentType(String)
Builds a new instance of GpxWebLink as a copy of this instance, but with ContentType replaced by the given value.
Declaration
public GpxWebLink WithContentType(string contentType)
Parameters
Type | Name | Description |
---|---|---|
String | contentType | The new value for ContentType. |
Returns
Type | Description |
---|---|
GpxWebLink | A new GpxWebLink instance that's a copy of the current instance, but
with its ContentType value set to |
WithHref(Uri)
Builds a new instance of GpxWebLink as a copy of this instance, but with Href and HrefString replaced by the given value.
Declaration
public GpxWebLink WithHref(Uri href)
Parameters
Type | Name | Description |
---|---|---|
Uri | href | The new value for Href and HrefString. |
Returns
Type | Description |
---|---|
GpxWebLink | A new GpxWebLink instance that's a copy of the current instance, but
with its Href value set to |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
WithHrefString(String)
Builds a new instance of GpxWebLink as a copy of this instance, but with HrefString and Href replaced according to the given value.
Declaration
public GpxWebLink WithHrefString(string hrefString)
Parameters
Type | Name | Description |
---|---|---|
String | hrefString | The new value for HrefString and (if possible) Href. |
Returns
Type | Description |
---|---|
GpxWebLink | A new GpxWebLink instance that's a copy of the current instance, but
with its HrefString value set to |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
ArgumentException |
|
WithText(String)
Builds a new instance of GpxWebLink as a copy of this instance, but with Text replaced by the given value.
Declaration
public GpxWebLink WithText(string text)
Parameters
Type | Name | Description |
---|---|---|
String | text | The new value for Text. |
Returns
Type | Description |
---|---|
GpxWebLink | A new GpxWebLink instance that's a copy of the current instance, but
with its Text value set to |