private ServerTestRunConfiguration CreateServerConfiguration(
string xapPath,
UnitTestProviderType unitTestProviderType,
MicrosoftTestingFrameworkVersion? microsoftTestingFrameworkVersion,
Func<IEnumerable<ITestFile>> filesToCopyIntoHostXapFunc,
string queryString,
bool forceBrowserStart,
WindowGeometry windowGeometry,
string runtimeVersion,
bool isPhoneRun)
{
XapHostType xapHostType = _xapHostFileLoaderFactory.MapToXapHostType(unitTestProviderType, microsoftTestingFrameworkVersion, isPhoneRun);
Func<IEnumerable<ITestFile>> rewrittenFilesToCopyFunc = RewriteFunc(filesToCopyIntoHostXapFunc);
Func<byte[]> hostXapFactory = () =>
{
byte[] hostXap = _xapHostFileLoaderFactory.LoadXapHostFor(xapHostType);
hostXap = RewriteXapWithSpecialFiles(hostXap, rewrittenFilesToCopyFunc, runtimeVersion);
return hostXap;
};
return new ServerTestRunConfiguration(hostXapFactory, xapPath, xapHostType, queryString, forceBrowserStart, windowGeometry, _options.IsPhoneRun);
}