Melt the butter with the oil in a large frying pan, and add the diced mushrooms, minced garlic and sliced shallots. Fry over a medium-low heat for 5 minutes, and then add the chopped chestnuts. Continue to cook for another 5 minutes, stirring regularly, until the mushrooms and onions are soft.
Add the wine and some dried thyme to the mushroom mixture, and cook for a couple of minutes until most of the wine has evaporated. Add the stock, and bring to a simmer. Continue to simmer gently until the mixture has reduced a little, just a few minutes.
Add the cream and grated gruyère, and mix together. As the cheese melts it should help to form a creamy sauce. Bring the mixture to your desired consistency - add a dash more stock if you'd like it to be thinner, or simmer it for a few more minutes to thicken it up. Season to taste.
If you want to serve as a "pie," you can pour over warm biscuits or puff pastry. This also makes a wonderful sauce for pasta or veggies.