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