I have a class:
public class StateMachine<TTag> where TTag : Enum { ... }
Which logs using Log that accepts as first argument string tag. I use nameof with StateMachine<TTag> as an argument:
_logger.Log(nameof(StateMachine<TTag>), ...)
In my app I have instances of StateMachine<TTag>, like StateMachine<AppStateTag>, etc.
And I want my StateMachine to log like this:
StateMachine<AppStateTag> ...
But instead I get:
StateMachine ...
Do I need to get weird like this?
${nameof(StateMachine)}<{nameof(TTag)}>
Is there any simple way of doing this?