Passing a object to a EventSource method

Topics: Semantic Logging Application Block
Mar 10, 2015 at 3:34 PM
The following method generates the exception "Unsupported type Exception in event source."
[Event(1, Message = "Application Exception:{0}", Level = EventLevel.Error)]
public void RecordException(Exception ex)
{
 WriteEvent(1);
}
Instead I have to do this
[Event(1, Message = "Application Exception:{0}", Level = EventLevel.Error)] 
public void RecordException(string stringifiedException)
 {
   WriteEvent(1);
  }
Which is less than ideal. Should I not be able to pass in a parameter that is serializable to a method that is marked with the [Event] attribute.

I did come across recommendations to use the [NonEvent] attribute to take in complex types as parameters. I am trying to see if it is not possible at all to pass non-primitive data types to methods marked with a [Event] attribute.