@@ -52,6 +52,13 @@ public TaskOptions(TaskRetryOptions? retry = null)
5252 /// <param name="instanceId">The instance ID to use.</param>
5353 /// <returns>A new <see cref="SubOrchestrationOptions" />.</returns>
5454 public SubOrchestrationOptions WithInstanceId ( string instanceId ) => new ( this , instanceId ) ;
55+
56+ /// <summary>
57+ /// Returns a new <see cref="CallActivityOptions" /> with the provided tags.
58+ /// </summary>
59+ /// <param name="tags">The tags to associate with the activity.</param>
60+ /// <returns>A new <see cref="CallActivityOptions" />.</returns>
61+ public CallActivityOptions WithTags ( IReadOnlyDictionary < string , string > tags ) => new ( this , tags ) ;
5562}
5663
5764/// <summary>
@@ -109,3 +116,46 @@ public record StartOrchestrationOptions(string? InstanceId = null, DateTimeOffse
109116 /// </summary>
110117 public IReadOnlyDictionary < string , string > Tags { get ; init ; } = ImmutableDictionary . Create < string , string > ( ) ;
111118}
119+
120+ /// <summary>
121+ /// Options for calling activities from an orchestrator.
122+ /// </summary>
123+ public record CallActivityOptions : TaskOptions
124+ {
125+ /// <summary>
126+ /// Initializes a new instance of the <see cref="CallActivityOptions"/> class.
127+ /// </summary>
128+ /// <param name="retry">The task retry options.</param>
129+ /// <param name="tags">The tags to associate with the activity.</param>
130+ public CallActivityOptions ( TaskRetryOptions ? retry = null , IReadOnlyDictionary < string , string > ? tags = null )
131+ : base ( retry )
132+ {
133+ if ( tags != null )
134+ {
135+ this . Tags = tags ;
136+ }
137+ }
138+
139+ /// <summary>
140+ /// Initializes a new instance of the <see cref="CallActivityOptions"/> class.
141+ /// </summary>
142+ /// <param name="options">The task options to wrap.</param>
143+ /// <param name="tags">The tags to associate with the activity.</param>
144+ public CallActivityOptions ( TaskOptions options , IReadOnlyDictionary < string , string > ? tags = null )
145+ : base ( options )
146+ {
147+ if ( tags != null )
148+ {
149+ this . Tags = tags ;
150+ }
151+ else if ( options is CallActivityOptions derived )
152+ {
153+ this . Tags = derived . Tags ;
154+ }
155+ }
156+
157+ /// <summary>
158+ /// Gets the tags to associate with the activity instance.
159+ /// </summary>
160+ public IReadOnlyDictionary < string , string > Tags { get ; init ; } = ImmutableDictionary . Create < string , string > ( ) ;
161+ }
0 commit comments