Project Name File Name Usage Source Code Link
Baby CachedUrlProvider.cs new Task(() => m_slow.EnqueueUrl(url)) Link To Source File
ConcurrentList SaneParallel.cs new Task(() => { while (DateTime.UtcNow - startTime < timeout) { action(); } }) Link To Source File
fubumvc AsyncContinueWithBehaviorTests.cs new Task(() => { var task = new Task(() => expectedOutput); task.RunSynchronously(); MockFor().Expect(x => x.Get>()).Return(task); var innerBehavior = MockFor(); ClassUnderTest.InsideBehavior = innerBehavior; ClassUnderTest.Invoke(); }) Link To Source File
fubumvc AsyncContinueWithBehaviorTests.cs new Task(() => { expectedOutput = new Output(); var task = Task.Factory.StartNew(() => { throw new Exception("Failed!"); }); MockFor().Expect(x => x.Get>()).Return(task); var innerBehavior = MockFor(); ClassUnderTest.InsideBehavior = innerBehavior; typeof (AggregateException).ShouldBeThrownBy(task.Wait); ClassUnderTest.Invoke(); }) Link To Source File
fubumvc AsyncContinueWithBehaviorTests.cs new Task(() => { var task = Task.Factory.StartNew(() => { throw new Exception("Failed!"); }); MockFor().Expect(x => x.Get()).Return(task); typeof (AggregateException).ShouldBeThrownBy(task.Wait); ClassUnderTest.Invoke(); }) Link To Source File
fubumvc AsyncContinueWithBehaviorTests.cs new Task(() => { var task = Task.Factory.StartNew(() => { }); MockFor().Expect(x => x.Get()).Return(task); var innerBehavior = MockFor(); ClassUnderTest.InsideBehavior = innerBehavior; task.Wait(); ClassUnderTest.Invoke(); }) Link To Source File
fubumvc AsyncInterceptExceptionBehaviorTester.cs new Task(() => ClassUnderTest.Invoke()) Link To Source File
fubumvc AsyncInterceptExceptionBehaviorTester.cs new Task(() => ClassUnderTest.Invoke()) Link To Source File
fubumvc AsyncInterceptExceptionBehaviorTester.cs new Task(() => ClassUnderTest.Invoke()) Link To Source File
DJeebusNet SteamController.cs new Task(parser.UpdateSpecials) Link To Source File
DJeebusNet SteamController.cs new Task(parser.UpdateGamesCatalog) Link To Source File
DJeebusNet SteamController.cs new Task(parser.UpdateGamesCatalog) Link To Source File
DJeebusNet SteamController.cs new Task(parser.UpdateSpecials) Link To Source File
PerfTap MonitoringTaskFactory.cs new Task(() => { var reader = new PerfmonCounterReader(); using (var messenger = new UdpMessenger(_metricPublishingConfig.HostName, _metricPublishingConfig.Port)) { foreach (var metricBatch in reader.StreamCounterSamples(_counterPaths, _counterSamplingConfig.SampleInterval, cancellationToken) .SelectMany(set => set.CounterSamples.ToGraphiteString(_metricPublishingConfig.PrefixKey)) .Chunk(10)) { messenger.SendMetrics(metricBatch); } } }, cancellationToken) Link To Source File
PerfTap MonitoringTaskFactory.cs new Task(() => { var reader = new PerfmonCounterReader(); using (var messenger = new UdpMessenger(_metricPublishingConfig.HostName, _metricPublishingConfig.Port)) { foreach (var metricBatch in reader.GetCounterSamples(_counterPaths, _counterSamplingConfig.SampleInterval, maximumSamples, cancellationToken) .SelectMany(set => set.CounterSamples.ToGraphiteString(_metricPublishingConfig.PrefixKey)) .Chunk(10)) { messenger.SendMetrics(metricBatch); } } }, cancellationToken) Link To Source File
Saturnus ShellViewModel.cs new Task( () => { _Generator = new IndexGenerator(); _Generator.CreateIndex(); _Generator.Watch(); } ) Link To Source File
Saturnus ShellViewModel.cs new Task( () => { IEnumerable results = _Generator.Search( SearchCriteria ); Items = new ObservableCollection( results ); this.RaisePropertyChanged( x => x.Items ); this.RaisePropertyChanged( x => x.ItemCount ); } ) Link To Source File
WebBackgrounder WorkItemCleanupJob.cs new Task(() => { var cutoffDate = DateTime.UtcNow.Subtract(SpanToKeepRecords); var oldItems = _context.WorkItems.Where(w => w.Completed != null && w.Completed < cutoffDate); if (oldItems.Any()) { foreach (var workItem in oldItems.ToList()) { _context.WorkItems.Remove(workItem); } _context.SaveChanges(); } }) Link To Source File
RS-TV-Show-Tracker SendFeedbackWindow.xaml.cs new Task(() => { try { API.SendFeedback(type, name, email, message); Utils.Win7Taskbar(state: TaskbarProgressBarState.NoProgress); Dispatcher.Invoke((Action)(() => { progressBar.Visibility = Visibility.Collapsed; new TaskDialog { Icon = TaskDialogStandardIcon.Information, Caption = "Feedback sent", InstructionText = "Feedback sent", Text = "Thank you for your feedback!" + Environment.NewLine + Environment.NewLine + "If you specified an email address I'll answer shortly.", Cancelable = true }.Show(); Close(); })); } catch { } }) Link To Source File
RS-TV-Show-Tracker Update.cs new Task(() => { try { Update(); } catch (Exception ex) { UpdateError.Fire(this, "The update function has quit with an exception.", ex, false, true); } }) Link To Source File
RS-TV-Show-Tracker MainWindow.xaml.cs new Task(() => { var uf = Directory.GetFiles(Signature.FullPath).Where(f => Path.GetFileName(f).StartsWith("update_") && f.EndsWith(".exe")).ToList(); if (uf.Count != 0) { var ver = Path.GetFileNameWithoutExtension(uf[0]).Replace("update_", string.Empty); if (Version.Parse(ver) <= Version.Parse(Signature.Version) || new FileInfo(Path.Combine(Signature.FullPath, uf[0])).Length == 0) { try { File.Delete(Path.Combine(Signature.FullPath, uf[0])); } catch { } } else { Run(() => UpdateDownloaded(ver, true)); return; } } Thread.Sleep(5000); CheckForUpdate(); }) Link To Source File
ORTS SpaceGraphics.cs new Task(() => { using (var gfx = new SpaceWindow(engine)) { gfx.Run(); } }) Link To Source File
SharpEngine SpaceGraphics.cs new Task(() => { using (_window = new GraphicsWindow(Bus, Timer, _gui, _assets)) { _window.Run(); } }) Link To Source File
SharpEngine TestGraphics.cs new Task(() => { using (_window = new GraphicsWindow(Bus, Timer)) { _window.Run(); } }) Link To Source File