public IEnumerable <T> GetChannelData <T>(IChannelHeader channelHeader) where T : IConvertible { if (channelHeader is Channel) { return(GetChannelData <T>((Channel)channelHeader)); } throw new NotSupportedException($"The class {nameof(TDMReader)} does not support the {channelHeader.GetType()} implementation of {nameof(IChannelHeader)}"); }
public IEnumerable <T> GetChannelData <T>(IChannelHeader channelHeader, uint startValueCount, uint valueCount) where T : IConvertible { if (channelHeader is ChannelHeader) { return(GetChannelData <T>((ChannelHeader)channelHeader, startValueCount, valueCount)); } throw new NotSupportedException($"The class {nameof(DATReader)} does not support the {channelHeader.GetType()} implementation of {nameof(IChannelHeader)}"); }
public static void CheckOneChannelDataCommon <T>(IChannelHeader channel, List <T> values) where T : IConvertible { Assert.Equal(channel.ValueCount, (uint)values.Count()); var lastValue = values.First(); foreach (var value in values.Skip(1)) { Assert.Equal(1, (dynamic)value - (dynamic)lastValue); lastValue = value; } }