Home General

Customizing Dump in a DataContext package

Hi, I'm having an issue with the ToDump function inside a DataContext package. I'm creating a static method as per documentation but it doesn't seem to be called and the output does not get formatted the way I want it to.

Example:

public sealed class MongoDriver : DynamicDataContextDriver
{
        public static object ToDump(object input)
        {
            var document = input as BsonDocument;
            return document != null ? BsonTypeMapper.MapToDotNetValue(document) : input;
        }

        // unrelated code here
}

Is there something I'm missing or is this a limitation of the DataContext?

Comments

Sign In or Register to comment.