Пример #1
0
        /// <summary> Splits a string containig a measurementUuid and a characteristicUuid in form measurementUuid|characteristicUuid. </summary>
        public static ValueRawDataIdentifier SplitStringUuidPair(string uuidPair)
        {
            uuidPair = uuidPair.Replace("{", String.Empty).Replace("}", String.Empty);

            var index = uuidPair.IndexOf('|');

            Guid measGuid, charGuid;

            if (index == -1 ||
                !Guid.TryParse(uuidPair.Substring(0, index), out measGuid) ||
                !Guid.TryParse(uuidPair.Substring(index + 1), out charGuid))
            {
                throw new InvalidOperationException("RawDataEntity.Value expects two uuids in this format: \"{Measurement Uuid}|{Characteristic Uuid}\".");
            }

            return(ValueRawDataIdentifier.Create(measGuid, charGuid));
        }
		/// <summary> 
		/// Fetches a list of raw data information for the measurement values identified by <paramref name="measurementValueUuids"/>. 
		/// </summary>
		/// <param name="measurementValueUuids">The list of value uuids the raw data information should be fetched for.</param>
		/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
		public Task<RawDataInformation[]> ListRawDataForValues( ValueRawDataIdentifier[] measurementValueUuids, CancellationToken cancellationToken = default( CancellationToken ) )
		{
			return ListRawData( RawDataEntity.Value, measurementValueUuids.Select( StringUuidTools.CreateStringUuidPair ).ToArray(), cancellationToken );
		}
Пример #3
0
 /// <summary> Creates a string containig a measurementUuid and a characteristicUuid in form measurementUuid|characteristicUuid. </summary>
 public static string CreateStringUuidPair( ValueRawDataIdentifier guidPair )
 {
     return string.Concat( guidPair.MeasurementUuid, '|', guidPair.CharacteristicUuid );
 }
Пример #4
0
 /// <summary> Creates a string containig a measurementUuid and a characteristicUuid in form measurementUuid|characteristicUuid. </summary>
 public static string CreateStringUuidPair(ValueRawDataIdentifier guidPair)
 {
     return(string.Concat(guidPair.MeasurementUuid, '|', guidPair.CharacteristicUuid));
 }