示例#1
0
 public ModuleControlPipeline(
     WebFormsModuleControlFactory webforms,
     Html5ModuleControlFactory html5,
     RazorModuleControlFactory razor3,
     MvcModuleControlFactory mvc,
     ReflectedModuleControlFactory fallthrough)
 {
     _controlFactories = new Dictionary <string, IModuleControlFactory>(StringComparer.OrdinalIgnoreCase);
     _controlFactories.Add(".ascx", webforms);
     _controlFactories.Add(".htm", html5);
     _controlFactories.Add(".html", html5);
     _controlFactories.Add(".cshtml", razor3);
     _controlFactories.Add(".vbhtml", razor3);
     _controlFactories.Add(".mvc", mvc);
     _controlFactories.Add("default", fallthrough);
 }
        /// <summary>Initializes a new instance of the <see cref="ModuleControlPipeline"/> class.</summary>
        /// <param name="webforms">The <see cref="WebFormsModuleControlFactory"/>.</param>
        /// <param name="html5">The <see cref="Html5ModuleControlFactory"/>.</param>
        /// <param name="razor3">The <see cref="RazorModuleControlFactory"/>.</param>
        /// <param name="mvc">The <see cref="MvcModuleControlFactory"/>.</param>
        /// <param name="fallthrough">The <see cref="ReflectedModuleControlFactory"/>.</param>
        public ModuleControlPipeline(
            WebFormsModuleControlFactory webforms,
            Html5ModuleControlFactory html5,
#pragma warning disable CS0618 // Obsolete
            RazorModuleControlFactory razor3,
#pragma warning restore CS0618 // Obsolete
            MvcModuleControlFactory mvc,
            ReflectedModuleControlFactory fallthrough)
        {
            this.controlFactories = new Dictionary <string, IModuleControlFactory>(StringComparer.OrdinalIgnoreCase);
            this.controlFactories.Add(".ascx", webforms);
            this.controlFactories.Add(".htm", html5);
            this.controlFactories.Add(".html", html5);
            this.controlFactories.Add(".cshtml", razor3);
            this.controlFactories.Add(".vbhtml", razor3);
            this.controlFactories.Add(".mvc", mvc);
            this.controlFactories.Add("default", fallthrough);
        }