private void AggregateCommandExecuted() { var messages = Messages.OfType<CommandExecutedMessage>(); foreach (var message in messages) { var command = GetOrCreateCommandFor(message); command.Command = message.CommandText; command.StartDateTime = message.StartTime; command.Offset = message.Offset; command.HasTransaction = message.HasTransaction; if (message.Parameters != null) { foreach (var parameter in message.Parameters) { var parameterMetadata = new CommandParameterMetadata { Name = parameter.Name, Value = parameter.Value, }; command.Parameters.Add(parameterMetadata); } } } }
private void AggregateCommandExecuted() { var messages = Messages.OfType <CommandExecutedMessage>(); foreach (var message in messages) { var command = GetOrCreateCommandFor(message); command.Command = message.CommandText; command.StartDateTime = message.StartTime; command.Offset = message.Offset; command.HasTransaction = message.HasTransaction; if (message.Parameters != null) { foreach (var parameter in message.Parameters) { var parameterMetadata = new CommandParameterMetadata { Name = parameter.Name, Value = parameter.Value, }; command.Parameters.Add(parameterMetadata); } } } }