当前位置: 首页>>代码示例>>C#>>正文


C# ViewEngineCollection.Clear方法代码示例

本文整理汇总了C#中ViewEngineCollection.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# ViewEngineCollection.Clear方法的具体用法?C# ViewEngineCollection.Clear怎么用?C# ViewEngineCollection.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ViewEngineCollection的用法示例。


在下文中一共展示了ViewEngineCollection.Clear方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterViewEngines

        public static void RegisterViewEngines(ViewEngineCollection viewEngines)
        {
            viewEngines.Clear();

            var lightweightRazorViewEngine = new LightweightRazorViewEngine();
            viewEngines.Add(lightweightRazorViewEngine);
        }
开发者ID:vassildinev,项目名称:Smart-Connect,代码行数:7,代码来源:ViewEnginesConfig.cs

示例2: RegisterViewEngines

 public static void RegisterViewEngines(ViewEngineCollection viewEngines)
 {
     // 清除所有 View Engine
     viewEngines.Clear();
     // 重新註冊 RazorViewEngine,如果你使用的是 WebForm ViewEngine 則是加入 WebFormViewEngine
     viewEngines.Add(new RazorViewEngine());
 }
开发者ID:ian90911,项目名称:MVCClass_HW_20150704_CustomerMaintain,代码行数:7,代码来源:ViewEngineConfig.cs

示例3: RegisterViewEngine

        public static void RegisterViewEngine(ViewEngineCollection viewEngines)
        {
            viewEngines.Clear();

            var PMIViewEngine = new PMIViewEngine();

            viewEngines.Add(PMIViewEngine);
        }
开发者ID:fekaputra,项目名称:pmi,代码行数:8,代码来源:Global.asax.cs

示例4: RegisterEngines

        public static void RegisterEngines(ViewEngineCollection viewEngines)
        {
            // Removes WebForms view engine - optimization
            viewEngines.Clear();

            // viewEngines.Add(new CustomViewLocationRazorViewEngine());
            viewEngines.Add(new RazorViewEngine());
        }
开发者ID:mpenchev86,项目名称:ASP.NET-MVC-FinalProject,代码行数:8,代码来源:ViewEnginesConfig.cs

示例5: RegisterViewEngines

 public static void RegisterViewEngines(ViewEngineCollection viewEngines)
 {
     viewEngines.Clear();
     viewEngines.Add(new RazorViewEngine());
     viewEngines.Add(new LoggingViewEngine.LoggingViewEngine());
     viewEngines.Add(new PdfViewEngine.PdfViewEngine());
     viewEngines.Add(new MailerViewEngine.MailerViewEngine());
 }
开发者ID:GroM,项目名称:Shaver,代码行数:8,代码来源:Global.asax.cs

示例6: RegisterViewEngine

        public static void RegisterViewEngine(ViewEngineCollection viewEngines)
        {
            // We do not need the default view engine
            viewEngines.Clear();

            var templateableRazorViewEngine = new TemplateWebformViewEngine {
                CurrentTemplate = httpContext => httpContext.Request["template"] as string ??  string.Empty
            };

            viewEngines.Add(templateableRazorViewEngine);
        }
开发者ID:jsingh,项目名称:DeepBlue,代码行数:11,代码来源:Global.asax.cs

示例7: Install

        public static void Install(ViewEngineCollection engines)
        {
            if (engines == null)
                throw new ApplicationException("ViewEngines.Engines Found");

            var sparkSettings = GetSparkSettings(Assembly.GetCallingAssembly());
            var sparkViewFactory = new SparkViewFactory(sparkSettings);

            engines.Clear();
            engines.Add(sparkViewFactory);
        }
开发者ID:mattonfoot,项目名称:CI-Wallboard-Monitor,代码行数:11,代码来源:SparkEngineInstaller.cs

示例8: RegisterViewEngines

        public static void RegisterViewEngines(ViewEngineCollection engines)
        {
            var engine = new MobileCapableWebFormViewEngine();
            engine.DeviceFolders.Clear();
            engine.DeviceFolders.Add("Mozilla", "iPhone");
            engine.DeviceFolders.Add("Safari", "iPhone");
            engine.DeviceFolders.Add("Chrome", "iPhone");

            engines.Clear();
            engines.Add(engine);
        }
开发者ID:nbclark,项目名称:SportsLink,代码行数:11,代码来源:Global.asax.cs

示例9: RegisterViewEngine

        public static void RegisterViewEngine(ViewEngineCollection viewEngines)
        {
            // We do not need the default view engine
            viewEngines.Clear();

            var themeableRazorViewEngine = new ThemeableRazorViewEngine
                                               {
                                                   CurrentTheme = httpContext => httpContext.Session["theme"] as string ?? string.Empty
                                               };

            viewEngines.Add(themeableRazorViewEngine);
        }
开发者ID:azcoov,项目名称:MvcRazorThemableViewEngine,代码行数:12,代码来源:Global.asax.cs

示例10: RegisterViewEngine

        public static void RegisterViewEngine(ViewEngineCollection viewEngines)
        {
            // We do not need the default view engine

            viewEngines.Clear();

            var basePath = ConfigurationManager.AppSettings["ThemeBasePath"];
            var themeName = ConfigurationManager.AppSettings["ThemeName"];

            var theme = new Theme(basePath,themeName);

            var themeableRazorViewEngine = new ThemedRazorViewEngine(theme);

            viewEngines.Add(themeableRazorViewEngine);
        }
开发者ID:FikirFokur,项目名称:themedRazorViewEngine,代码行数:15,代码来源:Global.asax.cs

示例11: RegisterViewEngine

        public static void RegisterViewEngine(ViewEngineCollection viewEngines)
        {
            //// We do not need the default view engine
            viewEngines.Clear();

            //var adminTemplateRazorViewEngine = new AdminTemplateRazorViewEngine {
            //    CurrentTemplate = httpContext => httpContext.Session["theme"] as string
            //};

            //viewEngines.Add(adminTemplateRazorViewEngine);

            var templateRazorViewEngine = new TemplateRazorViewEngine {
                CurrentTemplate = httpContext => httpContext.Session["theme"] as string
            };

            viewEngines.Add(templateRazorViewEngine);
        }
开发者ID:eternalwt,项目名称:CMS,代码行数:17,代码来源:Global.asax.cs

示例12: Register

 public static void Register(ViewEngineCollection engines)
 {
     engines.Clear();
     engines.Add(new RazorViewEngine());
 }
开发者ID:simeonpp,项目名称:Trip-Destination,代码行数:5,代码来源:ViewEnginesConfig.cs

示例13: RegisterViewEngines

 internal static void RegisterViewEngines(ViewEngineCollection viewEngineCollection)
 {
     viewEngineCollection.Clear();
     viewEngineCollection.Add(new RazorViewEngine());
 }
开发者ID:yasenm,项目名称:NewsSystem,代码行数:5,代码来源:ViewEnginesConfiguration.cs

示例14: RegisterViewEngines

 private void RegisterViewEngines(ViewEngineCollection viewEngineCollection)
 {
     viewEngineCollection.Clear();
     viewEngineCollection.Add(new RazorViewEngine());
 }
开发者ID:ahaydara,项目名称:html5_learning,代码行数:5,代码来源:Global.asax.cs

示例15: AddFeatureViewViewEngine

 private static void AddFeatureViewViewEngine(ViewEngineCollection views)
 {
     views.Clear();
     views.Add(new FeatureViewLocationRazorViewEngine());
 }
开发者ID:michael-wolfenden,项目名称:ContosoUniversity,代码行数:5,代码来源:ViewEngines.cs


注:本文中的ViewEngineCollection.Clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。