The Binary Serializer has support for passing data to the Serialization Context.

I am using the DataContract Serializer and I would like to do the same thing.

Specifically, I want to be able to pass the path to the file that will be serialized so that I can make other paths relative.

How can I do this with the Data Contract Serializer?