I have an invocation logger that is intended to record all method calls along with the parameters associated with the method using XmlSerializer. It works well for most of the calls, but it throws an exception for all methods that has a parameter of IEnumerable
type.
For example, void MethodWithPlace( Place value )
would be serialized, but void MethodWithPlace( IEnumerable<Place> value )
would not.
The exception is
System.NotSupportedException: Cannot serialize interface
System.Collections.Generic.IEnumerable`1[[Place,
Test, Version=0.0.0.0, Culture=neutral]].
What should I do to make it work with those methods with IEnumerable
as one of its parameters?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…