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


C# INancyBootstrapper.GetEngine方法代码示例

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


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

示例1: Browser

 /// <summary>
 /// Initializes a new instance of the <see cref="Browser"/> class.
 /// </summary>
 /// <param name="bootstrapper">A <see cref="INancyBootstrapper"/> instance that determines the Nancy configuration that should be used by the browser.</param>
 /// <param name="defaults">The default <see cref="BrowserContext"/> that should be used in a all requests through this browser object.</param>
 public Browser(INancyBootstrapper bootstrapper, Action<BrowserContext> defaults = null)
 {
     bootstrapper.Initialise();
     this.engine = bootstrapper.GetEngine();
     this.environment = bootstrapper.GetEnvironment();
     this.defaultBrowserContext = defaults ?? DefaultBrowserContext;
 }
开发者ID:VPashkov,项目名称:Nancy,代码行数:12,代码来源:Browser.cs

示例2: NancyEvent2Host

		public NancyEvent2Host(string host, int port, INancyBootstrapper bootstrapper)
		{
			_host = host;
			_port = port;
			_bootstrapper = bootstrapper;
			_bootstrapper.Initialise();
			_engine = _bootstrapper.GetEngine();
		}
开发者ID:kekekeks,项目名称:Nancy.Hosting.Event.2,代码行数:8,代码来源:NancyEvent2Host.cs

示例3: NancyHost

        public NancyHost(Uri baseUri, INancyBootstrapper bootStrapper)
        {
            this.baseUri = baseUri;
            listener = new HttpListener();
            listener.Prefixes.Add(baseUri.ToString());

            engine = bootStrapper.GetEngine();
        }
开发者ID:avlasova,项目名称:Nancy,代码行数:8,代码来源:NancyHost.cs

示例4: NancyHost

        /// <summary>
        /// Initializes a new instance of the <see cref="NancyHost"/> class for the specified <paramref name="baseUris"/>, using
        /// the provided <paramref name="bootstrapper"/>.
        /// Uses the specified configuration.
        /// </summary>
        /// <param name="bootstrapper">The bootstrapper that should be used to handle the request.</param>
        /// <param name="configuration">Configuration to use</param>
        /// <param name="baseUris">The <see cref="Uri"/>s that the host will listen to.</param>
        public NancyHost(INancyBootstrapper bootstrapper, HostConfiguration configuration, params Uri[] baseUris)
        {
            this.bootstrapper = bootstrapper;
            this.configuration = configuration ?? new HostConfiguration();
            this.baseUriList = baseUris;

            bootstrapper.Initialise();
            this.engine = bootstrapper.GetEngine();
        }
开发者ID:afwilliams,项目名称:Nancy,代码行数:17,代码来源:NancyHost.cs

示例5: NancyEvent2Host

        public NancyEvent2Host(string host, int port, INancyBootstrapper bootstrapper, int workers)
        {
            _host = host;
            _port = port;
            _workers = workers;

            bootstrapper.Initialise();
            _engine = bootstrapper.GetEngine();
        }
开发者ID:kekekeks,项目名称:evhttp-sharp,代码行数:9,代码来源:NancyEvent2Host.cs

示例6: NancyHost

        /// <summary>
        /// Initializes a new instance of the <see cref="NancyHost"/> class for the specfied <paramref name="baseUris"/>, using
        /// the provided <paramref name="bootstrapper"/>.
        /// </summary>
        /// <param name="bootstrapper">The boostrapper that should be used to handle the request.</param>
        /// <param name="baseUris">The <see cref="Uri"/>s that the host will listen to.</param>
        public NancyHost(INancyBootstrapper bootstrapper, params Uri[] baseUris)
        {
            baseUriList = baseUris;
            listener = new HttpListener();

            foreach (var baseUri in baseUriList)
            {
                listener.Prefixes.Add(baseUri.ToString().Replace("localhost", "+"));
            }

            bootstrapper.Initialise();
            engine = bootstrapper.GetEngine();
        }
开发者ID:raoulmillais,项目名称:Nancy,代码行数:19,代码来源:NancyHost.cs

示例7: NancyHost

        public NancyHost(INancyBootstrapper bootStrapper, params Uri[] baseUris)
        {
            baseUriList = baseUris;
            listener = new HttpListener();

            foreach (var baseUri in baseUriList)
            {
                var prefix = baseUri.ToString();

                if (!baseUri.Host.Contains("."))
                {
                    prefix = prefix.Replace("localhost", "+");
                }

                listener.Prefixes.Add(prefix);
            }

            bootStrapper.Initialise();
            engine = bootStrapper.GetEngine();
        }
开发者ID:3vr,项目名称:Nancy,代码行数:20,代码来源:NancyHost.cs

示例8: NancyWindsorOwinHost

        /// <summary>
        /// Initializes a new instance of the <see cref="Nancy.Hosting.Owin.NancyOwinHost"/> class.
        /// </summary>
        /// <param name="bootstrapper">The bootstrapper that should be used by the host.</param>
        public NancyWindsorOwinHost(INancyBootstrapper bootstrapper)
        {
            bootstrapper.Initialise();

            engine = bootstrapper.GetEngine();
        }
开发者ID:akurdyukov,项目名称:NancyKayakDemo,代码行数:10,代码来源:NancyWindsorOwinHost.cs

示例9: NancyWcfGenericService

 /// <summary>
 /// Initializes a new instance of the <see cref="NancyWcfGenericService"/> class, with the provided <paramref name="bootstrapper"/>.
 /// </summary>
 /// <param name="bootstrapper">An <see cref="INancyBootstrapper"/> instance, that should be used to handle the requests.</param>
 public NancyWcfGenericService(INancyBootstrapper bootstrapper)
 {
     bootstrapper.Initialise();
     this.engine = bootstrapper.GetEngine();
 }
开发者ID:tischlda,项目名称:Nancy,代码行数:9,代码来源:NancyWcfGenericService.cs

示例10: NancyOwinHost

        /// <summary>
        /// Initializes a new instance of the <see cref="NancyOwinHost"/> class.
        /// </summary>
        /// <param name="bootstrapper">The bootstrapper that should be used by the host.</param>
        public NancyOwinHost(INancyBootstrapper bootstrapper)
        {
            bootstrapper.Initialise();

            this.engine = bootstrapper.GetEngine();
        }
开发者ID:ChrisMH,项目名称:Nancy,代码行数:10,代码来源:NancyOwinHost.cs

示例11: NancyWcfGenericService

 public NancyWcfGenericService(INancyBootstrapper bootstrapper)
 {
     engine = bootstrapper.GetEngine();
 }
开发者ID:avlasova,项目名称:Nancy,代码行数:4,代码来源:NancyWcfGenericService.cs

示例12: NancyTestingWebClient

 public NancyTestingWebClient(INancyBootstrapper bootstrapper)
     : this(bootstrapper.GetEngine())
 {
 }
开发者ID:Pomona,项目名称:Pomona,代码行数:4,代码来源:NancyTestingWebClient.cs

示例13: NancyHost

        public NancyHost(IPAddress address, int port, INancyBootstrapper bootStrapper)
        {
            var filter = new LogFilter();
            filter.AddStandardRules();
            LogFactory.Assign(new ConsoleLogFactory(filter));
            server = new Server();

            bootStrapper.Initialise();
            engine = bootStrapper.GetEngine();

            // same as previous example.
            AppiaModule module = new AppiaModule(engine);
            server.Add(module);
        }
开发者ID:aqueduct,项目名称:Appia,代码行数:14,代码来源:NancyHost.cs


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