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


C# FubuRegistry.HostWith方法代码示例

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


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

示例1: Start

        public void Start()
        {
            _controller = _input.BuildRemoteController();
            var context = new StorytellerContext(_controller, _input);

            if (_controller.BinPath.IsEmpty())
            {
                throw new Exception("Could not determine any BinPath for the testing AppDomain. Has the Storyteller specification project been compiled, \nor is Storyteller using the wrong compilation target maybe?\n\ntype 'st.exe ? open' or st.exe ? run' to see the command usages\n\n");
            }

            context.Start();

            var registry = new FubuRegistry();


            registry.AlterSettings<DiagnosticsSettings>(_ => _.TraceLevel = TraceLevel.Verbose);
            registry.Mode = "development";
            registry.HostWith<NOWIN>();
            registry.Services.For<IRemoteController>().Use(_controller);
            registry.Services.For<StorytellerContext>().Use(context);
            
            registry.Services.IncludeRegistry<WebApplicationRegistry>();


            _server = registry.ToRuntime();
        }
开发者ID:jamesmanning,项目名称:Storyteller,代码行数:26,代码来源:WebApplicationRunner.cs

示例2: Initialize

        public void Initialize(Type applicationType, StartApplication message)
        {
            _registry = Activator.CreateInstance(applicationType).As<FubuRegistry>();
            _registry.RootPath = message.PhysicalPath;
            _registry.Port = PortFinder.FindPort(message.PortNumber);
            _registry.Mode = message.Mode;

            _registry.AlterSettings<OwinSettings>(owin =>
            {
                owin.AddMiddleware<HtmlHeadInjectionMiddleware>().Arguments.With(new InjectionOptions
                {
                    Content = c => message.HtmlHeadInjectedText
                });
            });

            if (_registry.Host == null) _registry.HostWith<Katana>();

            StartUp();
        }
开发者ID:kingreatwill,项目名称:fubumvc,代码行数:19,代码来源:FubuMvcApplicationActivator.cs

示例3: serverFor

        private FubuRuntime serverFor(Action<OwinSettings> action)
        {
            var registry = new FubuRegistry();
            registry.AlterSettings(action);
            registry.HostWith<Katana>();

            return registry.ToRuntime();
        }
开发者ID:cothienlac86,项目名称:fubumvc,代码行数:8,代码来源:using_custom_middleware.cs


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