TaskExtensions.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Type Name="TaskExtensions" FullName="System.Threading.Tasks.TaskExtensions">
  3. <TypeSignature Language="C#" Value="public static class TaskExtensions" />
  4. <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit TaskExtensions extends System.Object" />
  5. <AssemblyInfo>
  6. <AssemblyName>System.Core</AssemblyName>
  7. <AssemblyVersion>4.0.0.0</AssemblyVersion>
  8. </AssemblyInfo>
  9. <Base>
  10. <BaseTypeName>System.Object</BaseTypeName>
  11. </Base>
  12. <Interfaces />
  13. <Docs>
  14. <remarks>To be added.</remarks>
  15. <summary>
  16. <attribution license="cc4" from="Microsoft" modified="false" />
  17. <para>Provides a set of static (Shared in Visual Basic) methods for working with specific kinds of <see cref="T:System.Threading.Tasks.Task" /> instances.</para>
  18. </summary>
  19. </Docs>
  20. <Members>
  21. <Member MemberName="Unwrap">
  22. <MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task Unwrap (this System.Threading.Tasks.Task&lt;System.Threading.Tasks.Task&gt; task);" />
  23. <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task Unwrap(class System.Threading.Tasks.Task`1&lt;class System.Threading.Tasks.Task&gt; task) cil managed" />
  24. <MemberType>Method</MemberType>
  25. <AssemblyInfo>
  26. <AssemblyVersion>4.0.0.0</AssemblyVersion>
  27. </AssemblyInfo>
  28. <ReturnValue>
  29. <ReturnType>System.Threading.Tasks.Task</ReturnType>
  30. </ReturnValue>
  31. <Parameters>
  32. <Parameter Name="task" Type="System.Threading.Tasks.Task&lt;System.Threading.Tasks.Task&gt;" RefType="this" />
  33. </Parameters>
  34. <Docs>
  35. <remarks>
  36. <attribution license="cc4" from="Microsoft" modified="false" />
  37. <para>It is often useful to be able to return a Task from a <see cref="T:System.Threading.Tasks.Task`1" />, where the inner Task represents work done as part of the outer <see cref="T:System.Threading.Tasks.Task`1" />. However, doing so results in a Task&lt;Task&gt; (C#) or Task (Of Task) (Visual Basic), which, if not dealt with carefully, could produce unexpected behavior. Unwrap solves this problem by creating a proxy Task that represents the entire asynchronous operation of such a task.</para>
  38. </remarks>
  39. <summary>
  40. <attribution license="cc4" from="Microsoft" modified="false" />
  41. <para>Creates a proxy <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation of a <see cref="M:System.Threading.Tasks.TaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task,System.Boolean)" />.</para>
  42. </summary>
  43. <returns>
  44. <attribution license="cc4" from="Microsoft" modified="false" />
  45. <para>A Task that represents the asynchronous operation of the provided System.Threading.Tasks.Task(Of Task).</para>
  46. </returns>
  47. <param name="task">
  48. <attribution license="cc4" from="Microsoft" modified="false" />The Task&lt;Task&gt; (C#) or Task (Of Task) (Visual Basic) to unwrap.</param>
  49. </Docs>
  50. </Member>
  51. <Member MemberName="Unwrap&lt;TResult&gt;">
  52. <MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task&lt;TResult&gt; Unwrap&lt;TResult&gt; (this System.Threading.Tasks.Task&lt;System.Threading.Tasks.Task&lt;TResult&gt;&gt; task);" />
  53. <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1&lt;!!TResult&gt; Unwrap&lt;TResult&gt;(class System.Threading.Tasks.Task`1&lt;class System.Threading.Tasks.Task`1&lt;!!TResult&gt;&gt; task) cil managed" />
  54. <MemberType>Method</MemberType>
  55. <AssemblyInfo>
  56. <AssemblyVersion>4.0.0.0</AssemblyVersion>
  57. </AssemblyInfo>
  58. <ReturnValue>
  59. <ReturnType>System.Threading.Tasks.Task&lt;TResult&gt;</ReturnType>
  60. </ReturnValue>
  61. <TypeParameters>
  62. <TypeParameter Name="TResult" />
  63. </TypeParameters>
  64. <Parameters>
  65. <Parameter Name="task" Type="System.Threading.Tasks.Task&lt;System.Threading.Tasks.Task&lt;TResult&gt;&gt;" RefType="this" />
  66. </Parameters>
  67. <Docs>
  68. <remarks>
  69. <attribution license="cc4" from="Microsoft" modified="false" />
  70. <para>It is often useful to be able to return a <see cref="T:System.Threading.Tasks.Task" /> from a <see cref="T:System.Threading.Tasks.Task" />, where the inner <see cref="T:System.Threading.Tasks.Task" /> represents work done as part of the outer <see cref="T:System.Threading.Tasks.Task" />. However, doing so results in a Task&lt;Task&lt;T&gt;&gt; (C#) or Task (Of Task(Of T)) (Visual Basic), which, if not dealt with carefully, could produce unexpected behavior. Unwrap solves this problem by creating a proxy <see cref="T:System.Threading.Tasks.Task`1" /> that represents the entire asynchronous operation of such a Task&lt;Task&lt;T&gt;&gt; (C#) or Task (Of Task(Of T)) (Visual Basic).</para>
  71. </remarks>
  72. <summary>
  73. <attribution license="cc4" from="Microsoft" modified="false" />
  74. <para>Creates a proxy <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation of a Task&lt;Task&lt;T&gt;&gt; (C#) or Task (Of Task(Of T)) (Visual Basic).</para>
  75. </summary>
  76. <returns>
  77. <attribution license="cc4" from="Microsoft" modified="false" />
  78. <para>A <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation of the provided Task&lt;Task&lt;T&gt;&gt; (C#) or Task (Of Task(Of T)) (Visual Basic).</para>
  79. </returns>
  80. <param name="task">
  81. <attribution license="cc4" from="Microsoft" modified="false" />The Task&lt;Task&lt;T&gt;&gt; (C#) or Task (Of Task(Of T)) (Visual Basic) to unwrap.</param>
  82. <typeparam name="TResult">
  83. <attribution license="cc4" from="Microsoft" modified="false" />The type of the task's result.</typeparam>
  84. </Docs>
  85. </Member>
  86. </Members>
  87. </Type>