3using System.Threading.Tasks;
15 [CollectionName(
"GeoObjects")]
62 [DefaultValueStringEmpty]
91 public DateTime?
From {
get;
set; }
99 public DateTime?
To {
get;
set; }
108 (this.
ObjectId?.
Equals(Reference.ObjectId) ?? Reference.ObjectId is
null) &&
115 int Result = base.GetHashCode();
116 Result ^= Result << 5 ^ (this.
ObjectId?.GetHashCode() ?? 0);
127 Xml.Append(
"<ref id='");
130 Xml.Append(
"' lat='");
133 Xml.Append(
"' lon='");
138 Xml.Append(
"' alt='");
144 int Ttl = (int)(this.
Expires.Value.Subtract(DateTime.Now).TotalSeconds + 0.5);
147 Xml.Append(
"' ttl='");
148 Xml.Append(Ttl.ToString());
154 Xml.Append(
"' creator='");
155 Xml.Append(
XML.
Encode(
this.Creator.Value));
158 Xml.Append(
"' created='");
163 Xml.Append(
"' updated='");
164 Xml.Append(
XML.
Encode(
this.Updated.Value));
167 if (this.
From.HasValue)
169 Xml.Append(
"' from='");
173 if (this.
To.HasValue)
175 Xml.Append(
"' to='");
185 Xml.Append(
"</ref>");
Helps with parsing of commong data types.
static string Encode(bool x)
Encodes a Boolean for use in XML and other formats.
Helps with common XML-related tasks.
static string Encode(string s)
Encodes a string for use in XML.
Represents a case-insensitive string.
static bool IsNullOrEmpty(CaseInsensitiveString value)
Indicates whether the specified string is null or an CaseInsensitiveString.Empty string.
double? Altitude
Altitude in meters. Can be null.
A base class for geo-spatial objects, implementing the basic members of the IGeoSpatialObject interfa...
A base class for geo-spatial object references, implementing the basic members of the IGeoSpatialObje...
string GeoId
The ID of the geo-spatial object.
GeoPosition Location
Gets the geo-spatial location of the object.
bool EphemeralLocation
If the location of the geo-spatial object is ephemeral.
A persisted or persistable geo-spatial object reference.
PersistedGeoSpatialObjectReference(GeoSpatialObject Object)
A persisted or persistable geo-spatial object reference.
string ContentXml
Optional Content XML.
CaseInsensitiveString Creator
Creator (Bare JID) of item.
DateTime? To
Timestamp indicating to what point in time publication is valid. Can be used to publish an expected e...
void Serialize(StringBuilder Xml)
Serializes a geo-spatial object reference to XML.
DateTime? Expires
When information expires.
PersistedGeoSpatialObjectReference()
A persisted or persistable geo-spatial object reference.
static new async Task< PersistedGeoSpatialObjectReference > Create(IGeoSpatialObject Object)
Create a persisted or persistable geo-spatial object reference from a geo-spatial object.
override int GetHashCode()
override bool Equals(object obj)
DateTime? Updated
When information was last updated (if updated).
DateTime? From
Timestamp indicating from what point in time publication is valid. Can be used to publish a future lo...
DateTime Created
When information was created.
Interface for objects with a geo-spatial location
bool EphemeralLocation
If the location of the geo-spatial object is ephemeral.
Task< GeoPosition > GetLocation()
Gets the geo-spatial location of the object.
string GeoId
The ID of the geo-spatial object.
TypeNameSerialization
How the type name should be serialized.