mirror of
https://github.com/rudollee/LearningMVC.git
synced 2025-06-07 07:56:14 +00:00
33 lines
833 B
C#
33 lines
833 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace Views.Infrastructure
|
|
{
|
|
public class DebugDataViewEngine : IViewEngine
|
|
{
|
|
public ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)
|
|
{
|
|
if (viewName == "DebugData")
|
|
{
|
|
return new ViewEngineResult(new DebugDataView(), this);
|
|
}
|
|
else
|
|
{
|
|
return new ViewEngineResult(new string[] { "no view (Debug Data View Engine)" });
|
|
}
|
|
}
|
|
|
|
public ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache)
|
|
{
|
|
return new ViewEngineResult(new string[] { "No view (Debug Data View Engine)" });
|
|
}
|
|
|
|
public void ReleaseView(ControllerContext controllerContext, IView view)
|
|
{
|
|
|
|
}
|
|
}
|
|
} |