Skip to content

Commit ec04405

Browse files
committed
Change Dictionary type
1 parent c668dbe commit ec04405

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

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; } = new Dictionary<string, string>();
85+
public IReadOnlyDictionary<string, string> Tags { get; init; }
8686

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

src/Client/Grpc/GrpcDurableTaskClient.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,13 +467,9 @@ OrchestrationMetadata CreateMetadata(P.OrchestrationState state, bool includeInp
467467
SerializedCustomStatus = state.CustomStatus,
468468
FailureDetails = state.FailureDetails.ToTaskFailureDetails(),
469469
DataConverter = includeInputsAndOutputs ? this.DataConverter : null,
470+
Tags = new Dictionary<string, string>(state.Tags),
470471
};
471472

472-
foreach (var tag in state.Tags)
473-
{
474-
metadata.Tags.Add(tag.Key, tag.Value);
475-
}
476-
477473
return metadata;
478474
}
479475
}

0 commit comments

Comments
 (0)