Can you create an ITracingService?

2019-08-06 10:25发布

问题:

I have a Dynamics CRM plugin I'm trying to debug in Linqpad. I can reference my plugin assembly but it requires an ITracingService object. Can I create one and set its output location to the console?

回答1:

You implement the ITracingService interface on a class.

public class NullCrmTracingService : ITracingService
{
    public void Trace(string format, params object[] args)
    {
        //do nothing
    }
}