text: <Type Name="TaskCompletionSource" FullName="System.Threading.Tasks.TaskCompletionSource">
    <TypeSignature Language="C#" Value="public class TaskCompletionSource" />
    <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit TaskCompletionSource extends System.Object" />
    <TypeSignature Language="DocId" Value="T:System.Threading.Tasks.TaskCompletionSource" />
    <TypeSignature Language="VB.NET" Value="Public Class TaskCompletionSource" />
    <TypeSignature Language="C++ CLI" Value="public ref class TaskCompletionSource" />
    <TypeSignature Language="F#" Value="type TaskCompletionSource = class" />
    <AssemblyInfo>
      <AssemblyName>System.Runtime</AssemblyName>
      <AssemblyVersion>5.0.0.0</AssemblyVersion>
    </AssemblyInfo>
    <Base>
      <BaseTypeName>System.Object</BaseTypeName>
    </Base>
    <Interfaces />
    <Docs>
      <summary>Represents the producer side of a <see cref="T:System.Threading.Tasks.Task" /> unbound to a delegate, providing access to the consumer side through the <see cref="T:System.Threading.Tasks.Task" /> property.</summary>
      <remarks>
        <format type="text/markdown"><![CDATA[
  
  ## Remarks
  
   It is often the case that a <xref:System.Threading.Tasks.Task> is desired to represent another asynchronous operation.
   <xref:System.Threading.Tasks.TaskCompletionSource> is provided for this purpose. It enables the creation of a task that can be handed out to consumers, and those consumers can use the members of the task as they would any other. However, unlike most tasks, the state of a task created by a <xref:System.Threading.Tasks.TaskCompletionSource> is controlled explicitly by the methods on <xref:System.Threading.Tasks.TaskCompletionSource>. This enables the completion of the external asynchronous operation to be propagated to the underlying `Task`. The separation also ensures that consumers are not able to transition the state without access to the corresponding <xref:System.Threading.Tasks.TaskCompletionSource>.
    All members of <xref:System.Threading.Tasks.TaskCompletionSource> are thread-safe and may be used from multiple threads concurrently.
   
  
            ]]></format>
      </remarks>
    </Docs>
    <Members>
      <Member MemberName=".ctor">
        <MemberSignature Language="C#" Value="public TaskCompletionSource ();" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.#ctor" />
        <MemberSignature Language="VB.NET" Value="Public Sub New ()" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; TaskCompletionSource();" />
        <MemberType>Constructor</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <Parameters />
        <Docs>
          <summary>Creates a <see cref="T:System.Threading.Tasks.TaskCompletionSource" />.</summary>
          <remarks>To be added.</remarks>
        </Docs>
      </Member>
      <Member MemberName=".ctor">
        <MemberSignature Language="C#" Value="public TaskCompletionSource (object state);" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(object state) cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.#ctor(System.Object)" />
        <MemberSignature Language="VB.NET" Value="Public Sub New (state As Object)" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; TaskCompletionSource(System::Object ^ state);" />
        <MemberSignature Language="F#" Value="new System.Threading.Tasks.TaskCompletionSource : obj -&gt; System.Threading.Tasks.TaskCompletionSource" Usage="new System.Threading.Tasks.TaskCompletionSource state" />
        <MemberType>Constructor</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <Parameters>
          <Parameter Name="state" Type="System.Object" />
        </Parameters>
        <Docs>
          <param name="state">The state to use as the underlying <see cref="T:System.Threading.Tasks.Task" />'s <see langword="AsyncState" />.</param>
          <summary>Creates a <see cref="T:System.Threading.Tasks.TaskCompletionSource" /> with the specified state.</summary>
          <remarks>To be added.</remarks>
        </Docs>
      </Member>
      <Member MemberName=".ctor">
        <MemberSignature Language="C#" Value="public TaskCompletionSource (System.Threading.Tasks.TaskCreationOptions creationOptions);" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Threading.Tasks.TaskCreationOptions creationOptions) cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.#ctor(System.Threading.Tasks.TaskCreationOptions)" />
        <MemberSignature Language="VB.NET" Value="Public Sub New (creationOptions As TaskCreationOptions)" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; TaskCompletionSource(System::Threading::Tasks::TaskCreationOptions creationOptions);" />
        <MemberSignature Language="F#" Value="new System.Threading.Tasks.TaskCompletionSource : System.Threading.Tasks.TaskCreationOptions -&gt; System.Threading.Tasks.TaskCompletionSource" Usage="new System.Threading.Tasks.TaskCompletionSource creationOptions" />
        <MemberType>Constructor</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <Parameters>
          <Parameter Name="creationOptions" Type="System.Threading.Tasks.TaskCreationOptions" />
        </Parameters>
        <Docs>
          <param name="creationOptions">The options to use when creating the underlying <see cref="T:System.Threading.Tasks.Task" />.</param>
          <summary>Creates a <see cref="T:System.Threading.Tasks.TaskCompletionSource" /> with the specified options.</summary>
          <remarks>
            <format type="text/markdown"><![CDATA[
  
  ## Remarks
  
  The <xref:System.Threading.Tasks.Task> created by this instance and accessible through its <xref:System.Threading.Tasks.TaskCompletionSource.Task> property will be instantiated using the specified `creationOptions`.
  
            ]]></format>
          </remarks>
          <exception cref="T:System.ArgumentOutOfRangeException">One or more of the specified <paramref name="creationOptions" /> are invalid for use with a <see cref="T:System.Threading.Tasks.TaskCompletionSource" />.
  </exception>
        </Docs>
      </Member>
      <Member MemberName=".ctor">
        <MemberSignature Language="C#" Value="public TaskCompletionSource (object state, System.Threading.Tasks.TaskCreationOptions creationOptions);" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(object state, valuetype System.Threading.Tasks.TaskCreationOptions creationOptions) cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.#ctor(System.Object,System.Threading.Tasks.TaskCreationOptions)" />
        <MemberSignature Language="VB.NET" Value="Public Sub New (state As Object, creationOptions As TaskCreationOptions)" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; TaskCompletionSource(System::Object ^ state, System::Threading::Tasks::TaskCreationOptions creationOptions);" />
        <MemberSignature Language="F#" Value="new System.Threading.Tasks.TaskCompletionSource : obj * System.Threading.Tasks.TaskCreationOptions -&gt; System.Threading.Tasks.TaskCompletionSource" Usage="new System.Threading.Tasks.TaskCompletionSource (state, creationOptions)" />
        <MemberType>Constructor</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <Parameters>
          <Parameter Name="state" Type="System.Object" />
          <Parameter Name="creationOptions" Type="System.Threading.Tasks.TaskCreationOptions" />
        </Parameters>
        <Docs>
          <param name="state">The state to use as the underlying <see cref="T:System.Threading.Tasks.Task" />'s <see langword="AsyncState" />.</param>
          <param name="creationOptions">The options to use when creating the underlying <see cref="T:System.Threading.Tasks.Task" />.</param>
          <summary>Creates a <see cref="T:System.Threading.Tasks.TaskCompletionSource" /> with the specified state and options.</summary>
          <remarks>To be added.</remarks>
          <exception cref="T:System.ArgumentOutOfRangeException">One or more of the specified <paramref name="creationOptions" /> are invalid for use with a <see cref="T:System.Threading.Tasks.TaskCompletionSource" />.
  </exception>
        </Docs>
      </Member>
      <Member MemberName="SetCanceled">
        <MemberSignature Language="C#" Value="public void SetCanceled ();" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetCanceled() cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.SetCanceled" />
        <MemberSignature Language="VB.NET" Value="Public Sub SetCanceled ()" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; void SetCanceled();" />
        <MemberSignature Language="F#" Value="member this.SetCanceled : unit -&gt; unit" Usage="taskCompletionSource.SetCanceled " />
        <MemberType>Method</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Void</ReturnType>
        </ReturnValue>
        <Parameters />
        <Docs>
          <summary>Transitions the underlying <see cref="T:System.Threading.Tasks.Task" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.Canceled" /> state.</summary>
          <remarks>To be added.</remarks>
          <exception cref="T:System.InvalidOperationException">The underlying <see cref="T:System.Threading.Tasks.Task" /> is already in one of the three final states: <see cref="F:System.Threading.Tasks.TaskStatus.RanToCompletion" />, <see cref="F:System.Threading.Tasks.TaskStatus.Faulted" />, or <see cref="F:System.Threading.Tasks.TaskStatus.Canceled" />.</exception>
        </Docs>
      </Member>
      <Member MemberName="SetCanceled">
        <MemberSignature Language="C#" Value="public void SetCanceled (System.Threading.CancellationToken cancellationToken);" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetCanceled(valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.SetCanceled(System.Threading.CancellationToken)" />
        <MemberSignature Language="VB.NET" Value="Public Sub SetCanceled (cancellationToken As CancellationToken)" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; void SetCanceled(System::Threading::CancellationToken cancellationToken);" />
        <MemberSignature Language="F#" Value="member this.SetCanceled : System.Threading.CancellationToken -&gt; unit" Usage="taskCompletionSource.SetCanceled cancellationToken" />
        <MemberType>Method</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Void</ReturnType>
        </ReturnValue>
        <Parameters>
          <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
        </Parameters>
        <Docs>
          <param name="cancellationToken">The cancellation token with which to cancel the <see cref="T:System.Threading.Tasks.Task" />.</param>
          <summary>Transitions the underlying <see cref="T:System.Threading.Tasks.Task" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.Canceled" /> state using the specified token.</summary>
          <remarks>To be added.</remarks>
          <exception cref="T:System.InvalidOperationException">The underlying <see cref="T:System.Threading.Tasks.Task" /> is already in one of the three final states: <see cref="F:System.Threading.Tasks.TaskStatus.RanToCompletion" />, <see cref="F:System.Threading.Tasks.TaskStatus.Faulted" />, or <see cref="F:System.Threading.Tasks.TaskStatus.Canceled" />.</exception>
        </Docs>
      </Member>
      <Member MemberName="SetException">
        <MemberSignature Language="C#" Value="public void SetException (System.Collections.Generic.IEnumerable&lt;Exception&gt; exceptions);" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetException(class System.Collections.Generic.IEnumerable`1&lt;class System.Exception&gt; exceptions) cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.SetException(System.Collections.Generic.IEnumerable{System.Exception})" />
        <MemberSignature Language="VB.NET" Value="Public Sub SetException (exceptions As IEnumerable(Of Exception))" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; void SetException(System::Collections::Generic::IEnumerable&lt;Exception ^&gt; ^ exceptions);" />
        <MemberSignature Language="F#" Value="member this.SetException : seq&lt;Exception&gt; -&gt; unit" Usage="taskCompletionSource.SetException exceptions" />
        <MemberType>Method</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Void</ReturnType>
        </ReturnValue>
        <Parameters>
          <Parameter Name="exceptions" Type="System.Collections.Generic.IEnumerable&lt;System.Exception&gt;" />
        </Parameters>
        <Docs>
          <param name="exceptions">The collection of exceptions to bind to this <see cref="T:System.Threading.Tasks.Task" />.</param>
          <summary>Transitions the underlying <see cref="T:System.Threading.Tasks.Task" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.Faulted" /> state.</summary>
          <remarks>To be added.</remarks>
          <exception cref="T:System.ArgumentNullException">
            <paramref name="exceptions" /> is <see langword="null" />.</exception>
          <exception cref="T:System.ArgumentException">There are one or more <see langword="null" /> elements in <paramref name="exceptions" />.</exception>
          <exception cref="T:System.InvalidOperationException">The underlying <see cref="T:System.Threading.Tasks.Task" /> is already in one of the three final states: <see cref="F:System.Threading.Tasks.TaskStatus.RanToCompletion" />, <see cref="F:System.Threading.Tasks.TaskStatus.Faulted" />, or <see cref="F:System.Threading.Tasks.TaskStatus.Canceled" />.</exception>
        </Docs>
      </Member>
      <Member MemberName="SetException">
        <MemberSignature Language="C#" Value="public void SetException (Exception exception);" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetException(class System.Exception exception) cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.SetException(System.Exception)" />
        <MemberSignature Language="VB.NET" Value="Public Sub SetException (exception As Exception)" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; void SetException(Exception ^ exception);" />
        <MemberSignature Language="F#" Value="member this.SetException : Exception -&gt; unit" Usage="taskCompletionSource.SetException exception" />
        <MemberType>Method</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Void</ReturnType>
        </ReturnValue>
        <Parameters>
          <Parameter Name="exception" Type="System.Exception" />
        </Parameters>
        <Docs>
          <param name="exception">The exception to bind to this <see cref="T:System.Threading.Tasks.Task" />.</param>
          <summary>Transitions the underlying <see cref="T:System.Threading.Tasks.Task" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.Faulted" /> state.</summary>
          <remarks>To be added.</remarks>
          <exception cref="T:System.ArgumentNullException">
            <paramref name="exception" /> is <see langword="null" />.</exception>
          <exception cref="T:System.InvalidOperationException">The underlying <see cref="T:System.Threading.Tasks.Task" /> is already in one of the three final states: <see cref="F:System.Threading.Tasks.TaskStatus.RanToCompletion" />, <see cref="F:System.Threading.Tasks.TaskStatus.Faulted" />, or <see cref="F:System.Threading.Tasks.TaskStatus.Canceled" />.</exception>
        </Docs>
      </Member>
      <Member MemberName="SetResult">
        <MemberSignature Language="C#" Value="public void SetResult ();" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetResult() cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.SetResult" />
        <MemberSignature Language="VB.NET" Value="Public Sub SetResult ()" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; void SetResult();" />
        <MemberSignature Language="F#" Value="member this.SetResult : unit -&gt; unit" Usage="taskCompletionSource.SetResult " />
        <MemberType>Method</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Void</ReturnType>
        </ReturnValue>
        <Parameters />
        <Docs>
          <summary>Transitions the underlying <see cref="T:System.Threading.Tasks.Task" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.RanToCompletion" /> state.</summary>
          <remarks>To be added.</remarks>
          <exception cref="T:System.InvalidOperationException">The underlying <see cref="T:System.Threading.Tasks.Task" /> is already in one of the three final states: <see cref="F:System.Threading.Tasks.TaskStatus.RanToCompletion" />, <see cref="F:System.Threading.Tasks.TaskStatus.Faulted" />, or <see cref="F:System.Threading.Tasks.TaskStatus.Canceled" />.</exception>
        </Docs>
      </Member>
      <Member MemberName="Task">
        <MemberSignature Language="C#" Value="public System.Threading.Tasks.Task Task { get; }" />
        <MemberSignature Language="ILAsm" Value=".property instance class System.Threading.Tasks.Task Task" />
        <MemberSignature Language="DocId" Value="P:System.Threading.Tasks.TaskCompletionSource.Task" />
        <MemberSignature Language="VB.NET" Value="Public ReadOnly Property Task As Task" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Threading::Tasks::Task ^ Task { System::Threading::Tasks::Task ^ get(); };" />
        <MemberSignature Language="F#" Value="member this.Task : System.Threading.Tasks.Task" Usage="System.Threading.Tasks.TaskCompletionSource.Task" />
        <MemberType>Property</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Threading.Tasks.Task</ReturnType>
        </ReturnValue>
        <Docs>
          <summary>Gets the <see cref="T:System.Threading.Tasks.Task" /> created by this <see cref="T:System.Threading.Tasks.TaskCompletionSource" />.</summary>
          <value>To be added.</value>
          <remarks>
            <format type="text/markdown"><![CDATA[
  
  ## Remarks
  
  This property gives a consumer access to the <xref:System.Threading.Tasks.TaskCompletionSource.Task> that's controlled by this instance.
   The <xref:System.Threading.Tasks.TaskCompletionSource.SetResult>, <xref:System.Threading.Tasks.TaskCompletionSource.SetException(System.Exception)>, <xref:System.Threading.Tasks.TaskCompletionSource.SetException(System.Collections.Generic.IEnumerable{System.Exception})>, and <xref:System.Threading.Tasks.TaskCompletionSource.SetCanceled> methods (and their `Try` variants) on this instance all result in the relevant state transitions on this underlying `Task`.
  
            ]]></format>
          </remarks>
        </Docs>
      </Member>
      <Member MemberName="TrySetCanceled">
        <MemberSignature Language="C#" Value="public bool TrySetCanceled ();" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool TrySetCanceled() cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.TrySetCanceled" />
        <MemberSignature Language="VB.NET" Value="Public Function TrySetCanceled () As Boolean" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; bool TrySetCanceled();" />
        <MemberSignature Language="F#" Value="member this.TrySetCanceled : unit -&gt; bool" Usage="taskCompletionSource.TrySetCanceled " />
        <MemberType>Method</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Boolean</ReturnType>
        </ReturnValue>
        <Parameters />
        <Docs>
          <summary>Attempts to transition the underlying <see cref="T:System.Threading.Tasks.Task" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.Canceled" /> state.</summary>
          <returns>
            <see langword="true" /> if the operation was successful; otherwise, <see langword="false" />.</returns>
          <remarks>
            <format type="text/markdown"><![CDATA[
  
  ## Remarks
  
  This operation will return `false` if the <xref:System.Threading.Tasks.Task> is already in one of the three final states:
   <xref:System.Threading.Tasks.TaskStatus.RanToCompletion>, <xref:System.Threading.Tasks.TaskStatus.Faulted>, or <xref:System.Threading.Tasks.TaskStatus.Canceled>.
  
            ]]></format>
          </remarks>
        </Docs>
      </Member>
      <Member MemberName="TrySetCanceled">
        <MemberSignature Language="C#" Value="public bool TrySetCanceled (System.Threading.CancellationToken cancellationToken);" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool TrySetCanceled(valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.TrySetCanceled(System.Threading.CancellationToken)" />
        <MemberSignature Language="VB.NET" Value="Public Function TrySetCanceled (cancellationToken As CancellationToken) As Boolean" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; bool TrySetCanceled(System::Threading::CancellationToken cancellationToken);" />
        <MemberSignature Language="F#" Value="member this.TrySetCanceled : System.Threading.CancellationToken -&gt; bool" Usage="taskCompletionSource.TrySetCanceled cancellationToken" />
        <MemberType>Method</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Boolean</ReturnType>
        </ReturnValue>
        <Parameters>
          <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
        </Parameters>
        <Docs>
          <param name="cancellationToken">The cancellation token with which to cancel the <see cref="T:System.Threading.Tasks.Task" />.</param>
          <summary>Attempts to transition the underlying <see cref="T:System.Threading.Tasks.Task" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.Canceled" /> state.</summary>
          <returns>
            <see langword="true" /> if the operation was successful; otherwise, <see langword="false" />.</returns>
          <remarks>
            <format type="text/markdown"><![CDATA[
  
  ## Remarks
  
  This operation will return `false` if the <xref:System.Threading.Tasks.Task> is already in one of the three final states:
   <xref:System.Threading.Tasks.TaskStatus.RanToCompletion>, <xref:System.Threading.Tasks.TaskStatus.Faulted>, or <xref:System.Threading.Tasks.TaskStatus.Canceled>.
  
            ]]></format>
          </remarks>
        </Docs>
      </Member>
      <Member MemberName="TrySetException">
        <MemberSignature Language="C#" Value="public bool TrySetException (System.Collections.Generic.IEnumerable&lt;Exception&gt; exceptions);" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool TrySetException(class System.Collections.Generic.IEnumerable`1&lt;class System.Exception&gt; exceptions) cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.TrySetException(System.Collections.Generic.IEnumerable{System.Exception})" />
        <MemberSignature Language="VB.NET" Value="Public Function TrySetException (exceptions As IEnumerable(Of Exception)) As Boolean" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; bool TrySetException(System::Collections::Generic::IEnumerable&lt;Exception ^&gt; ^ exceptions);" />
        <MemberSignature Language="F#" Value="member this.TrySetException : seq&lt;Exception&gt; -&gt; bool" Usage="taskCompletionSource.TrySetException exceptions" />
        <MemberType>Method</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Boolean</ReturnType>
        </ReturnValue>
        <Parameters>
          <Parameter Name="exceptions" Type="System.Collections.Generic.IEnumerable&lt;System.Exception&gt;" />
        </Parameters>
        <Docs>
          <param name="exceptions">The collection of exceptions to bind to this <see cref="T:System.Threading.Tasks.Task" />.</param>
          <summary>Attempts to transition the underlying <see cref="T:System.Threading.Tasks.Task" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.Faulted" /> state.</summary>
          <returns>
            <see langword="true" /> if the operation was successful; otherwise, <see langword="false" />.</returns>
          <remarks>
            <format type="text/markdown"><![CDATA[
  
  ## Remarks
  
  This operation will return `false` if the <xref:System.Threading.Tasks.Task> is already in one of the three final states:
   <xref:System.Threading.Tasks.TaskStatus.RanToCompletion>, <xref:System.Threading.Tasks.TaskStatus.Faulted>, or <xref:System.Threading.Tasks.TaskStatus.Canceled>.
  
            ]]></format>
          </remarks>
          <exception cref="T:System.ArgumentNullException">
            <paramref name="exceptions" /> is <see langword="null" />.</exception>
          <exception cref="T:System.ArgumentException">There are one or more <see langword="null" /> elements in <paramref name="exceptions" />.</exception>
          <exception cref="T:System.ArgumentException">The <paramref name="exceptions" /> collection is empty.</exception>
        </Docs>
      </Member>
      <Member MemberName="TrySetException">
        <MemberSignature Language="C#" Value="public bool TrySetException (Exception exception);" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool TrySetException(class System.Exception exception) cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.TrySetException(System.Exception)" />
        <MemberSignature Language="VB.NET" Value="Public Function TrySetException (exception As Exception) As Boolean" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; bool TrySetException(Exception ^ exception);" />
        <MemberSignature Language="F#" Value="member this.TrySetException : Exception -&gt; bool" Usage="taskCompletionSource.TrySetException exception" />
        <MemberType>Method</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Boolean</ReturnType>
        </ReturnValue>
        <Parameters>
          <Parameter Name="exception" Type="System.Exception" />
        </Parameters>
        <Docs>
          <param name="exception">The exception to bind to this <see cref="T:System.Threading.Tasks.Task" />.</param>
          <summary>Attempts to transition the underlying <see cref="T:System.Threading.Tasks.Task" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.Faulted" /> state.</summary>
          <returns>
            <see langword="true" /> if the operation was successful; otherwise, <see langword="false" />.</returns>
          <remarks>
            <format type="text/markdown"><![CDATA[
  
  ## Remarks
  
  This operation will return `false` if the <xref:System.Threading.Tasks.Task> is already in one of the three final states:
   <xref:System.Threading.Tasks.TaskStatus.RanToCompletion>, <xref:System.Threading.Tasks.TaskStatus.Faulted>, or <xref:System.Threading.Tasks.TaskStatus.Canceled>.
  
            ]]></format>
          </remarks>
          <exception cref="T:System.ArgumentNullException">
            <paramref name="exception" /> is <see langword="null" />.</exception>
        </Docs>
      </Member>
      <Member MemberName="TrySetResult">
        <MemberSignature Language="C#" Value="public bool TrySetResult ();" />
        <MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool TrySetResult() cil managed" />
        <MemberSignature Language="DocId" Value="M:System.Threading.Tasks.TaskCompletionSource.TrySetResult" />
        <MemberSignature Language="VB.NET" Value="Public Function TrySetResult () As Boolean" />
        <MemberSignature Language="C++ CLI" Value="public:&#xA; bool TrySetResult();" />
        <MemberSignature Language="F#" Value="member this.TrySetResult : unit -&gt; bool" Usage="taskCompletionSource.TrySetResult " />
        <MemberType>Method</MemberType>
        <AssemblyInfo>
          <AssemblyName>System.Runtime</AssemblyName>
          <AssemblyVersion>5.0.0.0</AssemblyVersion>
        </AssemblyInfo>
        <ReturnValue>
          <ReturnType>System.Boolean</ReturnType>
        </ReturnValue>
        <Parameters />
        <Docs>
          <summary>Attempts to transition the underlying <see cref="T:System.Threading.Tasks.Task" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.RanToCompletion" /> state.</summary>
          <returns>
            <see langword="true" /> if the operation was successful; otherwise, <see langword="false" />.</returns>
          <remarks>
            <format type="text/markdown"><![CDATA[
  
  ## Remarks
  
  This operation will return `false` if the <xref:System.Threading.Tasks.Task> is already in one of the three final states:
   <xref:System.Threading.Tasks.TaskStatus.RanToCompletion>, <xref:System.Threading.Tasks.TaskStatus.Faulted>, or <xref:System.Threading.Tasks.TaskStatus.Canceled>.
  
            ]]></format>
          </remarks>
        </Docs>
      </Member>
    </Members>
  </Type>
  