xml/System.ClientModel.Primitives/OperationResult.xml (319 lines of code) (raw):
<Type Name="OperationResult" FullName="System.ClientModel.Primitives.OperationResult">
<TypeSignature Language="C#" Value="public abstract class OperationResult" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit OperationResult extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.ClientModel.Primitives.OperationResult" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class OperationResult" />
<TypeSignature Language="F#" Value="type OperationResult = class" />
<AssemblyInfo>
<AssemblyName>System.ClientModel</AssemblyName>
<AssemblyVersion>1.1.0.0</AssemblyVersion>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<AssemblyVersion>1.2.1.0</AssemblyVersion>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
Represents an operation that runs asynchronously on a cloud service. Cloud
services use long-running operations to allow users to start an operation
with one request and then monitor progress of the operation until it has
completed. <see cref="T:System.ClientModel.Primitives.OperationResult" /> enables waiting for completion of
long-running operations. Client libraries provide derived types that add
properties such as <code>Value</code> or <code>Status</code> as applicable
for a given service operation.
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected OperationResult (System.ClientModel.Primitives.PipelineResponse response);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(class System.ClientModel.Primitives.PipelineResponse response) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ClientModel.Primitives.OperationResult.#ctor(System.ClientModel.Primitives.PipelineResponse)" />
<MemberSignature Language="VB.NET" Value="Protected Sub New (response As PipelineResponse)" />
<MemberSignature Language="F#" Value="new System.ClientModel.Primitives.OperationResult : System.ClientModel.Primitives.PipelineResponse -> System.ClientModel.Primitives.OperationResult" Usage="new System.ClientModel.Primitives.OperationResult response" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ClientModel</AssemblyName>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="response" Type="System.ClientModel.Primitives.PipelineResponse" />
</Parameters>
<Docs>
<param name="response">The <see cref="T:System.ClientModel.Primitives.PipelineResponse" /> received from
the service in response to the request that started the operation.</param>
<summary>
Creates a new instance of <see cref="T:System.ClientModel.Primitives.OperationResult" />.
</summary>
<remarks>Derived types will call
<see cref="M:System.ClientModel.ClientResult.SetRawResponse(System.ClientModel.Primitives.PipelineResponse)" /> when a new
response is received that updates the status of the operation.</remarks>
</Docs>
</Member>
<Member MemberName="GetRawResponse">
<MemberSignature Language="C#" Value="public System.ClientModel.Primitives.PipelineResponse GetRawResponse ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.ClientModel.Primitives.PipelineResponse GetRawResponse() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ClientModel.Primitives.OperationResult.GetRawResponse" />
<MemberSignature Language="VB.NET" Value="Public Function GetRawResponse () As PipelineResponse" />
<MemberSignature Language="F#" Value="member this.GetRawResponse : unit -> System.ClientModel.Primitives.PipelineResponse" Usage="operationResult.GetRawResponse " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ClientModel</AssemblyName>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ClientModel.Primitives.PipelineResponse</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Gets the <see cref="T:System.ClientModel.Primitives.PipelineResponse" /> corresponding to the most
recent update received from the service.
</summary>
<returns>The most recent <see cref="T:System.ClientModel.Primitives.PipelineResponse" /> received
from the service.
</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HasCompleted">
<MemberSignature Language="C#" Value="public bool HasCompleted { get; protected set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool HasCompleted" />
<MemberSignature Language="DocId" Value="P:System.ClientModel.Primitives.OperationResult.HasCompleted" />
<MemberSignature Language="VB.NET" Value="Public Property HasCompleted As Boolean" />
<MemberSignature Language="F#" Value="member this.HasCompleted : bool with get, set" Usage="System.ClientModel.Primitives.OperationResult.HasCompleted" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ClientModel</AssemblyName>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets a value that indicates whether the operation has completed.
</summary>
<value>
<c>true</c> if the operation has reached a terminal state
(that is, it has finished successfully, ended due to an error condition,
or has been cancelled by a user); otherwise, <c>false</c>.
</value>
<remarks>
<see cref="P:System.ClientModel.Primitives.OperationResult.HasCompleted" /> is updated by the
<see cref="M:System.ClientModel.Primitives.OperationResult.UpdateStatus(System.ClientModel.Primitives.RequestOptions)" /> method, based on the response received from
the service regarding the operation's status. Users must call
<see cref="M:System.ClientModel.Primitives.OperationResult.WaitForCompletion(System.Threading.CancellationToken)" />, <see cref="M:System.ClientModel.Primitives.OperationResult.UpdateStatus(System.ClientModel.Primitives.RequestOptions)" />, or other
method provided by the derived type to ensure that the value of the
<see cref="P:System.ClientModel.Primitives.OperationResult.HasCompleted" /> property reflects the current status of the
operation running on the service.
</remarks>
</Docs>
</Member>
<Member MemberName="RehydrationToken">
<MemberSignature Language="C#" Value="public abstract System.ClientModel.ContinuationToken? RehydrationToken { get; protected set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ClientModel.ContinuationToken RehydrationToken" />
<MemberSignature Language="DocId" Value="P:System.ClientModel.Primitives.OperationResult.RehydrationToken" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Property RehydrationToken As ContinuationToken" />
<MemberSignature Language="F#" Value="member this.RehydrationToken : System.ClientModel.ContinuationToken with get, set" Usage="System.ClientModel.Primitives.OperationResult.RehydrationToken" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ClientModel</AssemblyName>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ClientModel.ContinuationToken</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets a token that can be used to rehydrate the operation.
</summary>
<value>A token that can be used to rehydrate the operation, for example
to monitor its progress or to obtain its final result, from a process
different than the one that started the operation.</value>
<remarks>This property is abstract so that derived types that do not
support rehydration can return null without using a backing field for
an unused <see cref="T:System.ClientModel.ContinuationToken" />.</remarks>
</Docs>
</Member>
<Member MemberName="SetRawResponse">
<MemberSignature Language="C#" Value="protected void SetRawResponse (System.ClientModel.Primitives.PipelineResponse response);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void SetRawResponse(class System.ClientModel.Primitives.PipelineResponse response) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ClientModel.Primitives.OperationResult.SetRawResponse(System.ClientModel.Primitives.PipelineResponse)" />
<MemberSignature Language="VB.NET" Value="Protected Sub SetRawResponse (response As PipelineResponse)" />
<MemberSignature Language="F#" Value="member this.SetRawResponse : System.ClientModel.Primitives.PipelineResponse -> unit" Usage="operationResult.SetRawResponse response" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ClientModel</AssemblyName>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="response" Type="System.ClientModel.Primitives.PipelineResponse" />
</Parameters>
<Docs>
<param name="response">The <see cref="T:System.ClientModel.Primitives.PipelineResponse" /> to return
from <see cref="M:System.ClientModel.Primitives.OperationResult.GetRawResponse" />.</param>
<summary>
Update the value returned from <see cref="M:System.ClientModel.Primitives.OperationResult.GetRawResponse" />.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="UpdateStatus">
<MemberSignature Language="C#" Value="public abstract System.ClientModel.ClientResult UpdateStatus (System.ClientModel.Primitives.RequestOptions? options = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.ClientModel.ClientResult UpdateStatus(class System.ClientModel.Primitives.RequestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ClientModel.Primitives.OperationResult.UpdateStatus(System.ClientModel.Primitives.RequestOptions)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function UpdateStatus (Optional options As RequestOptions = Nothing) As ClientResult" />
<MemberSignature Language="F#" Value="abstract member UpdateStatus : System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult" Usage="operationResult.UpdateStatus options" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ClientModel</AssemblyName>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ClientModel.ClientResult</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="options" Type="System.ClientModel.Primitives.RequestOptions" />
</Parameters>
<Docs>
<param name="options">The <see cref="T:System.ClientModel.Primitives.RequestOptions" /> to be used when
sending the request to the service.</param>
<summary>
Sends a request to the service to get the current status of the
operation and updates <see cref="P:System.ClientModel.Primitives.OperationResult.HasCompleted" /> and other relevant
properties.
</summary>
<returns>The <see cref="T:System.ClientModel.ClientResult" /> returned from the service call.
</returns>
<remarks>This method updates the value returned from
<see cref="M:System.ClientModel.ClientResult.GetRawResponse" /> and will update
<see cref="P:System.ClientModel.Primitives.OperationResult.HasCompleted" /> to <c>true</c> once the operation has finished
running on the service. It will also update <c>Value</c> or
<c>Status</c> properties if present on the <see cref="T:System.ClientModel.Primitives.OperationResult" />
derived type.</remarks>
</Docs>
</Member>
<Member MemberName="UpdateStatusAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.ValueTask<System.ClientModel.ClientResult> UpdateStatusAsync (System.ClientModel.Primitives.RequestOptions? options = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype System.Threading.Tasks.ValueTask`1<class System.ClientModel.ClientResult> UpdateStatusAsync(class System.ClientModel.Primitives.RequestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ClientModel.Primitives.OperationResult.UpdateStatusAsync(System.ClientModel.Primitives.RequestOptions)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function UpdateStatusAsync (Optional options As RequestOptions = Nothing) As ValueTask(Of ClientResult)" />
<MemberSignature Language="F#" Value="abstract member UpdateStatusAsync : System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.ValueTask<System.ClientModel.ClientResult>" Usage="operationResult.UpdateStatusAsync options" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ClientModel</AssemblyName>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.ValueTask<System.ClientModel.ClientResult></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="options" Type="System.ClientModel.Primitives.RequestOptions" />
</Parameters>
<Docs>
<param name="options">The <see cref="T:System.ClientModel.Primitives.RequestOptions" /> to be used when
sending the request to the service.</param>
<summary>
Sends a request to the service to get the current status of the
operation and updates <see cref="P:System.ClientModel.Primitives.OperationResult.HasCompleted" /> and other relevant
properties.
</summary>
<returns>The <see cref="T:System.ClientModel.ClientResult" /> returned from the service call.
</returns>
<remarks>This method updates the value returned from
<see cref="M:System.ClientModel.ClientResult.GetRawResponse" /> and will update
<see cref="P:System.ClientModel.Primitives.OperationResult.HasCompleted" /> to <c>true</c> once the operation has finished
running on the service. It will also update <c>Value</c> or
<c>Status</c> properties if present on the <see cref="T:System.ClientModel.Primitives.OperationResult" />
derived type.</remarks>
</Docs>
</Member>
<Member MemberName="WaitForCompletion">
<MemberSignature Language="C#" Value="public virtual void WaitForCompletion (System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void WaitForCompletion(valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ClientModel.Primitives.OperationResult.WaitForCompletion(System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub WaitForCompletion (Optional cancellationToken As CancellationToken = Nothing)" />
<MemberSignature Language="F#" Value="abstract member WaitForCompletion : System.Threading.CancellationToken -> unit
override this.WaitForCompletion : System.Threading.CancellationToken -> unit" Usage="operationResult.WaitForCompletion cancellationToken" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ClientModel</AssemblyName>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="cancellationToken">To be added.</param>
<summary>
Waits for the operation to complete processing on the service.
</summary>
<remarks>Derived types may override <see cref="M:System.ClientModel.Primitives.OperationResult.WaitForCompletion(System.Threading.CancellationToken)" />
to implement different mechanisms for obtaining updates from the service
regarding the progress of the operation. For example, if the derived
type polls for status updates, it may provides overloads of
<see cref="M:System.ClientModel.Primitives.OperationResult.WaitForCompletion(System.Threading.CancellationToken)" />
that allow the caller to specify the polling interval or delay strategy
used to wait between sending request for updates. By default,
<see cref="M:System.ClientModel.Primitives.OperationResult.WaitForCompletion(System.Threading.CancellationToken)" /> waits a default interval between
calling <see cref="M:System.ClientModel.Primitives.OperationResult.UpdateStatus(System.ClientModel.Primitives.RequestOptions)" /> to obtain a status updates, so
if updates are delivered via streaming or another mechanism where a wait
time is not required, derived types can override this method to update
the status more frequently.
</remarks>
<exception cref="T:System.OperationCanceledException">The <paramref name="cancellationToken" />
was cancelled.</exception>
</Docs>
</Member>
<Member MemberName="WaitForCompletionAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.ValueTask WaitForCompletionAsync (System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype System.Threading.Tasks.ValueTask WaitForCompletionAsync(valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ClientModel.Primitives.OperationResult.WaitForCompletionAsync(System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function WaitForCompletionAsync (Optional cancellationToken As CancellationToken = Nothing) As ValueTask" />
<MemberSignature Language="F#" Value="abstract member WaitForCompletionAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
override this.WaitForCompletionAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask" Usage="operationResult.WaitForCompletionAsync cancellationToken" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ClientModel</AssemblyName>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.ValueTask</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="cancellationToken">To be added.</param>
<summary>
Waits for the operation to complete processing on the service.
</summary>
<returns>To be added.</returns>
<remarks>Derived types may override <see cref="M:System.ClientModel.Primitives.OperationResult.WaitForCompletionAsync(System.Threading.CancellationToken)" />
to implement different mechanisms for obtaining updates from the service
regarding the progress of the operation. For example, if the derived
type polls for status updates, it may provides overloads of
<see cref="M:System.ClientModel.Primitives.OperationResult.WaitForCompletionAsync(System.Threading.CancellationToken)" />
that allow the caller to specify the polling interval or delay strategy
used to wait between sending request for updates. By default,
<see cref="M:System.ClientModel.Primitives.OperationResult.WaitForCompletionAsync(System.Threading.CancellationToken)" /> waits a default interval between
calling <see cref="M:System.ClientModel.Primitives.OperationResult.UpdateStatusAsync(System.ClientModel.Primitives.RequestOptions)" /> to obtain a status updates, so
if updates are delivered via streaming or another mechanism where a wait
time is not required, derived types can override this method to update
the status more frequently.
</remarks>
<exception cref="T:System.OperationCanceledException">The <paramref name="cancellationToken" />
was cancelled.</exception>
</Docs>
</Member>
</Members>
</Type>