-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
GeoPosition.cs
46 lines (42 loc) · 1.62 KB
/
GeoPosition.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
namespace GeoCoordinatePortable
{
/// <summary>
/// Contains location data of a type specified by the type parameter of the <see cref="GeoPosition{T}"/> class
/// </summary>
/// <typeparam name="T">The type of the location data.</typeparam>
public class GeoPosition<T>
{
/// <summary>
/// Initializes a new instance of the <see cref="GeoPosition{T}"/> class.
/// </summary>
public GeoPosition()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="GeoPosition{T}"/> class
/// with a timestamp and position.
/// </summary>
/// <param name="timestamp">The time the location data was obtained.</param>
/// <param name="location">The location data to use to initialize the <see cref="GeoPosition{T}"/> object.</param>
public GeoPosition(DateTimeOffset timestamp, T location)
{
Timestamp = timestamp;
Location = location;
}
/// <summary>
/// Gets or sets the location data for the <see cref="GeoPosition{T}"/> object.
/// </summary>
/// <value>
/// An object of type T that contains the location data for the <see cref="GeoPosition{T}"/> object.
/// </value>
public T Location { get; set; }
/// <summary>
/// Gets or sets the time when the location data was obtained.
/// </summary>
/// <value>
/// A <see cref="DateTimeOffset"/> that contains the time the location data was created.
/// </value>
public DateTimeOffset Timestamp { get; set; }
}
}