public IList <T> GetValues <T>(ITime[] times) { if (typeof(T) != typeof(double)) { throw new NotSupportedException("Only doubles supported"); } if (buffer == null) { buffer = new SmartBuffer(); } IList <T> valuesList = new List <T>(); foreach (ITime time in times) { for (int timeIndex = 0; timeIndex < TimeSet.Times.Count; timeIndex++) { if (TimeSet.Times[timeIndex].Equals(time)) { double[] valuesAtTime = buffer.GetValuesAt(timeIndex); for (int elementIndex = 0; elementIndex < ElementSet.ElementCount; elementIndex++) { valuesList.Add((T)(object)valuesAtTime[ComputeIndex(timeIndex, elementIndex)]); } break; } } } return(valuesList); }