protected DataValue ComputeStartEnd(TimeSlice slice, bool returnEnd)
{
// get the values in the slice.
List<DataValue> values = GetValues(slice);
// check for empty slice.
if (values == null || values.Count == 0)
{
return GetNoDataValue(slice);
}
// return start value.
if (!returnEnd)
{
return values[0];
}
// return end value.
else
{
return values[values.Count - 1];
}
}