Skip to content

Commit dff7721

Browse files
authored
ClusterKind.WithProps (#1824)
1 parent 4767ec0 commit dff7721

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Proto.Cluster/ClusterKind.cs

+8
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ public record ClusterKind(string Name, Props Props)
4242
/// <summary>Props to spawn the virtual actor</summary>
4343
[JsonIgnore] public Props Props { get; init; } = Props;
4444

45+
/// <summary>
46+
/// Creates a copy of the ClusterKind with the updated Props
47+
/// </summary>
48+
/// <param name="configureProps">Function to configure a new Props</param>
49+
/// <returns></returns>
50+
public ClusterKind WithProps(Func<Props, Props> configureProps) =>
51+
this with { Props = configureProps(Props) };
52+
4553
/// <summary>
4654
/// Sets the <see cref="IMemberStrategy" /> to be used when placing the actor in the cluster
4755
/// </summary>

0 commit comments

Comments
 (0)