本文整理匯總了C#中System.Web.Mvc.ControllerContext.GetPluginSymbolicName方法的典型用法代碼示例。如果您正苦於以下問題:C# ControllerContext.GetPluginSymbolicName方法的具體用法?C# ControllerContext.GetPluginSymbolicName怎麽用?C# ControllerContext.GetPluginSymbolicName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Web.Mvc.ControllerContext
的用法示例。
在下文中一共展示了ControllerContext.GetPluginSymbolicName方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: FindPartialView
public override ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName,
bool useCache)
{
object symbolicName = controllerContext.GetPluginSymbolicName();
if (symbolicName != null && Bundle.Assembly.GetName().Name.Equals(symbolicName))
{
return base.FindPartialView(controllerContext, partialViewName, useCache);
}
return new ViewEngineResult(new string[0]);
}
示例2: FindView
public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName,
string masterName, bool useCache)
{
object symbolicName = controllerContext.GetPluginSymbolicName();
if (symbolicName != null && Bundle.Assembly.GetName().Name.Equals(symbolicName))
{
this.CodeGeneration(Bundle.Assembly.GetName().Name);
return base.FindView(controllerContext, viewName, masterName, useCache);
}
return new ViewEngineResult(new string[0]);
}
示例3: FindView
public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName,
string masterName, bool useCache)
{
object symbolicName = controllerContext.GetPluginSymbolicName();
if (symbolicName != null && Bundle.Assembly.GetName().Name.Equals(symbolicName))
{
return base.FindView(controllerContext, viewName, masterName, useCache);
}
else
{
Logger.LogDebug("FindView symbolicName:" + Bundle.Assembly.GetName().Name + "viewName:" + viewName);
}
return new ViewEngineResult(new string[0]);
}
示例4: GetViewEngine
private IViewEngine GetViewEngine(ControllerContext controllerContext)
{
IPluginViewEngine tmp;
object symbolicName = controllerContext.GetPluginSymbolicName();
if (symbolicName == null)
{
Logger.LogDebug("GetViewEngine symbolicName:" + symbolicName.ToString() + "isIViewEngine:" + _viewEngines.TryGetValue(symbolicName.ToString(), out tmp));
return null;
}
if (_viewEngines.TryGetValue(symbolicName.ToString(), out tmp))
{
return tmp;
}
else
{
Logger.LogDebug("GetViewEngine symbolicName:" + symbolicName.ToString() + "isIViewEngine:" + _viewEngines.TryGetValue(symbolicName.ToString(), out tmp));
}
return null;
}