# NewGamePhysics.Utilities.SerializableUri Class Reference

Implements a replacement for System.Uri which can be serialized. More...

List of all members.

## Public Member Functions
| SerializableUri ()
| Default constructor.
| SerializableUri (Uri uri)
| Constructor with uri parameter.
| SerializableUri (string uri)
| Constructor with string parameter.
override string | ToString ()
| Convert a serializable Uri instance to a string.
## Static Public Member Functions
static implicit | operator Uri (SerializableUri uri)
| Convert between serializable and system form.
static implicit | operator SerializableUri (Uri uri)
| Convert between system and serializable form.
## Properties
Uri | Uri`[get, set]`
| Gets or sets the Uri instance.

## Detailed Description

Implements a replacement for System.Uri which can be serialized.

Definition at line 12 of file SerializableUri.cs.

## Constructor & Destructor Documentation

NewGamePhysics.Utilities.SerializableUri.SerializableUri | ( |  | ) |

Default constructor.

Definition at line 37 of file SerializableUri.cs.

    00038         {
    00039         }

NewGamePhysics.Utilities.SerializableUri.SerializableUri | ( | Uri | uri | ) |

Constructor with uri parameter.

Parameters:

  | uri | The uri to represent.

Definition at line 45 of file SerializableUri.cs.

    00046         {
    00047             if (uri == null)
    00048             {
    00049                 throw new ArgumentNullException("uri", "Uri cannot be null.");
    00050             }
    00051
    00052             this._uri = uri;
    00053         }

NewGamePhysics.Utilities.SerializableUri.SerializableUri | ( | string | uri | ) |

Constructor with string parameter.

Parameters:

  | uri | The uri to create.

Definition at line 59 of file SerializableUri.cs.

    00060         {
    00061             if (String.IsNullOrEmpty(uri))
    00062             {
    00063                 throw new ArgumentNullException("uri", "Uri cannot be null.");
    00064             }
    00065
    00066             this._uri = new Uri(uri);
    00067         }

## Member Function Documentation

static implicit NewGamePhysics.Utilities.SerializableUri.operator SerializableUri | ( | Uri | uri | ) | `[static]`

Convert between system and serializable form.

Parameters:

  | uri | The system Uri

Returns:
  The serializable Uri

Definition at line 84 of file SerializableUri.cs.

    00085         {
    00086             return new SerializableUri(uri);
    00087         }

static implicit NewGamePhysics.Utilities.SerializableUri.operator Uri | ( | SerializableUri | uri | ) | `[static]`

Convert between serializable and system form.

Parameters:

  | uri | The serializable uri.

Returns:
  The system Uri

Definition at line 74 of file SerializableUri.cs.

    00075         {
    00076             return uri.Uri;
    00077         }

override string NewGamePhysics.Utilities.SerializableUri.ToString | ( |  | ) |

Convert a serializable Uri instance to a string.

Returns:
  The absolute Uri or null.

Definition at line 131 of file SerializableUri.cs.

    00132         {
    00133             return (this._uri != null) ? this._uri.AbsoluteUri : null;
    00134         }

## Property Documentation

Uri NewGamePhysics.Utilities.SerializableUri.Uri`[get, set]`

Gets or sets the Uri instance.

Definition at line 23 of file SerializableUri.cs.

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

- C:/Users/Andreas Schiffler/Desktop/SVN/NewGamePhysics/NewGamePhysics/Utilities/SerializableUri.cs