Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
856 lines (783 sloc) 66.6 KB
<Type Name="WindowsRuntimeSystemExtensions" FullName="System.WindowsRuntimeSystemExtensions">
<TypeSignature Language="C#" Value="public static class WindowsRuntimeSystemExtensions" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit WindowsRuntimeSystemExtensions extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.WindowsRuntimeSystemExtensions" />
<TypeSignature Language="VB.NET" Value="Public Module WindowsRuntimeSystemExtensions" />
<TypeSignature Language="C++ CLI" Value="public ref class WindowsRuntimeSystemExtensions abstract sealed" />
<TypeSignature Language="F#" Value="type WindowsRuntimeSystemExtensions = class" />
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.CLSCompliant(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="dotnet-uwp-10.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides extension methods for converting between tasks and Windows Runtime asynchronous actions and operations.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.WindowsRuntimeSystemExtensions.AsTask%2A> extension method overloads enable you to use a .NET <xref:System.Threading.Tasks.Task> object to manage an asynchronous operation from the Windows Runtime.
The <xref:System.WindowsRuntimeSystemExtensions.AsAsyncAction%2A> method and the <xref:System.WindowsRuntimeSystemExtensions.AsAsyncOperation%2A> method enable you to pass started tasks to methods that take Windows Runtime asynchronous actions and operations. See also the methods of the <xref:System.Runtime.InteropServices.WindowsRuntime.AsyncInfo> class.
The <xref:System.WindowsRuntimeSystemExtensions.GetAwaiter%2A> methods are used by compilers to implement the <see langword="await" /> operation (<see langword="Await" /> in Visual Basic).
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="AsAsyncAction">
<MemberSignature Language="C#" Value="public static Windows.Foundation.IAsyncAction AsAsyncAction (this System.Threading.Tasks.Task source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Windows.Foundation.IAsyncAction AsAsyncAction(class System.Threading.Tasks.Task source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsAsyncAction(System.Threading.Tasks.Task)" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function AsAsyncAction (source As Task) As IAsyncAction" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static Windows::Foundation::IAsyncAction ^ AsAsyncAction(System::Threading::Tasks::Task ^ source);" />
<MemberSignature Language="F#" Value="static member AsAsyncAction : System.Threading.Tasks.Task -&gt; Windows.Foundation.IAsyncAction" Usage="System.WindowsRuntimeSystemExtensions.AsAsyncAction source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Windows.Foundation.IAsyncAction</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.Threading.Tasks.Task" RefType="this" />
</Parameters>
<Docs>
<param name="source">The started task.</param>
<summary>Returns a Windows Runtime asynchronous action that represents a started task.</summary>
<returns>A <see cref="T:Windows.Foundation.IAsyncAction" /> instance that represents the started task.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:System.Threading.Tasks.Task>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method when you want to pass a task to a Windows Runtime method that takes an asynchronous action.
The <xref:System.Runtime.InteropServices.WindowsRuntime.AsyncInfo> class provides static methods (`Shared` methods in Visual Basic) that create and start Windows Runtime asynchronous actions that represent tasks that can respond to cancellation requests and report progress.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
<exception cref="T:System.InvalidOperationException">
<paramref name="source" /> is an unstarted task.</exception>
</Docs>
</Member>
<Member MemberName="AsAsyncOperation&lt;TResult&gt;">
<MemberSignature Language="C#" Value="public static Windows.Foundation.IAsyncOperation&lt;TResult&gt; AsAsyncOperation&lt;TResult&gt; (this System.Threading.Tasks.Task&lt;TResult&gt; source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Windows.Foundation.IAsyncOperation`1&lt;!!TResult&gt; AsAsyncOperation&lt;TResult&gt;(class System.Threading.Tasks.Task`1&lt;!!TResult&gt; source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsAsyncOperation``1(System.Threading.Tasks.Task{``0})" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function AsAsyncOperation(Of TResult) (source As Task(Of TResult)) As IAsyncOperation(Of TResult)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TResult&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static Windows::Foundation::IAsyncOperation&lt;TResult&gt; ^ AsAsyncOperation(System::Threading::Tasks::Task&lt;TResult&gt; ^ source);" />
<MemberSignature Language="F#" Value="static member AsAsyncOperation : System.Threading.Tasks.Task&lt;'Result&gt; -&gt; Windows.Foundation.IAsyncOperation&lt;'Result&gt;" Usage="System.WindowsRuntimeSystemExtensions.AsAsyncOperation source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Windows.Foundation.IAsyncOperation&lt;TResult&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TResult" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="System.Threading.Tasks.Task&lt;TResult&gt;" RefType="this" />
</Parameters>
<Docs>
<typeparam name="TResult">The type that returns the result.</typeparam>
<param name="source">The started task.</param>
<summary>Returns a Windows Runtime asynchronous operation that represents a started task that returns a result.</summary>
<returns>A <see cref="T:Windows.Foundation.IAsyncOperation`1" /> instance that represents the started task.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:System.Threading.Tasks.Task>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method when you want to pass a task that returns a result to a Windows Runtime method that takes an asynchronous operation.
The <xref:System.Runtime.InteropServices.WindowsRuntime.AsyncInfo> class provides static methods (`Shared` methods in Visual Basic) that create and start Windows Runtime asynchronous operations that represent tasks that return results and can respond to cancellation requests and report progress.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
<exception cref="T:System.InvalidOperationException">
<paramref name="source" /> is an unstarted task.</exception>
</Docs>
</Member>
<Member MemberName="AsTask">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task AsTask (this Windows.Foundation.IAsyncAction source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task AsTask(class Windows.Foundation.IAsyncAction source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask(Windows.Foundation.IAsyncAction)" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function AsTask (source As IAsyncAction) As Task" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task ^ AsTask(Windows::Foundation::IAsyncAction ^ source);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncAction -&gt; System.Threading.Tasks.Task" Usage="System.WindowsRuntimeSystemExtensions.AsTask source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncAction" RefType="this" />
</Parameters>
<Docs>
<param name="source">The asynchronous action.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous action.</summary>
<returns>A task that represents the asynchronous action.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncAction>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task> objects simplify the coordination of asynchronous operations.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task AsTask (this Windows.Foundation.IAsyncAction source, System.Threading.CancellationToken cancellationToken);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task AsTask(class Windows.Foundation.IAsyncAction source, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask(Windows.Foundation.IAsyncAction,System.Threading.CancellationToken)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task ^ AsTask(Windows::Foundation::IAsyncAction ^ source, System::Threading::CancellationToken cancellationToken);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncAction * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task" Usage="System.WindowsRuntimeSystemExtensions.AsTask (source, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncAction" RefType="this" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="source">The asynchronous action.</param>
<param name="cancellationToken">A token that can be used to request cancellation of the asynchronous action.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous action that can be cancelled.</summary>
<returns>A task that represents the asynchronous action.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncAction>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task> objects simplify the coordination of asynchronous operations.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask&lt;TProgress&gt;">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task AsTask&lt;TProgress&gt; (this Windows.Foundation.IAsyncActionWithProgress&lt;TProgress&gt; source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task AsTask&lt;TProgress&gt;(class Windows.Foundation.IAsyncActionWithProgress`1&lt;!!TProgress&gt; source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask``1(Windows.Foundation.IAsyncActionWithProgress{``0})" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function AsTask(Of TProgress) (source As IAsyncActionWithProgress(Of TProgress)) As Task" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TProgress&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task ^ AsTask(Windows::Foundation::IAsyncActionWithProgress&lt;TProgress&gt; ^ source);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncActionWithProgress&lt;'Progress&gt; -&gt; System.Threading.Tasks.Task" Usage="System.WindowsRuntimeSystemExtensions.AsTask source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TProgress" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncActionWithProgress&lt;TProgress&gt;" RefType="this" />
</Parameters>
<Docs>
<typeparam name="TProgress">The type of object that provides data that indicates progress.</typeparam>
<param name="source">The asynchronous action.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous action.</summary>
<returns>A task that represents the asynchronous action.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncActionWithProgress%601>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task> objects simplify the coordination of asynchronous operations.
Calling this method overload is equivalent to calling the <xref:System.WindowsRuntimeSystemExtensions.AsTask%60%602(Windows.Foundation.IAsyncOperationWithProgress{%60%600,%60%601},System.IProgress{%60%601})> extension method overload and specifying <see langword="null" /> for the <paramref name="progress" /> parameter. This is useful when you don't want to get progress reports from an action that reports progress.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask&lt;TProgress&gt;">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task AsTask&lt;TProgress&gt; (this Windows.Foundation.IAsyncActionWithProgress&lt;TProgress&gt; source, IProgress&lt;TProgress&gt; progress);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task AsTask&lt;TProgress&gt;(class Windows.Foundation.IAsyncActionWithProgress`1&lt;!!TProgress&gt; source, class System.IProgress`1&lt;!!TProgress&gt; progress) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask``1(Windows.Foundation.IAsyncActionWithProgress{``0},System.IProgress{``0})" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function AsTask(Of TProgress) (source As IAsyncActionWithProgress(Of TProgress), progress As IProgress(Of TProgress)) As Task" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TProgress&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task ^ AsTask(Windows::Foundation::IAsyncActionWithProgress&lt;TProgress&gt; ^ source, IProgress&lt;TProgress&gt; ^ progress);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncActionWithProgress&lt;'Progress&gt; * IProgress&lt;'Progress&gt; -&gt; System.Threading.Tasks.Task" Usage="System.WindowsRuntimeSystemExtensions.AsTask (source, progress)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TProgress" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncActionWithProgress&lt;TProgress&gt;" RefType="this" />
<Parameter Name="progress" Type="System.IProgress&lt;TProgress&gt;" />
</Parameters>
<Docs>
<typeparam name="TProgress">The type of object that provides data that indicates progress.</typeparam>
<param name="source">The asynchronous action.</param>
<param name="progress">An object that receives progress updates.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous action that reports progress.</summary>
<returns>A task that represents the asynchronous action.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncActionWithProgress%601>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task> objects simplify the coordination of asynchronous operations.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask&lt;TProgress&gt;">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task AsTask&lt;TProgress&gt; (this Windows.Foundation.IAsyncActionWithProgress&lt;TProgress&gt; source, System.Threading.CancellationToken cancellationToken);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task AsTask&lt;TProgress&gt;(class Windows.Foundation.IAsyncActionWithProgress`1&lt;!!TProgress&gt; source, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask``1(Windows.Foundation.IAsyncActionWithProgress{``0},System.Threading.CancellationToken)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TProgress&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task ^ AsTask(Windows::Foundation::IAsyncActionWithProgress&lt;TProgress&gt; ^ source, System::Threading::CancellationToken cancellationToken);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncActionWithProgress&lt;'Progress&gt; * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task" Usage="System.WindowsRuntimeSystemExtensions.AsTask (source, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TProgress" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncActionWithProgress&lt;TProgress&gt;" RefType="this" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="TProgress">The type of object that provides data that indicates progress.</typeparam>
<param name="source">The asynchronous action.</param>
<param name="cancellationToken">A token that can be used to request cancellation of the asynchronous action.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous action that can be cancelled.</summary>
<returns>A task that represents the asynchronous action.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncActionWithProgress%601>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task> objects simplify the coordination of asynchronous operations.
Calling this method overload is equivalent to calling the <xref:System.WindowsRuntimeSystemExtensions.AsTask%60%602(Windows.Foundation.IAsyncOperationWithProgress{%60%600,%60%601},System.Threading.CancellationToken,System.IProgress{%60%601})> extension method overload and specifying <see langword="null" /> for the <paramref name="progress" /> parameter. This is useful when you don't want to get progress reports from an action that reports progress.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask&lt;TProgress&gt;">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task AsTask&lt;TProgress&gt; (this Windows.Foundation.IAsyncActionWithProgress&lt;TProgress&gt; source, System.Threading.CancellationToken cancellationToken, IProgress&lt;TProgress&gt; progress);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task AsTask&lt;TProgress&gt;(class Windows.Foundation.IAsyncActionWithProgress`1&lt;!!TProgress&gt; source, valuetype System.Threading.CancellationToken cancellationToken, class System.IProgress`1&lt;!!TProgress&gt; progress) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask``1(Windows.Foundation.IAsyncActionWithProgress{``0},System.Threading.CancellationToken,System.IProgress{``0})" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TProgress&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task ^ AsTask(Windows::Foundation::IAsyncActionWithProgress&lt;TProgress&gt; ^ source, System::Threading::CancellationToken cancellationToken, IProgress&lt;TProgress&gt; ^ progress);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncActionWithProgress&lt;'Progress&gt; * System.Threading.CancellationToken * IProgress&lt;'Progress&gt; -&gt; System.Threading.Tasks.Task" Usage="System.WindowsRuntimeSystemExtensions.AsTask (source, cancellationToken, progress)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TProgress" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncActionWithProgress&lt;TProgress&gt;" RefType="this" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
<Parameter Name="progress" Type="System.IProgress&lt;TProgress&gt;" />
</Parameters>
<Docs>
<typeparam name="TProgress">The type of object that provides data that indicates progress.</typeparam>
<param name="source">The asynchronous action.</param>
<param name="cancellationToken">A token that can be used to request cancellation of the asynchronous action.</param>
<param name="progress">An object that receives progress updates.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous action that reports progress and can be cancelled.</summary>
<returns>A task that represents the asynchronous action.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncActionWithProgress%601>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task> objects simplify the coordination of asynchronous operations.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask&lt;TResult&gt;">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task&lt;TResult&gt; AsTask&lt;TResult&gt; (this Windows.Foundation.IAsyncOperation&lt;TResult&gt; source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1&lt;!!TResult&gt; AsTask&lt;TResult&gt;(class Windows.Foundation.IAsyncOperation`1&lt;!!TResult&gt; source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask``1(Windows.Foundation.IAsyncOperation{``0})" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function AsTask(Of TResult) (source As IAsyncOperation(Of TResult)) As Task(Of TResult)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TResult&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task&lt;TResult&gt; ^ AsTask(Windows::Foundation::IAsyncOperation&lt;TResult&gt; ^ source);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncOperation&lt;'Result&gt; -&gt; System.Threading.Tasks.Task&lt;'Result&gt;" Usage="System.WindowsRuntimeSystemExtensions.AsTask source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;TResult&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TResult" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncOperation&lt;TResult&gt;" RefType="this" />
</Parameters>
<Docs>
<typeparam name="TResult">The type of object that returns the result of the asynchronous operation.</typeparam>
<param name="source">The asynchronous operation.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous operation returns a result.</summary>
<returns>A task that represents the asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncActionWithProgress%601>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task%601> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task%601> objects simplify the coordination of asynchronous operations.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask&lt;TResult&gt;">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task&lt;TResult&gt; AsTask&lt;TResult&gt; (this Windows.Foundation.IAsyncOperation&lt;TResult&gt; source, System.Threading.CancellationToken cancellationToken);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1&lt;!!TResult&gt; AsTask&lt;TResult&gt;(class Windows.Foundation.IAsyncOperation`1&lt;!!TResult&gt; source, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask``1(Windows.Foundation.IAsyncOperation{``0},System.Threading.CancellationToken)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TResult&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task&lt;TResult&gt; ^ AsTask(Windows::Foundation::IAsyncOperation&lt;TResult&gt; ^ source, System::Threading::CancellationToken cancellationToken);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncOperation&lt;'Result&gt; * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;'Result&gt;" Usage="System.WindowsRuntimeSystemExtensions.AsTask (source, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;TResult&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TResult" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncOperation&lt;TResult&gt;" RefType="this" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="TResult">The type of object that returns the result of the asynchronous operation.</typeparam>
<param name="source">The asynchronous operation.</param>
<param name="cancellationToken">A token that can be used to request cancellation of the asynchronous operation.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous operation that returns a result and can be cancelled.</summary>
<returns>A task that represents the asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncActionWithProgress%601>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task%601> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task%601> objects simplify the coordination of asynchronous operations.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask&lt;TResult,TProgress&gt;">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task&lt;TResult&gt; AsTask&lt;TResult,TProgress&gt; (this Windows.Foundation.IAsyncOperationWithProgress&lt;TResult,TProgress&gt; source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1&lt;!!TResult&gt; AsTask&lt;TResult, TProgress&gt;(class Windows.Foundation.IAsyncOperationWithProgress`2&lt;!!TResult, !!TProgress&gt; source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask``2(Windows.Foundation.IAsyncOperationWithProgress{``0,``1})" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function AsTask(Of TResult, TProgress) (source As IAsyncOperationWithProgress(Of TResult, TProgress)) As Task(Of TResult)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TResult, typename TProgress&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task&lt;TResult&gt; ^ AsTask(Windows::Foundation::IAsyncOperationWithProgress&lt;TResult, TProgress&gt; ^ source);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncOperationWithProgress&lt;'Result, 'Progress&gt; -&gt; System.Threading.Tasks.Task&lt;'Result&gt;" Usage="System.WindowsRuntimeSystemExtensions.AsTask source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;TResult&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TResult" />
<TypeParameter Name="TProgress" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncOperationWithProgress&lt;TResult,TProgress&gt;" RefType="this" />
</Parameters>
<Docs>
<typeparam name="TResult">The type of object that returns the result of the asynchronous operation.</typeparam>
<typeparam name="TProgress">The type of object that provides data that indicates progress.</typeparam>
<param name="source">The asynchronous operation.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous operation returns a result.</summary>
<returns>A task that represents the asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncOperationWithProgress%602>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task%601> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task%601> objects simplify the coordination of asynchronous operations.
Calling this method overload is equivalent to calling the <xref:System.WindowsRuntimeSystemExtensions.AsTask%60%602(Windows.Foundation.IAsyncOperationWithProgress{%60%600,%60%601},System.IProgress{%60%601})> extension method overload and specifying <see langword="null" /> for the <paramref name="progress" /> parameter. This is useful when you don't want to get progress reports from an action that reports progress.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask&lt;TResult,TProgress&gt;">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task&lt;TResult&gt; AsTask&lt;TResult,TProgress&gt; (this Windows.Foundation.IAsyncOperationWithProgress&lt;TResult,TProgress&gt; source, IProgress&lt;TProgress&gt; progress);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1&lt;!!TResult&gt; AsTask&lt;TResult, TProgress&gt;(class Windows.Foundation.IAsyncOperationWithProgress`2&lt;!!TResult, !!TProgress&gt; source, class System.IProgress`1&lt;!!TProgress&gt; progress) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask``2(Windows.Foundation.IAsyncOperationWithProgress{``0,``1},System.IProgress{``1})" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function AsTask(Of TResult, TProgress) (source As IAsyncOperationWithProgress(Of TResult, TProgress), progress As IProgress(Of TProgress)) As Task(Of TResult)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TResult, typename TProgress&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task&lt;TResult&gt; ^ AsTask(Windows::Foundation::IAsyncOperationWithProgress&lt;TResult, TProgress&gt; ^ source, IProgress&lt;TProgress&gt; ^ progress);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncOperationWithProgress&lt;'Result, 'Progress&gt; * IProgress&lt;'Progress&gt; -&gt; System.Threading.Tasks.Task&lt;'Result&gt;" Usage="System.WindowsRuntimeSystemExtensions.AsTask (source, progress)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;TResult&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TResult" />
<TypeParameter Name="TProgress" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncOperationWithProgress&lt;TResult,TProgress&gt;" RefType="this" />
<Parameter Name="progress" Type="System.IProgress&lt;TProgress&gt;" />
</Parameters>
<Docs>
<typeparam name="TResult">The type of object that returns the result of the asynchronous operation.</typeparam>
<typeparam name="TProgress">The type of object that provides data that indicates progress.</typeparam>
<param name="source">The asynchronous operation.</param>
<param name="progress">An object that receives progress updates.</param>
<summary>Returns a task that represents Windows Runtime asynchronous operation that returns a result and reports progress.</summary>
<returns>A task that represents the asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncOperationWithProgress%602>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task%601> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task%601> objects simplify the coordination of asynchronous operations.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask&lt;TResult,TProgress&gt;">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task&lt;TResult&gt; AsTask&lt;TResult,TProgress&gt; (this Windows.Foundation.IAsyncOperationWithProgress&lt;TResult,TProgress&gt; source, System.Threading.CancellationToken cancellationToken);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1&lt;!!TResult&gt; AsTask&lt;TResult, TProgress&gt;(class Windows.Foundation.IAsyncOperationWithProgress`2&lt;!!TResult, !!TProgress&gt; source, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask``2(Windows.Foundation.IAsyncOperationWithProgress{``0,``1},System.Threading.CancellationToken)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TResult, typename TProgress&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task&lt;TResult&gt; ^ AsTask(Windows::Foundation::IAsyncOperationWithProgress&lt;TResult, TProgress&gt; ^ source, System::Threading::CancellationToken cancellationToken);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncOperationWithProgress&lt;'Result, 'Progress&gt; * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;'Result&gt;" Usage="System.WindowsRuntimeSystemExtensions.AsTask (source, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;TResult&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TResult" />
<TypeParameter Name="TProgress" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncOperationWithProgress&lt;TResult,TProgress&gt;" RefType="this" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="TResult">The type of object that returns the result of the asynchronous operation.</typeparam>
<typeparam name="TProgress">The type of object that provides data that indicates progress.</typeparam>
<param name="source">The asynchronous operation.</param>
<param name="cancellationToken">A token that can be used to request cancellation of the asynchronous operation.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous operation that returns a result and can be cancelled.</summary>
<returns>A task that represents the asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncOperationWithProgress%602>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task%601> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task%601> objects simplify the coordination of asynchronous operations.
Calling this method overload is equivalent to calling the <xref:System.WindowsRuntimeSystemExtensions.AsTask%60%602(Windows.Foundation.IAsyncOperationWithProgress{%60%600,%60%601},System.Threading.CancellationToken,System.IProgress{%60%601})> extension method overload and specifying <see langword="null" /> for the <paramref name="progress" /> parameter. This is useful when you don't want to get progress reports from an action that reports progress.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="source" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsTask&lt;TResult,TProgress&gt;">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task&lt;TResult&gt; AsTask&lt;TResult,TProgress&gt; (this Windows.Foundation.IAsyncOperationWithProgress&lt;TResult,TProgress&gt; source, System.Threading.CancellationToken cancellationToken, IProgress&lt;TProgress&gt; progress);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1&lt;!!TResult&gt; AsTask&lt;TResult, TProgress&gt;(class Windows.Foundation.IAsyncOperationWithProgress`2&lt;!!TResult, !!TProgress&gt; source, valuetype System.Threading.CancellationToken cancellationToken, class System.IProgress`1&lt;!!TProgress&gt; progress) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.AsTask``2(Windows.Foundation.IAsyncOperationWithProgress{``0,``1},System.Threading.CancellationToken,System.IProgress{``1})" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TResult, typename TProgress&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Threading::Tasks::Task&lt;TResult&gt; ^ AsTask(Windows::Foundation::IAsyncOperationWithProgress&lt;TResult, TProgress&gt; ^ source, System::Threading::CancellationToken cancellationToken, IProgress&lt;TProgress&gt; ^ progress);" />
<MemberSignature Language="F#" Value="static member AsTask : Windows.Foundation.IAsyncOperationWithProgress&lt;'Result, 'Progress&gt; * System.Threading.CancellationToken * IProgress&lt;'Progress&gt; -&gt; System.Threading.Tasks.Task&lt;'Result&gt;" Usage="System.WindowsRuntimeSystemExtensions.AsTask (source, cancellationToken, progress)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;TResult&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TResult" />
<TypeParameter Name="TProgress" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncOperationWithProgress&lt;TResult,TProgress&gt;" RefType="this" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
<Parameter Name="progress" Type="System.IProgress&lt;TProgress&gt;" />
</Parameters>
<Docs>
<typeparam name="TResult">The type of object that returns the result of the asynchronous operation.</typeparam>
<typeparam name="TProgress">The type of object that provides data that indicates progress.</typeparam>
<param name="source">The asynchronous operation.</param>
<param name="cancellationToken">A token that can be used to request cancellation of the asynchronous operation.</param>
<param name="progress">An object that receives progress updates.</param>
<summary>Returns a task that represents a Windows Runtime asynchronous operation that returns a result, reports progress, and can be cancelled.</summary>
<returns>A task that represents the asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncOperationWithProgress%602>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
Use this method to get a <xref:System.Threading.Tasks.Task%601> object for a Windows Runtime asynchronous operation. <xref:System.Threading.Tasks.Task%601> objects simplify the coordination of asynchronous operations.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetAwaiter">
<MemberSignature Language="C#" Value="public static System.Runtime.CompilerServices.TaskAwaiter GetAwaiter (this Windows.Foundation.IAsyncAction source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Runtime.CompilerServices.TaskAwaiter GetAwaiter(class Windows.Foundation.IAsyncAction source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.GetAwaiter(Windows.Foundation.IAsyncAction)" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function GetAwaiter (source As IAsyncAction) As TaskAwaiter" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Runtime::CompilerServices::TaskAwaiter GetAwaiter(Windows::Foundation::IAsyncAction ^ source);" />
<MemberSignature Language="F#" Value="static member GetAwaiter : Windows.Foundation.IAsyncAction -&gt; System.Runtime.CompilerServices.TaskAwaiter" Usage="System.WindowsRuntimeSystemExtensions.GetAwaiter source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Runtime.CompilerServices.TaskAwaiter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncAction" RefType="this" />
</Parameters>
<Docs>
<param name="source">The asynchronous action to await.</param>
<summary>This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.</summary>
<returns>An object that awaits the specified asynchronous action.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type IAsyncAction. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetAwaiter&lt;TProgress&gt;">
<MemberSignature Language="C#" Value="public static System.Runtime.CompilerServices.TaskAwaiter GetAwaiter&lt;TProgress&gt; (this Windows.Foundation.IAsyncActionWithProgress&lt;TProgress&gt; source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Runtime.CompilerServices.TaskAwaiter GetAwaiter&lt;TProgress&gt;(class Windows.Foundation.IAsyncActionWithProgress`1&lt;!!TProgress&gt; source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.GetAwaiter``1(Windows.Foundation.IAsyncActionWithProgress{``0})" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function GetAwaiter(Of TProgress) (source As IAsyncActionWithProgress(Of TProgress)) As TaskAwaiter" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TProgress&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Runtime::CompilerServices::TaskAwaiter GetAwaiter(Windows::Foundation::IAsyncActionWithProgress&lt;TProgress&gt; ^ source);" />
<MemberSignature Language="F#" Value="static member GetAwaiter : Windows.Foundation.IAsyncActionWithProgress&lt;'Progress&gt; -&gt; System.Runtime.CompilerServices.TaskAwaiter" Usage="System.WindowsRuntimeSystemExtensions.GetAwaiter source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Runtime.CompilerServices.TaskAwaiter</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TProgress" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncActionWithProgress&lt;TProgress&gt;" RefType="this" />
</Parameters>
<Docs>
<typeparam name="TProgress">The type of object that provides data that indicates progress.</typeparam>
<param name="source">The asynchronous action to await.</param>
<summary>Returns an object that awaits an asynchronous action that reports progress.</summary>
<returns>An object that awaits the specified asynchronous action.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncActionWithProgress%601>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetAwaiter&lt;TResult&gt;">
<MemberSignature Language="C#" Value="public static System.Runtime.CompilerServices.TaskAwaiter&lt;TResult&gt; GetAwaiter&lt;TResult&gt; (this Windows.Foundation.IAsyncOperation&lt;TResult&gt; source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Runtime.CompilerServices.TaskAwaiter`1&lt;!!TResult&gt; GetAwaiter&lt;TResult&gt;(class Windows.Foundation.IAsyncOperation`1&lt;!!TResult&gt; source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.GetAwaiter``1(Windows.Foundation.IAsyncOperation{``0})" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function GetAwaiter(Of TResult) (source As IAsyncOperation(Of TResult)) As TaskAwaiter(Of TResult)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TResult&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Runtime::CompilerServices::TaskAwaiter&lt;TResult&gt; GetAwaiter(Windows::Foundation::IAsyncOperation&lt;TResult&gt; ^ source);" />
<MemberSignature Language="F#" Value="static member GetAwaiter : Windows.Foundation.IAsyncOperation&lt;'Result&gt; -&gt; System.Runtime.CompilerServices.TaskAwaiter&lt;'Result&gt;" Usage="System.WindowsRuntimeSystemExtensions.GetAwaiter source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Runtime.CompilerServices.TaskAwaiter&lt;TResult&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TResult" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncOperation&lt;TResult&gt;" RefType="this" />
</Parameters>
<Docs>
<typeparam name="TResult">The type of object that returns the result of the asynchronous operation.</typeparam>
<param name="source">The asynchronous operation to await.</param>
<summary>Returns an object that awaits an asynchronous operation that returns a result.</summary>
<returns>An object that awaits the specified asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type IAsyncOperation<TResult>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetAwaiter&lt;TResult,TProgress&gt;">
<MemberSignature Language="C#" Value="public static System.Runtime.CompilerServices.TaskAwaiter&lt;TResult&gt; GetAwaiter&lt;TResult,TProgress&gt; (this Windows.Foundation.IAsyncOperationWithProgress&lt;TResult,TProgress&gt; source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Runtime.CompilerServices.TaskAwaiter`1&lt;!!TResult&gt; GetAwaiter&lt;TResult, TProgress&gt;(class Windows.Foundation.IAsyncOperationWithProgress`2&lt;!!TResult, !!TProgress&gt; source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.WindowsRuntimeSystemExtensions.GetAwaiter``2(Windows.Foundation.IAsyncOperationWithProgress{``0,``1})" />
<MemberSignature Language="VB.NET" Value="&lt;Extension()&gt;&#xA;Public Function GetAwaiter(Of TResult, TProgress) (source As IAsyncOperationWithProgress(Of TResult, TProgress)) As TaskAwaiter(Of TResult)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TResult, typename TProgress&gt;&#xA;[System::Runtime::CompilerServices::Extension]&#xA; static System::Runtime::CompilerServices::TaskAwaiter&lt;TResult&gt; GetAwaiter(Windows::Foundation::IAsyncOperationWithProgress&lt;TResult, TProgress&gt; ^ source);" />
<MemberSignature Language="F#" Value="static member GetAwaiter : Windows.Foundation.IAsyncOperationWithProgress&lt;'Result, 'Progress&gt; -&gt; System.Runtime.CompilerServices.TaskAwaiter&lt;'Result&gt;" Usage="System.WindowsRuntimeSystemExtensions.GetAwaiter source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<AssemblyVersion>4.0.15.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Runtime.CompilerServices.TaskAwaiter&lt;TResult&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TResult" />
<TypeParameter Name="TProgress" />
</TypeParameters>
<Parameters>
<Parameter Name="source" Type="Windows.Foundation.IAsyncOperationWithProgress&lt;TResult,TProgress&gt;" RefType="this" />
</Parameters>
<Docs>
<typeparam name="TResult">The type of object that returns the result of the asynchronous operation.</typeparam>
<typeparam name="TProgress">The type of object that provides data that indicates progress.</typeparam>
<param name="source">The asynchronous operation to await.</param>
<summary>Returns an object that awaits an asynchronous operation that reports progress and returns a result.</summary>
<returns>An object that awaits the specified asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> In Visual Basic and C#, you can call this method as an instance method on any object of type <xref:Windows.Foundation.IAsyncOperationWithProgress%602>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](~/docs/visual-basic/programming-guide/language-features/procedures/extension-methods.md) or [Extension Methods (C# Programming Guide)](~/docs/csharp/programming-guide/classes-and-structs/extension-methods.md).
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.