public void Dispose()
 {
     foreach (var disposable in Streams.OfType <IDisposable>())
     {
         disposable.Dispose();
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 private IEnumerable <T> StreamsOfType <T>() where T : IDAQStream
 {
     return(Streams.OfType <T>());
 }