I have a wcf WebService with a method which takes LogLevel type (part of Nlog) as a parameter,
the LogLevel is build in type comes with a framework for logging called NLog,
Problem is WCF doesnt know how to marshal the loglevel parameter i guess cause its not decorated with DataContract.
is there is any way i can marshal LogLevel through the webservice ?
Note im trying not to wrap it in a custom class.
You can’t transport the entire LogLevel instance. But you can use the string name instead. Call your method with the property value loglevelInstance.Name and recreate a LogLevel instance at the server side using LogLevel.FromName(theString).