This fragment makes the Semantic Log Analyzer throw "The number of WriteEvent arguments and event parameters are different in event name 'HandlingCommand'."
[NonEvent]
public void HandlingCommand(Command command)
{
if (this.IsEnabled())
{
this.HandlingCommand(command.Id.ToString(), command.Agent.AgentId.ToString());
}
}
[Event(1101,
Level = EventLevel.Informational,
Keywords = Keywords.Agent)]
private void HandlingCommand(string commandId, string agentId)
{
this.WriteEvent(1101, commandId, agentId);
}
The only way to resolve the analyzer error is to have two WriteEvent parameters (event id and commandId for example) and one event argument (commandId for example). If I try with any combination with more than one parameter/argument the above mentioned exception is thrown. The exception is thrown on any event with more than one parameter/argument not just the supplied example.
I have used these samples as a starting point https://github.com/mspnp/semantic-logging/tree/master/quickstarts.