mono/MonoGame — pull request #1159 by tpastor (2013-01-06 18:15:44+00:00)
Title: Extending the way WinRt Game Class can be created

Added GameFrameworkViewSourceByDelegate.cs and MetroFrameworkViewByDelegate.cs that lets the user provides a factory method instead of just the type of the Game class implementation that should be built. (the old way still working, i did not touch that )

With this change, you will be able to create a Winrt Game as follows:

static void Main()
{
var factory = new MonoGame.Framework.GameFrameworkViewSourceByDelegate(GameFactory); ///you provide a factory method as a parameter
Windows.ApplicationModel.Core.CoreApplication.Run(factory);
}

///the method that provides the Game implementation
static EngineStuff GameFactory(CoreApplicationView voceview,
IActivatedEventArgs args)
{
///can be customized
InitialEngineDescription desc = InitialEngineDescription.Default();
desc.useMipMapWhenPossible = true;
....
EngineStuff engine = new EngineStuff(ref desc, LoadScreen);
return engine;
}

In the end, the gain is that you can customize the creation process of the Game implementation Class before using it.
This behavior is very welcomed, especially if you are porting some existing code. (like i am =P)