Skip to content

Commit

Permalink
Changed Count to a class; changed activities to use interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
rross committed Aug 16, 2024
1 parent c7b6e31 commit f3a82cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
15 changes: 2 additions & 13 deletions src/CounterInterceptor/Counts.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
public record Counts
namespace TemporalioSamples.CounterInterceptor;
public class Counts
{
public Counts()
{
clientExecutions = 0;
clientQueries = 0;
clientSignals = 0;
workflowReplays = 0;
workflowSignals = 0;
workflowQueries = 0;
workflowChildExecutions = 0;
workflowActivityExecutions = 0;
}

private uint clientExecutions;
private uint clientQueries;
private uint clientSignals;
Expand Down
8 changes: 3 additions & 5 deletions src/CounterInterceptor/MyActivities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ public class MyActivities
{
[Activity]
public string SayHello(string name, string title) =>
"Hello " + title + " " + name;
$"Hello {title} {name}";

[Activity]
public string SayGoodBye(string name, string title)
{
return "Goodbye " + title + " " + name;
}
public string SayGoodBye(string name, string title) =>
$"Goodby {title} {name}";
}

0 comments on commit f3a82cc

Please sign in to comment.