public void Dispose() { foreach (var disposable in Streams.OfType <IDisposable>()) { disposable.Dispose(); } }
private HekaDAQStream StreamWithIdentifier(ChannelIdentifier channelIdentifier) { HekaDAQStream result = Streams.OfType <HekaDAQStream>().First(s => s.ChannelNumber == channelIdentifier.ChannelNumber && s.ChannelType == (StreamType)channelIdentifier.ChannelType); if (result == null) { throw new DAQException("Unable to find stream with identifier " + channelIdentifier); } return(result); }
private IEnumerable <T> StreamsOfType <T>() where T : IDAQStream { return(Streams.OfType <T>()); }