Beispiel #1
0
        public static void Start()
        {
            _server = new SelfHostHttpServer(5501, GetRootDirectory());
            var runtime = FubuApplication.For <HarnessRegistry>().StructureMap(new Container()).Bootstrap();

            _server.Start(runtime);

            var urls = runtime.Factory.Get <IUrlRegistry>();

            urls.As <UrlRegistry>().RootAt(_server.BaseAddress);

            UrlContext.Stub(_server.BaseAddress);

            _endpoints = new EndpointDriver(urls, _server.BaseAddress);
        }
Beispiel #2
0
        public static void Start()
        {
            FubuMvcPackageFacility.PhysicalRootPath = GetRootDirectory();

            _server = new SelfHostHttpServer(5500, GetRootDirectory());
            var runtime = bootstrapRuntime();


            _server.Start(runtime);

            var urls = runtime.Factory.Get <IUrlRegistry>();

            urls.As <UrlRegistry>().RootAt(_server.BaseAddress);

            UrlContext.Stub(_server.BaseAddress);

            _endpoints = new EndpointDriver(urls);
        }
        public Harness(FubuRuntime runtime, int port)
        {
            _runtime = runtime;

            _server = new SelfHostHttpServer(port, GetApplicationDirectory());
            _server.Start(runtime);
            _port = _server.Port;

            var urls = _runtime.Factory.Get <IUrlRegistry>();

            urls.As <UrlRegistry>().RootAt(_server.BaseAddress);

            UrlContext.Stub(_server.BaseAddress);

            _remote = new Lazy <RemoteBehaviorGraph>(() =>
            {
                return(new RemoteBehaviorGraph(_server.BaseAddress));
            });

            _endpoints = new EndpointDriver(urls);
        }
        public static void Start()
        {
            _server = new SelfHostHttpServer(5501, GetRootDirectory());
            var runtime = FubuApplication.For<HarnessRegistry>().StructureMap(new Container()).Bootstrap();

            _server.Start(runtime);

            var urls = runtime.Factory.Get<IUrlRegistry>();
            urls.As<UrlRegistry>().RootAt(_server.BaseAddress);

            UrlContext.Stub(_server.BaseAddress);

            _endpoints = new EndpointDriver(urls);
        }