Dieser Artikel wurde maschinell übersetzt. Wenn Sie die englische Version des Artikels anzeigen möchten, aktivieren Sie das Kontrollkästchen Englisch. Sie können den englischen Text auch in einem Popupfenster anzeigen, indem Sie den Mauszeiger über den Text bewegen.
|
Übersetzung
Englisch
|
Task<TResult>-Klasse
Veröffentlicht: Oktober 2016
Assembly: mscorlib (in mscorlib.dll)
Name | Beschreibung | |
---|---|---|
![]() | Task<TResult>(Func<TResult>) | |
![]() | Task<TResult>(Func<TResult>, CancellationToken) | |
![]() | Task<TResult>(Func<TResult>, CancellationToken, TaskCreationOptions) | |
![]() | Task<TResult>(Func<TResult>, TaskCreationOptions) | |
![]() | Task<TResult>(Func<Object, TResult>, Object) | |
![]() | Task<TResult>(Func<Object, TResult>, Object, CancellationToken) | |
![]() | Task<TResult>(Func<Object, TResult>, Object, CancellationToken, TaskCreationOptions) | |
![]() | Task<TResult>(Func<Object, TResult>, Object, TaskCreationOptions) |
Name | Beschreibung | |
---|---|---|
![]() | AsyncState | |
![]() | CreationOptions | |
![]() | Exception | |
![]() ![]() | Factory | |
![]() | Id | |
![]() | IsCanceled | |
![]() | IsCompleted | |
![]() | IsFaulted | |
![]() | Result | |
![]() | Status |
Name | Beschreibung | |
---|---|---|
![]() | ConfigureAwait(Boolean) | |
![]() | ContinueWith(Action<Task, Object>, Object) | |
![]() | ContinueWith(Action<Task, Object>, Object, CancellationToken) | |
![]() | ContinueWith(Action<Task, Object>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler) | |
![]() | ContinueWith(Action<Task, Object>, Object, TaskContinuationOptions) | |
![]() | ContinueWith(Action<Task, Object>, Object, TaskScheduler) | |
![]() | ContinueWith(Action<Task<TResult>, Object>, Object) | |
![]() | ContinueWith(Action<Task<TResult>, Object>, Object, CancellationToken) | |
![]() | ContinueWith(Action<Task<TResult>, Object>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler) | |
![]() | ContinueWith(Action<Task<TResult>, Object>, Object, TaskContinuationOptions) | |
![]() | ContinueWith(Action<Task<TResult>, Object>, Object, TaskScheduler) | |
![]() | ContinueWith(Action<Task<TResult>>) | |
![]() | ContinueWith(Action<Task<TResult>>, CancellationToken) | |
![]() | ContinueWith(Action<Task<TResult>>, CancellationToken, TaskContinuationOptions, TaskScheduler) | |
![]() | ContinueWith(Action<Task<TResult>>, TaskContinuationOptions) | |
![]() | ContinueWith(Action<Task<TResult>>, TaskScheduler) | |
![]() | ContinueWith(Action<Task>) | |
![]() | ContinueWith(Action<Task>, CancellationToken) | |
![]() | ContinueWith(Action<Task>, CancellationToken, TaskContinuationOptions, TaskScheduler) | |
![]() | ContinueWith(Action<Task>, TaskContinuationOptions) | |
![]() | ContinueWith(Action<Task>, TaskScheduler) | |
![]() | ContinueWith<TResult>(Func<Task, TResult>) | |
![]() | ContinueWith<TResult>(Func<Task, TResult>, CancellationToken) | |
![]() | ContinueWith<TResult>(Func<Task, TResult>, CancellationToken, TaskContinuationOptions, TaskScheduler) | |
![]() | ContinueWith<TResult>(Func<Task, TResult>, TaskContinuationOptions) | |
![]() | ContinueWith<TResult>(Func<Task, TResult>, TaskScheduler) | |
![]() | ContinueWith<TResult>(Func<Task, Object, TResult>, Object) | |
![]() | ContinueWith<TResult>(Func<Task, Object, TResult>, Object, CancellationToken) | |
![]() | ContinueWith<TResult>(Func<Task, Object, TResult>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler) | |
![]() | ContinueWith<TResult>(Func<Task, Object, TResult>, Object, TaskContinuationOptions) | |
![]() | ContinueWith<TResult>(Func<Task, Object, TResult>, Object, TaskScheduler) | |
![]() | ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult>) | |
![]() | ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult>, CancellationToken) | |
![]() | ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult>, CancellationToken, TaskContinuationOptions, TaskScheduler) | |
![]() | ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult>, TaskContinuationOptions) | |
![]() | ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult>, TaskScheduler) | |
![]() | ContinueWith<TNewResult>(Func<Task<TResult>, Object, TNewResult>, Object) | |
![]() | ContinueWith<TNewResult>(Func<Task<TResult>, Object, TNewResult>, Object, CancellationToken) | |
![]() | ContinueWith<TNewResult>(Func<Task<TResult>, Object, TNewResult>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler) | |
![]() | ContinueWith<TNewResult>(Func<Task<TResult>, Object, TNewResult>, Object, TaskContinuationOptions) | |
![]() | ContinueWith<TNewResult>(Func<Task<TResult>, Object, TNewResult>, Object, TaskScheduler) | |
![]() | Dispose() | |
![]() | Dispose(Boolean) | |
![]() | Equals(Object) | |
![]() | Finalize() | |
![]() | GetAwaiter() | |
![]() | GetHashCode() | |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | RunSynchronously() | |
![]() | RunSynchronously(TaskScheduler) | |
![]() | Start() | |
![]() | Start(TaskScheduler) | |
![]() | ToString() | |
![]() | Wait() | |
![]() | Wait(CancellationToken) | |
![]() | Wait(Int32) | |
![]() | Wait(Int32, CancellationToken) | |
![]() | Wait(TimeSpan) |
Name | Beschreibung | |
---|---|---|
![]() ![]() | IAsyncResult.AsyncWaitHandle | |
![]() ![]() | IAsyncResult.CompletedSynchronously |
Name | Beschreibung | |
---|---|---|
![]() | DispatcherOperationWait() | Überladen. |
![]() | DispatcherOperationWait(TimeSpan) | Überladen. |
![]() | IsDispatcherOperationTask() |
using System; using System.Threading.Tasks; public class Example { public static void Main() { var t = Task<int>.Run( () => { // Just loop. int max = 1000000; int ctr = 0; for (ctr = 0; ctr <= max; ctr++) { if (ctr == max / 2 && DateTime.Now.Hour <= 12) { ctr++; break; } } return ctr; } ); Console.WriteLine("Finished {0:N0} iterations.", t.Result); } } // The example displays output like the following: // Finished 1,000,001 loop iterations.
using System; using System.Threading.Tasks; public class Example { public static void Main() { var t = Task<int>.Factory.StartNew( () => { // Just loop. int max = 1000000; int ctr = 0; for (ctr = 0; ctr <= max; ctr++) { if (ctr == max / 2 && DateTime.Now.Hour <= 12) { ctr++; break; } } return ctr; } ); Console.WriteLine("Finished {0:N0} iterations.", t.Result); } } // The example displays the following output: // Finished 1000001 loop iterations
Verfügbar seit 8
.NET Framework
Verfügbar seit 4.0
Portierbare Klassenbibliothek
Unterstützt in: portierbare .NET-Plattformen
Silverlight
Verfügbar seit 5.0
Windows Phone Silverlight
Verfügbar seit 8.0
Windows Phone
Verfügbar seit 8.1