#if NET20 || NET30 || NET35 || !NET_4_6
using System.Runtime.CompilerServices;
namespace System.Threading.Tasks
{
public partial class Task
{
///
/// Gets an awaiter used to await this .
///
///
/// An awaiter instance.
///
public TaskAwaiter GetAwaiter()
{
return new TaskAwaiter(this);
}
///
/// Creates and configures an awaitable object for awaiting the specified task.
///
/// true to automatic marshal back to the original call site's current SynchronizationContext
/// or TaskScheduler; otherwise, false.
///
/// The instance to be awaited.
///
public ConfiguredTaskAwaitable ConfigureAwait(bool continueOnCapturedContext)
{
return new ConfiguredTaskAwaitable(this, continueOnCapturedContext);
}
}
public partial class Task
{
///
/// Gets an awaiter used to await this .
///
/// Specifies the type of data returned by the task.
///
/// An awaiter instance.
///
public new TaskAwaiter GetAwaiter()
{
return new TaskAwaiter(this);
}
///
/// Creates and configures an awaitable object for awaiting the specified task.
///
/// true to automatic marshal back to the original call site's current SynchronizationContext
/// or TaskScheduler; otherwise, false.
///
/// The instance to be awaited.
///
public new ConfiguredTaskAwaitable ConfigureAwait(bool continueOnCapturedContext)
{
return new ConfiguredTaskAwaitable(this, continueOnCapturedContext);
}
}
}
#endif