The drivers won't work for many reasons.
The biggest is that the current .NET drivers/source require synchronous communication support. The Windows Phone .NET libraries only support asynchronous communication. So, anything that's synchronous would need to be changed.
There's a line of code for example in the current code:
tcpClient.Connect(ipEndPoint);
Minimally, this would need to be changed to be in an async
method using the await
keyword:
await tcpClient.ConnectAsync(ipEndPoint);
However, it's not as simple as that, as the ConnectAsync doesn't support use of the async
keyword as it doesn't use Task
s. Instead, it has a different connection syntax where the method expects an object, that has an event which is called when the connection has established. And, that's just one example.
I'd suggest that instead of directly connecting to a MongoDB, you instead use a web server or service to proxy the database communication. There, you could use a REST API for example and use the C# drivers from an ASP.NET hosted application (for example, using the ASP.NET Web APIs).