public IAsyncEnumerator <T> GetAsyncEnumerator(CancellationToken cancellationToken) { var en = new SampleEnumerator(_source.GetAsyncEnumerator(cancellationToken), _period, _emitLast, cancellationToken); en.StartTimer(); en.MoveNext(); return(en); }
public IAsyncEnumerator <T> GetAsyncEnumerator() { var en = new SampleEnumerator(_source.GetAsyncEnumerator(), _period, _emitLast); en.StartTimer(); en.MoveNext(); return(en); }
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); }
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; }
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(); }