Пример #1
0
        public IAsyncEnumerator <T> GetAsyncEnumerator(CancellationToken cancellationToken)
        {
            var en = new SampleEnumerator(_source.GetAsyncEnumerator(cancellationToken), _period, _emitLast, cancellationToken);

            en.StartTimer();
            en.MoveNext();
            return(en);
        }
Пример #2
0
        public IAsyncEnumerator <T> GetAsyncEnumerator()
        {
            var en = new SampleEnumerator(_source.GetAsyncEnumerator(), _period, _emitLast);

            en.StartTimer();
            en.MoveNext();
            return(en);
        }
Пример #3
0
        public IAsyncEnumerator <T> GetAsyncEnumerator(CancellationToken cancellationToken)
        {
            var sourceCTS = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
            var en        = new SampleEnumerator(_source.GetAsyncEnumerator(sourceCTS.Token), _period, _emitLast, sourceCTS);

            en.StartTimer();
            en.MoveNext();
            return(en);
        }
Пример #4
0
        public ReadAllJob(Scene scene, SdfPath[] paths)
        {
            m_ready   = new AutoResetEvent(false);
            m_scene   = scene;
            m_results = new T[paths.Length];
            m_done    = new object[paths.Length];
            m_current = new SampleEnumerator <T> .SampleHolder();

            m_paths = paths;
        }
Пример #5
0
        static void Main(string[] args)
        {
            var masteringSelect  = new MasteringSelect();
            var enumeratorSample = new SampleEnumerator();
            var query            = new SampleQuerySyntax();

            masteringSelect.Run();
            enumeratorSample.Run();
            query.Run();

            Console.WriteLine("All code has finished running");

            Console.ReadKey();
        }