Skip to content

Commit 43a1c37

Browse files
committed
Fix comments
1 parent 8522cf9 commit 43a1c37

File tree

5 files changed

+783
-762
lines changed

5 files changed

+783
-762
lines changed

src/Abstractions/TaskOptions.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ public SubOrchestrationOptions(TaskOptions options, string? instanceId = null)
100100
/// The time when the orchestration instance should start executing. If not specified or if a date-time in the past
101101
/// is specified, the orchestration instance will be scheduled immediately.
102102
/// </param>
103-
/// <param name="Tags">
104-
/// A dictionary of tags to associate with the orchestration instance.
105-
/// </param>
106-
public record StartOrchestrationOptions(string? InstanceId = null, DateTimeOffset? StartAt = null, IDictionary<string, string>? Tags = null);
103+
public record StartOrchestrationOptions(string? InstanceId = null, DateTimeOffset? StartAt = null)
104+
{
105+
/// <summary>
106+
/// Gets or sets the tags to associate with the orchestration instance. Tags are key-value pairs that can be used.
107+
/// </summary>
108+
public IDictionary<string, string>? Tags { get; init; } = new Dictionary<string, string>();
109+
}

src/Client/Core/OrchestrationMetadata.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public OrchestrationMetadata(string name, string instanceId)
8282
/// <summary>
8383
/// Gets the tags associated with the orchestration instance.
8484
/// </summary>
85-
public IDictionary<string, string>? Tags { get; init; }
85+
public IReadOnlyDictionary<string, string> Tags { get; init; } = new Dictionary<string, string>();
8686

8787
/// <summary>
8888
/// Gets the failure details, if any, for the orchestration instance.

src/Client/Grpc/GrpcDurableTaskClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public override async Task<string> ScheduleNewOrchestrationInstanceAsync(
9797
};
9898

9999
// Add tags to the collection
100-
if (options?.Tags != null)
100+
if (request?.Tags != null && options?.Tags != null)
101101
{
102102
foreach (KeyValuePair<string, string> tag in options.Tags)
103103
{

0 commit comments

Comments
 (0)