I'm all new to magellan, and as an attempt to learn it, I've built a custom view engine for supporting windows forms as specified in the documentation at codeplex. But how to register this new ViewEngine? There it is given,
ViewEngines.Engines.Add(new FormsViewEngine(new DefaultViewActivator()));
But what I can see is that, ViewEngines
is not a Static Class and moreover it does not have a Engines
Property. I know I'm missing something, but what is it?
So, How to register my ViewEngine
to Magellan? Where and When should I register it?
P开发者_StackOverflowS: I'm using the latest update of magellan.
You are correct, the view engines are now configured on the ControllerRouteCatalog
.
One of the goals in Magellan 2.0 was to reduce the number of static locators.
Seems like things have changed a bit. A few search for references of ViewEngine
Class in the Magellan source gave the answer.
Now ViewEngines
just provide default collection and no more handles ViewEngine registrations. I managed to create my own ViewEngineCollection
and pass it to the contructor of ControllerRouteCatalog
.
My bad, I should have done that before. Thanks anyway.
精彩评论