Beispiel #1
0
 /// <summary>
 /// Gets the specified property value.
 /// </summary>
 /// <param name="pKey">The key of the requested property.</param>
 public void GetValue(ref PropertyKey pKey, out PROPVARIANT pValue)
 {
     pValue = new PROPVARIANT();
     if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_LATITUDE_DEGREES))
     {
         pValue.SetValue(_latitude);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_LONGITUDE_DEGREES))
     {
         pValue.SetValue(_longitude);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_ERROR_RADIUS_METERS))
     {
         pValue.SetValue(_errorRadius);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_ALTITUDE_ELLIPSOID_METERS))
     {
         pValue.SetValue(_altitude);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_ALTITUDE_ELLIPSOID_ERROR_METERS))
     {
         pValue.SetValue(_altitudeError);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_TIMESTAMP))
     {
         pValue.SetFileTime(_timeStamp);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Gets the specified property value.
 /// </summary>
 /// <param name="pKey">The key identifying requested property.</param>
 public void GetValue(ref PropertyKey pKey, out PROPVARIANT pValue)
 {
     pValue = new PROPVARIANT();
     if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_ADDRESS1))
     {
         pValue.SetValue(_address1);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_ADDRESS2))
     {
         pValue.SetValue(_address2);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_CITY))
     {
         pValue.SetValue(_city);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_STATE_PROVINCE))
     {
         pValue.SetValue(_StateProvince);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_POSTALCODE))
     {
         pValue.SetValue(_PostalCode);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_TIMESTAMP))
     {
         pValue.SetFileTime(_timestamp);
     }
     else if (pKey.Equals(SensorPropertyKeys.SENSOR_DATA_TYPE_COUNTRY_REGION))
     {
         pValue.SetValue(_CountryRegion);
     }
 }