Class GpxCopyright
Represents copyright-related information.
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.IO.GPX.dll
Syntax
public sealed class GpxCopyright : ICanWriteToXmlWriter
  Remarks
In the official XSD schema for GPX 1.1, this corresponds to the complex type "copyrightType".
Constructors
| Improve this Doc View SourceGpxCopyright(String)
Initializes a new instance of the GpxCopyright class.
Declaration
public GpxCopyright(string author)
  Parameters
| Type | Name | Description | 
|---|---|---|
| String | author | The value for Author.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | 
  | 
      
GpxCopyright(String, Nullable<Int32>, Uri)
Initializes a new instance of the GpxCopyright class.
Declaration
public GpxCopyright(string author, int? year, Uri licenseUri)
  Parameters
| Type | Name | Description | 
|---|---|---|
| String | author | The value for Author.  | 
      
| Nullable<Int32> | year | The value for Year.  | 
      
| Uri | licenseUri | The value for LicenseUri.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | 
  | 
      
Properties
| Improve this Doc View SourceAuthor
Gets the author who holds the copyright.
Declaration
public string Author { get; }
  Property Value
| Type | Description | 
|---|---|
| String | 
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "author" attribute.
LicenseUri
Gets an optional Uri that identifies the copyright license.
Declaration
public Uri LicenseUri { get; }
  Property Value
| Type | Description | 
|---|---|
| Uri | 
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "license" element.
Year
Gets an optional Gregorian year for the copyright.
Declaration
public int? Year { get; }
  Property Value
| Type | Description | 
|---|---|
| Nullable<Int32> | 
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "year" element.
This value is not completely round-trip safe. In GPX 1.1, its type is "gYear", which would technically support values less than MinValue and greater than MaxValue. Less pedantically, "gYear" also supports an optional offset from UTC. When loading from XML, a time zone specifier (if present) is observed, validated, and then ignored.
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 SourceWithAuthor(String)
Builds a new instance of GpxCopyright as a copy of this instance, but with Author replaced by the given value.
Declaration
public GpxCopyright WithAuthor(string author)
  Parameters
| Type | Name | Description | 
|---|---|---|
| String | author | The new value for Author.  | 
      
Returns
| Type | Description | 
|---|---|
| GpxCopyright | A new GpxCopyright instance that's a copy of the current instance, but
with its Author value set to   | 
      
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | Thrown when   | 
      
WithLicenseUri(Uri)
Builds a new instance of GpxCopyright as a copy of this instance, but with LicenseUri replaced by the given value.
Declaration
public GpxCopyright WithLicenseUri(Uri licenseUri)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Uri | licenseUri | The new value for LicenseUri.  | 
      
Returns
| Type | Description | 
|---|---|
| GpxCopyright | A new GpxCopyright instance that's a copy of the current instance, but
with its LicenseUri value set to   | 
      
WithYear(Nullable<Int32>)
Builds a new instance of GpxCopyright as a copy of this instance, but with Year replaced by the given value.
Declaration
public GpxCopyright WithYear(int? year)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Nullable<Int32> | year | The new value for Year.  | 
      
Returns
| Type | Description | 
|---|---|
| GpxCopyright | A new GpxCopyright instance that's a copy of the current instance, but
with its Year value set to   |