} // End Function PopulateValues

        public System.Collections.Generic.IEnumerable <string> ExpandViewLocations(
            Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context,
            System.Collections.Generic.IEnumerable <string> viewLocations)
        {
            string theme = null;

            if (context.Values.TryGetValue(THEME_KEY, out theme))
            {
                // Enumerable.Prepend<string>(viewLocations, $"/Themes/{theme}/Shared/{{0}}.cshtml");
                // Enumerable.Prepend<string>(viewLocations, $"/Themes/{theme}/{{1}}/{{0}}.cshtml");

                //using System.Linq;
                //viewLocations = new string[] {
                //    $"/Themes/{theme}/{{1}}/{{0}}.cshtml",
                //    $"/Themes/{theme}/Shared/{{0}}.cshtml",
                //}.Concat(viewLocations);

                viewLocations = System.Linq.Enumerable.Concat(new string[] {
                    $"/Themes/{theme}/{{1}}/{{0}}.cshtml",
                    $"/Themes/{theme}/Shared/{{0}}.cshtml",
                }, viewLocations);
            } // End if (context.Values.TryGetValue(THEME_KEY, out theme))

            return(viewLocations);
        } // End Function ExpandViewLocations
Exemplo n.º 2
0
 public void PopulateValues(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context)
 {
 }
Exemplo n.º 3
0
        public IEnumerable <string> ExpandViewLocations(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context, IEnumerable <string> viewLocations)
        {
            yield return("/aspnet/Views/{1}/{0}.cshtml");

            yield return("/aspnet/Views/Shared/{0}.cshtml");
        }
 public virtual System.Collections.Generic.IEnumerable <string> ExpandViewLocations(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context, System.Collections.Generic.IEnumerable <string> viewLocations)
 {
     throw null;
 }
 internal System.Collections.Generic.IEnumerable <string> GetViewLocationFormats(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context)
 {
     throw null;
 }
 public void PopulateValues(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context)
 {
     // context.Values[THEME_KEY] = context.ActionContext.HttpContext.GetTenant<AppTenant>()?.Theme;
     // context.Values[THEME_KEY] = "TestME";
     context.Values[THEME_KEY] = (string)context.ActionContext.RouteData.Values["subdomain"];
 } // End Function PopulateValues