Show / Hide Table of Contents

    Class GpxCopyright

    Represents copyright-related information.

    Inheritance
    Object
    GpxCopyright
    Inherited Members
    Object.Equals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    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 Source

    GpxCopyright(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

    author is null.

    | Improve this Doc View Source

    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

    author is null.

    Properties

    | Improve this Doc View Source

    Author

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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 Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    Object.Equals(Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    Object.GetHashCode()
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    | Improve this Doc View Source

    WithAuthor(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 author.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when author is null.

    | Improve this Doc View Source

    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 licenseUri.

    | Improve this Doc View Source

    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 year.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX