Last active
September 4, 2019 11:42
-
-
Save marcduiker/73c287a5d07c9c8a2a881cc7ecf25960 to your computer and use it in GitHub Desktop.
Example of using nameof() in order to use the class name in the [FunctionName] attribute (activity function) and in the CallActivityAsync() method (orchestration function).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace DurableFunctions.Demo.DotNetCore.Basics.Activities | |
{ | |
public static class HelloNameActivity | |
{ | |
[FunctionName(nameof(HelloNameActivity))] | |
public static string Run( | |
[ActivityTrigger] string name, | |
ILogger logger) | |
{ | |
logger.LogInformation($"Name: {name}"); | |
return $"Hello {name}!"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment