public static void EngineLoad(Controller ctrl, Guid requestKey, string assemblyName) { List<CarrotViewEngine> lst = ctrl.ViewEngineCollection .Where(x => x is CarrotViewEngine).Cast<CarrotViewEngine>() .Where(x => x.RequestKey == requestKey).ToList(); if (!lst.Any()) { CarrotViewEngine ve = new CarrotViewEngine(assemblyName, requestKey); ctrl.ViewEngineCollection.Add(ve); } }
public static void EngineLoad(Controller ctrl, Guid requestKey, string assemblyName) { List <CarrotViewEngine> lst = ctrl.ViewEngineCollection .Where(x => x is CarrotViewEngine).Cast <CarrotViewEngine>() .Where(x => x.RequestKey == requestKey).ToList(); if (!lst.Any()) { CarrotViewEngine ve = new CarrotViewEngine(assemblyName, requestKey); ctrl.ViewEngineCollection.Add(ve); } }