Skip to content
Damian Turczynski edited this page Oct 24, 2017 · 1 revision

Commands automatically generate a Name property that's used for configuring the Command and referencing it in metrics and logs. The Command Name is built from the Command's group name (the first constructor argument) and class name. the form is generally:

group-name.ClassName

Some transformations are applied:

  • If the class name has Command at the end, the Command part will be truncated (e.g. MyFooCommand becomes MyFoo).
  • Any . (period) characters in the group name will be replace with - (dash) characters.

Given the transformations, Command names will always have exactly one dot (.) separator (i.e. group-name.ClassName).

Examples

  • Command name will be my-group.MyFoo for:

    class MyFooCommand : SyncCommand<int>
    {
        public MyFooCommand("my-group", "...") { ... }
    }

    Command suffix on class name is truncated.

  • Command name will be my-dot-group.MyCommandThatFoos for:

    class MyCommandThatFoos : SyncCommand<int>
    {
        public MyFooCommand("my.dot.group", "...") { ... }
    }

    (Group . characters replaced with -, no Command suffix to truncate).