1
1
// Copyright (c) Microsoft Corporation.
2
2
// Licensed under the MIT License.
3
3
4
+ using System . ComponentModel ;
4
5
using Microsoft . DurableTask . Internal ;
5
6
6
7
namespace Microsoft . DurableTask . Client ;
@@ -73,7 +74,7 @@ public virtual Task<string> ScheduleNewOrchestrationInstanceAsync(
73
74
/// and health of the backend task hub, and whether a start time was provided via <paramref name="options" />.
74
75
/// </para><para>
75
76
/// The task associated with this method completes after the orchestration instance was successfully scheduled. You
76
- /// can use the <see cref="GetInstancesAsync (string, bool, CancellationToken)"/> to query the status of the
77
+ /// can use the <see cref="GetInstanceAsync (string, bool, CancellationToken)"/> to query the status of the
77
78
/// scheduled instance, the <see cref="WaitForInstanceStartAsync(string, bool, CancellationToken)"/> method to wait
78
79
/// for the instance to transition out of the <see cref="OrchestrationRuntimeStatus.Pending"/> status, or the
79
80
/// <see cref="WaitForInstanceCompletionAsync(string, bool, CancellationToken)"/> method to wait for the instance to
@@ -270,7 +271,27 @@ public virtual Task ResumeInstanceAsync(string instanceId, CancellationToken can
270
271
public abstract Task ResumeInstanceAsync (
271
272
string instanceId , string ? reason = null , CancellationToken cancellation = default ) ;
272
273
274
+ /// <inheritdoc cref="GetInstanceAsync(string, bool, CancellationToken)"/>
275
+ public virtual Task < OrchestrationMetadata ? > GetInstanceAsync (
276
+ string instanceId , CancellationToken cancellation )
277
+ => this . GetInstanceAsync ( instanceId , false , cancellation ) ;
278
+
279
+ /// <summary>
280
+ /// Fetches orchestration instance metadata from the configured durable store.
281
+ /// </summary>
282
+ /// <remarks>
283
+ /// You can use the <paramref name="getInputsAndOutputs"/> parameter to determine whether to fetch input and
284
+ /// output data for the target orchestration instance. If your code doesn't require access to this data, it's
285
+ /// recommended that you set this parameter to <c>false</c> to minimize the network bandwidth, serialization, and
286
+ /// memory costs associated with fetching the instance metadata.
287
+ /// </remarks>
288
+ /// <inheritdoc cref="WaitForInstanceStartAsync(string, bool, CancellationToken)"/>
289
+ public virtual Task < OrchestrationMetadata ? > GetInstanceAsync (
290
+ string instanceId , bool getInputsAndOutputs = false , CancellationToken cancellation = default )
291
+ => this . GetInstancesAsync ( instanceId , getInputsAndOutputs , cancellation ) ;
292
+
273
293
/// <inheritdoc cref="GetInstancesAsync(string, bool, CancellationToken)"/>
294
+ [ EditorBrowsable ( EditorBrowsableState . Never ) ] // use GetInstanceAsync
274
295
public virtual Task < OrchestrationMetadata ? > GetInstancesAsync (
275
296
string instanceId , CancellationToken cancellation )
276
297
=> this . GetInstancesAsync ( instanceId , false , cancellation ) ;
@@ -285,6 +306,7 @@ public abstract Task ResumeInstanceAsync(
285
306
/// memory costs associated with fetching the instance metadata.
286
307
/// </remarks>
287
308
/// <inheritdoc cref="WaitForInstanceStartAsync(string, bool, CancellationToken)"/>
309
+ [ EditorBrowsable ( EditorBrowsableState . Never ) ] // use GetInstanceAsync
288
310
public abstract Task < OrchestrationMetadata ? > GetInstancesAsync (
289
311
string instanceId , bool getInputsAndOutputs = false , CancellationToken cancellation = default ) ;
290
312
0 commit comments