Project Name File Name Usage Source Code Link
CSC431 Program.cs new Task(() => { var evFile = Directory.GetFiles(myDir, "*.ev").First(); var input = new FileStream(evFile, FileMode.Open, FileAccess.Read); Options.InputSource.Value = input; setOptions(myDir); var outpath = Path.Combine(myDir, outputFileName); var output = new StreamWriter(outpath, false, Encoding.ASCII); string ret; var pipe = CSC431.Options.CreatePipe(output); try { CSC431.Steps.Step.DoAll(pipe); ret = ""; } catch (Exception ex) { ret = string.Format("{0}/n/t{1}/n", evFile.Substring(evFile.LastIndexOf('//') + 1), ex.Message); } finally { output.Close(); } if (!string.IsNullOrEmpty(ret)) File.Delete(outpath); //clean up stuff input.Close(); Options.InputSource.Value = null; CSC431.Program.Stable.Value = null; CSC431.Program.Stypes.Value = null; return ret; }) Link To Source File
coapp Recognizer.cs new Task((rrfState) => { var state = rrfState as RequestRemoteFileState; if (state == null || string.IsNullOrEmpty(state.LocalLocation)) { // didn't fill in the local location? -- this happens when the client can't download. // PackageManagerMessages.Invoke.FileNotRecognized() ? return new RecognitionInfo { FullPath = location.AbsoluteUri, FullUrl = location, IsURL = true, IsInvalid = true, }; } var newLocation = new Uri(state.LocalLocation); if (newLocation.IsFile) { var continuedResult = Recognize(state.LocalLocation).Result; // create the result object var result = new RecognitionInfo { FullUrl = location, }; // if( continuedResult.IsPackageFeed && forceRescan ) { // this ensures that feed files aren't kept around needlessly. //state.LocalLocation.MarkFileTemporary(); //} result.CopyDetailsFrom(continuedResult); result.IsURL = true; return Cache(item, result); } // so, the callback comes, but it's not a file. // return new RecognitionInfo { FullPath = location.AbsoluteUri, IsInvalid = true, }; }, new RequestRemoteFileState { OriginalUrl = location.AbsoluteUri }, TaskCreationOptions.AttachedToParent) Link To Source File
_toolkit_deprecated Recognizer.cs new Task((rrfState) => { var state = rrfState as RequestRemoteFileState; if (state == null || string.IsNullOrEmpty(state.LocalLocation)) { // didn't fill in the local location? -- this happens when the client can't download. // PackageManagerMessages.Invoke.FileNotRecognized() ? return new RecognitionInfo { FullPath = location.AbsoluteUri, FullUrl = location, IsURL = true, IsInvalid = true, }; } var newLocation = new Uri(state.LocalLocation); if (newLocation.IsFile) { var continuedResult = Recognize(state.LocalLocation).Result; // create the result object var result = new RecognitionInfo { FullUrl = location, }; // if( continuedResult.IsPackageFeed && forceRescan ) { // this ensures that feed files aren't kept around needlessly. //state.LocalLocation.MarkFileTemporary(); //} result.CopyDetailsFrom(continuedResult); result.IsURL = true; return Cache(item, result); } // so, the callback comes, but it's not a file. // return new RecognitionInfo { FullPath = location.AbsoluteUri, IsInvalid = true, }; }, new RequestRemoteFileState { OriginalUrl = location.AbsoluteUri }, TaskCreationOptions.AttachedToParent) Link To Source File
fubumvc ActionCallTester.cs new Task(() => new Model2{Name = input.Name}) Link To Source File
fubumvc ActionCallTester.cs new Task(() => new Model2{Name = "ZeroInTaskWithOutputOut"}) Link To Source File
PerfTap MonitoringTaskFactoryTest.cs new Task(() => { using (var listener = new UdpClient(port)) { IPEndPoint groupEndpoint = new IPEndPoint(IPAddress.Any, port); return listener.Receive(ref groupEndpoint); } }) Link To Source File
xbuilder ContentPreviewToolWindowControl.xaml.cs new Task(() => { _contentManager.Unload(); // Tell the ContentBuilder what to build. _contentBuilder.Clear(); _contentBuilder.SetReferences(buildProperties.ProjectReferences); string assetName = fileName; foreach (char c in Path.GetInvalidFileNameChars()) assetName = assetName.Replace(c.ToString(), string.Empty); assetName = Path.GetFileNameWithoutExtension(assetName); _contentBuilder.Add(fileName, assetName, buildProperties.Importer, buildProperties.Processor ?? assetHandler.ProcessorName, buildProperties.ProcessorParameters); // Build this new model data. string buildErrorInternal = _contentBuilder.Build(); if (string.IsNullOrEmpty(buildErrorInternal)) { // If the build succeeded, use the ContentManager to // load the temporary .xnb file that we just created. assetHandler.LoadContent(assetName); graphicsDeviceControl.AssetRenderer = assetHandler.Renderer; } return buildErrorInternal; }) Link To Source File
ILSpy ThreadingSupport.cs new Task>( delegate { List result = new List(); foreach (SharpTreeNode child in fetchChildrenEnumerable) { ct.ThrowIfCancellationRequested(); result.Add(child); App.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action( delegate (SharpTreeNode newChild) { // don't access "child" here the // background thread might already be running the next loop iteration if (loadChildrenTask == thisTask) { node.Children.Insert(node.Children.Count - 1, newChild); } }), child); } return result; }, ct) Link To Source File
lokad-cqrs LocalEventStore.cs new Task(() => { SyncInternal(logger); return unit.it; }) Link To Source File
lokad-cqrs RepopulateView.cs new Task(() => unit.it) Link To Source File
Octopus-Tools OctopusClient.cs new Task( delegate { var request = CreateWebRequest("GET", uri); using (var response = request.GetResponse()) { using (var reader = new StreamReader(response.GetResponseStream())) { var content = reader.ReadToEnd(); return JsonConvert.DeserializeObject(content); } } }) Link To Source File
Octopus-Tools OctopusClient.cs new Task( delegate { var postData = JsonConvert.SerializeObject(resource, Formatting.Indented); var request = CreateWebRequest("POST", uri); request.ContentType = "application/json"; AppendBody(request, postData); using (var response = ReadResponse(request)) { var location = response.Headers.Get("Location"); return Get(location).Execute(); } }) Link To Source File
Octopus-Tools OctopusClient.cs new Task( delegate { var postData = JsonConvert.SerializeObject(resource, Formatting.Indented); var request = CreateWebRequest("POST", uri); request.ContentType = "application/json"; request.Headers["X-HTTP-Method-Override"] = "PUT"; AppendBody(request, postData); using (ReadResponse(request)) { } return Get(uri.AbsolutePath).Execute(); }) Link To Source File
OG-DotNet MarketDataSnapshotManagerTests.cs new Task(enumerator.MoveNext) Link To Source File
Merchant-Editor ItemSelector.xaml.cs new Task(() => tb.Text) Link To Source File