Carrotware.CMS.Interface.CarrotViewEngineWidget.ReplacePath C# (CSharp) Метод

ReplacePath() защищенный Метод

protected ReplacePath ( System.Web.Mvc.ControllerContext ctrlCtx, string viewPath ) : string
ctrlCtx System.Web.Mvc.ControllerContext
viewPath string
Результат string
        protected override string ReplacePath(ControllerContext ctrlCtx, string viewPath)
        {
            string newViewPath = "~/Views/Shared/__";
            string assemblyName = GetAssemblyKey(ctrlCtx);

            #if DEBUG
            Debug.WriteLine(String.Format("CarrotViewEngineWidget: n:{0}   c:{1}   v:{2}   a:{3}", ctrlCtx.Controller.GetType().Namespace, ctrlCtx.Controller.GetType().Name, viewPath, assemblyName));
            #endif

            if (!String.IsNullOrEmpty(viewPath) && !String.IsNullOrEmpty(assemblyName)) {
                newViewPath = viewPath.ToLowerInvariant().Replace("::key::", assemblyName);
            }

            return newViewPath;
        }