public static CompiledFixture CreateCompiledFixture(CellHandling cellHandling, Type type)
{
try
{
var fixture = Activator.CreateInstance(type) as Fixture;
FixtureCache[type] = fixture;
return(new CompiledFixture
{
Fixture = fixture,
Model = fixture.Compile(cellHandling)
});
}
catch (Exception e)
{
var fixture = new InvalidFixture(type, e);
var model = fixture.Compile(cellHandling);
model.implementation = type.FullName;
return(new CompiledFixture
{
Fixture = fixture,
Model = model
});
}
}