Esempio n. 1
0
        private static void ForceViewLocation(ViewEngineCollection viewEngineCollection, string viewLocation)
        {
            var forcedLocViewEngine =
                viewEngineCollection.OfType <ForcedLocationViewEngine>().Select(ve => ve).FirstOrDefault();

            if (forcedLocViewEngine == null)
            {
                forcedLocViewEngine = new ForcedLocationViewEngine();
                viewEngineCollection.Add(forcedLocViewEngine);
            }
            forcedLocViewEngine.SetLocation(viewLocation);
        }
 private static void ForceViewLocation(ViewEngineCollection viewEngineCollection, string viewLocation)
 {
     var forcedLocViewEngine =
         viewEngineCollection.OfType<ForcedLocationViewEngine>().Select(ve => ve).FirstOrDefault();
     if (forcedLocViewEngine == null)
     {
         forcedLocViewEngine = new ForcedLocationViewEngine();
         viewEngineCollection.Add(forcedLocViewEngine);
     }
     forcedLocViewEngine.SetLocation(viewLocation);
 }