81 references to Factory
BasicWebSite (1)
Controllers\AsyncActionsController.cs (1)
202Task.Factory.StartNew(() =>
Microsoft.AspNetCore.Components.WebView.Photino (1)
PhotinoWebViewManager.cs (1)
35Task.Factory.StartNew(message =>
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\KeyRingProvider.cs (1)
366existingTask = Task.Factory.StartNew(
Microsoft.AspNetCore.Mvc.Core.Test (2)
Infrastructure\ControllerActionInvokerTest.cs (2)
1899return Task.Factory.StartNew(async () => await Task.Factory.StartNew(() => i));
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
88_ = Task.Factory.StartNew(RunGarbageCollectionLoopAsync, default, TaskCreationOptions.LongRunning, TaskScheduler.Current);
Microsoft.AspNetCore.SpaServices.Extensions (1)
Util\EventedStreamReader.cs (1)
30Task.Factory.StartNew(Run, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Microsoft.AspNetCore.TestHost (1)
HttpContextBuilder.cs (1)
157_ = Task.Factory.StartNew(RunRequestAsync, default, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Microsoft.AspNetCore.WebSockets.Tests (1)
BufferStream.cs (1)
288Task.Factory.StartNew(() => _readWaitingForData.TrySetResult());
Microsoft.Build (4)
BackEnd\BuildManager\BuildManager.cs (1)
1420Task.Factory.StartNew(
BackEnd\Components\RequestBuilder\RequestBuilder.cs (3)
652_requestTask = Task.Factory.StartNew( 689_requestTask = Task.Factory.StartNew( 701_requestTask = Task.Factory.StartNew(
Microsoft.Build.Engine.OM.UnitTests (1)
Definition\Project_Tests.cs (1)
351tasks[i] = Task.Factory.StartNew(delegate () { new Project(); }); // Should not throw
Microsoft.Extensions.Caching.Memory (3)
CacheEntry.CacheEntryTokens.cs (1)
109Task.Factory.StartNew(state => InvokeCallbacks((CacheEntry)state!), cacheEntry,
CacheEntry.cs (1)
279Task.Factory.StartNew(state =>
MemoryCache.cs (1)
356Task.Factory.StartNew(state => ((MemoryCache)state!).ScanForExpiredItems(), this,
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\StackGuard.cs (1)
68Task<R> task = Task.Factory.StartNew((Func<object?, R>)action, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFilesWatcher.cs (1)
459Task.Factory.StartNew(
System.ComponentModel.EventBasedAsync (1)
System\ComponentModel\BackgroundWorker.cs (1)
128Task.Factory.StartNew(
System.IO.Pipes (1)
System\IO\Pipes\NamedPipeClientStream.cs (1)
194return Task.Factory.StartNew(static state =>
System.Linq.Expressions (1)
System\Linq\Expressions\StackGuard.cs (1)
68Task<R> task = Task.Factory.StartNew(action!, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System.Linq.Parallel (1)
System\Linq\Parallel\Scheduling\QueryTask.cs (1)
84return Task.Factory.StartNew(s_baseWorkDelegate, this, CancellationToken.None, TaskCreationOptions.AttachedToParent | TaskCreationOptions.PreferFairness, taskScheduler);
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
965Task.Factory.StartNew(static s => ((List<HttpConnectionBase>)s!).ForEach(c => c.Dispose()), toDispose,
System.Net.HttpListener (3)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
368Task.Factory.StartNew(
System\Net\HttpListener.cs (1)
292return Task.Factory.FromAsync(
System\Net\HttpListenerRequest.cs (1)
256return Task.Factory.FromAsync(
System.Net.Mail (1)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
368Task.Factory.StartNew(
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\UnixIPGlobalProperties.cs (1)
56return Task.Factory.StartNew(s => ((UnixIPGlobalProperties)s!).GetUnicastAddresses(), this,
System.Net.Requests (5)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
368Task.Factory.StartNew(
System\Net\FileWebRequest.cs (4)
158Task<Stream> t = Task.Factory.StartNew<Stream>(s => ((FileWebRequest)s!).CreateWriteStream(), 166return Task.Factory.StartNew<Stream>(s => 219Task<WebResponse> t = Task.Factory.StartNew(s => ((FileWebRequest)s!).CreateResponse(), 227return Task.Factory.StartNew(s =>
System.Private.CoreLib (18)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (1)
139m_dispatchTask = Task.Factory.StartNew(() => DispatchEventsToEventListeners(sessionID, syncTimeUtc, syncTimeQPC, timeQPCFrequency, previousDispatchTask, m_dispatchTaskCancellationSource.Token), CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default);
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (1)
192Task.Factory.StartNew(
src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (9)
539Task.Factory.StartNew(static state => 546Task.Factory.StartNew(static state => 585Task.Factory.StartNew(static state => 595Task.Factory.StartNew(static state => 602Task.Factory.StartNew(static state => 609Task.Factory.StartNew(static state => 649Task.Factory.StartNew(static state => 659Task.Factory.StartNew(static state => 672return Task.Factory.StartNew(static state => ((TextWriter)state!).Flush(), this,
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\YieldAwaitable.cs (2)
110Task.Factory.StartNew(continuation, default, TaskCreationOptions.PreferFairness, scheduler); 143Task.Factory.StartNew(static s => ((IAsyncStateMachineBox)s!).MoveNext(), box, default, TaskCreationOptions.PreferFairness, scheduler);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
339return Task.Factory.StartNew(s =>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
311Task.Factory.StartNew(continuation, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, scheduler);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (2)
72/// using the Task type's <see cref="Factory"/> property to retrieve a <see 1459/// The factory returned from <see cref="Factory"/> is a default instance
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (1)
31/// <see cref="Task.Factory">Task.Factory</see> property.
System.Threading.Channels (2)
System\Threading\Channels\AsyncOperation.cs (2)
292Task.Factory.StartNew(continuation, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, ts); 418Task.Factory.StartNew(static s => ((AsyncOperation<TResult>)s!).SetCompletionAndInvokeContinuation(), this,
System.Threading.Tasks.Dataflow (25)
Base\DataflowBlock.cs (7)
535System.Threading.Tasks.Task.Factory.StartNew( 549System.Threading.Tasks.Task.Factory.StartNew( 1323System.Threading.Tasks.Task.Factory.StartNew(static state => 1334System.Threading.Tasks.Task.Factory.StartNew(static state => 1355System.Threading.Tasks.Task.Factory.StartNew(state => 1968task = Task.Factory.StartNew(ChooseTarget<T>.s_processBranchFunction, 2019Task.Factory.ContinueWhenAll(branchTasks, tasks =>
Blocks\BatchBlock.cs (2)
525Task.Factory.StartNew(thisTargetCore => 657Task.Factory.StartNew(exc => Complete(exception: (Exception)exc!, dropPendingMessages: true, releaseReservedMessages: true, revertProcessingState: true),
Blocks\BroadcastBlock.cs (5)
276Task.Factory.StartNew(exc => CompleteCore(exception: (Exception)exc!, storeExceptionEvenIfAlreadyCompleting: true, revertProcessingState: true), 388Task.Factory.StartNew(static state => 646Task.Factory.StartNew(static state => 860Task.Factory.StartNew(static state => 952Task.Factory.StartNew(static thisSourceCore => ((BroadcastingSourceCore<TOutput>)thisSourceCore!).CompleteBlockOncePossible(),
Blocks\BufferBlock.cs (2)
277Task.Factory.StartNew(exc => CompleteCore(exception: (Exception)exc!, storeExceptionEvenIfAlreadyCompleting: true, revertProcessingState: true), 391Task.Factory.StartNew(static state =>
Blocks\JoinBlock.cs (3)
86Task.Factory.ContinueWhenAll( 311Task.Factory.ContinueWhenAll( 1346Task.Factory.StartNew(static state =>
Blocks\WriteOnceBlock.cs (1)
140Task.Factory.StartNew(static state =>
Internal\SourceCore.cs (3)
519Task.Factory.StartNew(static state => 782Task.Factory.StartNew(static state => 925Task.Factory.StartNew(static state => ((SourceCore<TOutput>)state!).CompleteBlockOncePossible(),
Internal\TargetCore.cs (2)
388Task.Factory.StartNew(exc => Complete(exception: (Exception)exc!, dropPendingMessages: true, storeExceptionEvenIfAlreadyCompleting: true, 745Task.Factory.StartNew(static state => ((TargetCore<TInput>)state!).CompleteBlockOncePossible(),
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\Parallel.cs (1)
340tasks[i] = Task.Factory.StartNew(actionsCopy[i], parallelOptions.CancellationToken, TaskCreationOptions.None,
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
605Task.Factory.StartNew(_taskBody!, this, default(CancellationToken), TaskCreationOptions.DenyChildAttach, _scheduler);