From f8d6b7e6dd6fa4f0e95a2658f315c020a213534f Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Wed, 23 Apr 2025 23:07:51 -0500 Subject: [PATCH] Correcting .NET examples in the workflow docs Signed-off-by: Whit Waldo --- .../building-blocks/workflow/workflow-features-concepts.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md index 985c1cc11de..10f95ee8309 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md @@ -232,7 +232,7 @@ Do this: // Do this!! DateTime currentTime = context.CurrentUtcDateTime; Guid newIdentifier = context.NewGuid(); -string randomString = await context.CallActivityAsync("GetRandomString"); +string randomString = await context.CallActivityAsync(nameof("GetRandomString")); //Use "nameof" to prevent specifying an activity name that does not exist in your application ``` {{% /codetab %}} @@ -339,7 +339,7 @@ Do this: ```csharp // Do this!! string configuration = workflowInput.Configuration; // imaginary workflow input argument -string data = await context.CallActivityAsync("MakeHttpCall", "https://example.com/api/data"); +string data = await context.CallActivityAsync(nameof("MakeHttpCall"), "https://example.com/api/data"); ``` {{% /codetab %}} @@ -439,7 +439,7 @@ Do this: ```csharp // Do this!! -Task t = context.CallActivityAsync("DoSomething"); +Task t = context.CallActivityAsync(nameof("DoSomething")); await context.CreateTimer(5000).ConfigureAwait(true); ```