Answer the question
In order to leave comments, you need to log in
What replaced System.Web in Katana when editing View?
In familiar ASP.NET MVC, when editing views in VisualStudio, MvcWebRazorHostFactory is used.
When a view is opened in the studio, System.Web.WebPages.Razor.dll is loaded and the WebRazorHostFactory factory in the CreateFactory(string typeName) method looks for the view factory.
public class WebRazorHostFactory
{
...
internal static Func<string, Type> TypeFactory = DefaultTypeFactory;
...
private static Func<WebRazorHostFactory> CreateFactory(string typeName)
{
Type factoryType = TypeFactory(typeName);
if (factoryType == null)
{
throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture,
RazorWebResources.Could_Not_Locate_FactoryType,
typeName));
}
return Expression.Lambda<Func<WebRazorHostFactory>>(Expression.New(factoryType))
.Compile();
}
...
private static Type DefaultTypeFactory(string typeName)
{
return BuildManager.GetType(typeName, false, false);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question