Esempio n. 1
0
        public void start_with_only_the_folder_name_with_an_IActivator()
        {
            var servicePath = ".".ToFullPath().ParentDirectory().ParentDirectory().ParentDirectory().AppendPath("SampleService");

            using (var runner = new RemoteServiceRunner(servicePath))
            {
                runner.WaitForServiceToStart <SampleService.SampleService>();
                runner.Started.Any().ShouldBeTrue();
            }
        }
Esempio n. 2
0
        public void Start(object listener, Action <RemoteDomainExpression> configuration = null)
        {
            _runner = RemoteServiceRunner.For <RemoteFubuMvcBootstrapper>(x => {
                x.RequireAssemblyContainingType <EmbeddedFubuMvcServer>(AssemblyCopyMode.SemVerCompatible);
                x.RequireAssemblyContainingType <RemoteFubuMvcProxy>(AssemblyCopyMode.SemVerCompatible);
                x.RequireAssemblyContainingType <RemoteServiceRunner>(AssemblyCopyMode.SemVerCompatible);
                x.RequireAssemblyContainingType <Owin.IAppBuilder>();
                x.RequireAssemblyContainingType <IActivator>();                                       // Bottles
                x.RequireAssemblyContainingType <IModelBinder>();                                     // FubuCore
                x.RequireAssemblyContainingType <FubuApplication>(AssemblyCopyMode.SemVerCompatible); // FubuMVC.Core
                x.RequireAssemblyContainingType <HtmlTag>(AssemblyCopyMode.SemVerCompatible);         // HtmlTags
                x.RequireAssemblyContainingType <FubuCsProjFile.CodeFile>();                          // FubuCsProjFile just to keep it from whining
                x.RequireAssemblyContainingType <DiagnosticChainsSource>(AssemblyCopyMode.SemVerCompatible);
                x.RequireAssemblyContainingType <SparkViewEngine>(AssemblyCopyMode.SemVerCompatible);
                x.RequireAssemblyContainingType <SparkTemplate>(AssemblyCopyMode.SemVerCompatible);

                x.RequireAssembly("Microsoft.Owin.Hosting");
                x.RequireAssembly("Microsoft.Owin.Host.HttpListener");
                x.RequireAssembly("Microsoft.Owin");
                x.RequireAssembly("Owin");

                x.ServiceDirectory = _request.DirectoryFlag;

                if (_request.ConfigFlag.IsNotEmpty())
                {
                    x.Setup.ConfigurationFile = _request.ConfigFlag;
                }

                x.Setup.PrivateBinPath = _request.DetermineBinPath();

                if (configuration != null)
                {
                    configuration(x);
                }

                Console.WriteLine("Assembly bin path is " + x.Setup.PrivateBinPath);
                Console.WriteLine("The configuration file is " + x.Setup.ConfigurationFile);
            });

            _runner.WaitForServiceToStart <RemoteFubuMvcBootstrapper>();

            _runner.Messaging.AddListener(listener);



            _runner.SendRemotely(new StartApplication
            {
                ApplicationName              = _request.ApplicationFlag,
                PhysicalPath                 = _request.DirectoryFlag,
                PortNumber                   = PortFinder.FindPort(_request.PortFlag),
                UseProductionMode            = _request.ProductionModeFlag,
                AutoRefreshWebSocketsAddress = _request.AutoRefreshWebSocketsAddress
            });
        }
Esempio n. 3
0
        public void Start(object listener, Action<RemoteDomainExpression> configuration = null)
        {
            _runner = RemoteServiceRunner.For<RemoteFubuMvcBootstrapper>(x => {
                x.RequireAssemblyContainingType<EmbeddedFubuMvcServer>(AssemblyCopyMode.SemVerCompatible);
                x.RequireAssemblyContainingType<RemoteFubuMvcProxy>(AssemblyCopyMode.SemVerCompatible);
                x.RequireAssemblyContainingType<RemoteServiceRunner>(AssemblyCopyMode.SemVerCompatible);
                x.RequireAssemblyContainingType<Owin.IAppBuilder>();
                x.RequireAssemblyContainingType<IActivator>(); // Bottles
                x.RequireAssemblyContainingType<IModelBinder>(); // FubuCore
                x.RequireAssemblyContainingType<StringToken>(); // FubuLocalization
                x.RequireAssemblyContainingType<FubuApplication>(); // FubuMVC.Core
                x.RequireAssemblyContainingType<FubuCsProjFile.CodeFile>(); // FubuCsProjFile just to keep it from whining

                x.RequireAssembly("Newtonsoft.Json");
                x.RequireAssembly("FubuMVC.OwinHost");
                x.RequireAssembly("Microsoft.Owin.Hosting");
                x.RequireAssembly("Microsoft.Owin.Host.HttpListener");
                x.RequireAssembly("Microsoft.Owin");
                x.RequireAssembly("Owin");

                x.ServiceDirectory = _request.DirectoryFlag;

                if (_request.ConfigFlag.IsNotEmpty())
                {
                    x.Setup.ConfigurationFile = _request.ConfigFlag;
                }

                x.Setup.PrivateBinPath = _request.DetermineBinPath();

                if (configuration != null)
                {
                    configuration(x);
                }

                Console.WriteLine("Assembly bin path is " + x.Setup.PrivateBinPath);
                Console.WriteLine("The configuration file is " + x.Setup.ConfigurationFile);
            });

            _runner.WaitForServiceToStart<RemoteFubuMvcBootstrapper>();

            _runner.Messaging.AddListener(listener);

            _runner.SendRemotely(new StartApplication
            {
                ApplicationName = _request.ApplicationFlag,
                PhysicalPath = _request.DirectoryFlag,
                PortNumber = PortFinder.FindPort(_request.PortFlag),
                UseProductionMode = _request.ProductionModeFlag
            });
        }
Esempio n. 4
0
        public void Start(object listener, Action<RemoteDomainExpression> configuration = null)
        {
            _runner = RemoteServiceRunner.For<RemoteFubuMvcBootstrapper>(x =>
            {
                x.RequireAssemblyContainingType<RemoteFubuMvcProxy>(AssemblyCopyMode.SemVerCompatible);
                x.RequireAssemblyContainingType<IAppBuilder>();
                x.RequireAssemblyContainingType<IModelBinder>(); // FubuCore
                x.RequireAssemblyContainingType<FubuRuntime>(AssemblyCopyMode.SemVerCompatible); // FubuMVC.Core
                x.RequireAssemblyContainingType<HtmlTag>(AssemblyCopyMode.SemVerCompatible); // HtmlTags

                x.RequireAssembly("Microsoft.Owin.Hosting");
                x.RequireAssembly("Microsoft.Owin.Host.HttpListener");
                x.RequireAssembly("Microsoft.Owin");
                x.RequireAssembly("Owin");

                x.ServiceDirectory = _request.DirectoryFlag;

                if (_request.ConfigFlag.IsNotEmpty())
                {
                    x.Setup.ConfigurationFile = _request.ConfigFlag;
                }

                x.Setup.PrivateBinPath = _request.DetermineBinPath();

                if (configuration != null)
                {
                    configuration(x);
                }

                Console.WriteLine("Assembly bin path is " + x.Setup.PrivateBinPath);
                Console.WriteLine("The configuration file is " + x.Setup.ConfigurationFile);
            });

            _runner.WaitForServiceToStart<RemoteFubuMvcBootstrapper>();

            _runner.Messaging.AddListener(listener);


            _runner.SendRemotely(new StartApplication
            {
                ApplicationName = _request.RegistryFlag,
                PhysicalPath = _request.DirectoryFlag,
                PortNumber = PortFinder.FindPort(_request.PortFlag),
                Mode = _request.ModeFlag,
                AutoRefreshWebSocketsAddress = _request.AutoRefreshWebSocketsAddress
            });
        }
Esempio n. 5
0
        public void Start(object listener, Action <RemoteDomainExpression> configuration = null)
        {
            _runner = RemoteServiceRunner.For <RemoteFubuMvcBootstrapper>(x => {
                x.RequireAssemblyContainingType <EmbeddedFubuMvcServer>();
                x.RequireAssemblyContainingType <RemoteFubuMvcProxy>();
                x.RequireAssemblyContainingType <RemoteServiceRunner>();
                x.RequireAssemblyContainingType <Owin.IAppBuilder>();
                x.RequireAssemblyContainingType <IActivator>();              // Bottles
                x.RequireAssemblyContainingType <IModelBinder>();            // FubuCore
                x.RequireAssemblyContainingType <StringToken>();             // FubuLocalization
                x.RequireAssemblyContainingType <FubuApplication>();         // FubuMVC.Core
                x.RequireAssemblyContainingType <FubuCsProjFile.CodeFile>(); // FubuCsProjFile just to keep it from whining

                x.RequireAssembly("Owin.Extensions");
                x.RequireAssembly("Newtonsoft.Json");
                x.RequireAssembly("FubuMVC.OwinHost");
                x.RequireAssembly("Microsoft.Owin.Hosting");
                x.RequireAssembly("Microsoft.Owin.Host.HttpListener");
                x.RequireAssembly("Microsoft.Owin");
                x.RequireAssembly("Owin");

                x.ServiceDirectory = _request.DirectoryFlag;

                x.Setup.PrivateBinPath = _request.DetermineBinPath();

                if (configuration != null)
                {
                    configuration(x);
                }

                Console.WriteLine("Assembly bin path is " + x.Setup.PrivateBinPath);
            });

            _runner.WaitForServiceToStart <RemoteFubuMvcBootstrapper>();

            _runner.Messaging.AddListener(listener);



            _runner.SendRemotely(new StartApplication
            {
                ApplicationName   = _request.ApplicationFlag,
                PhysicalPath      = _request.DirectoryFlag,
                PortNumber        = PortFinder.FindPort(_request.PortFlag),
                UseProductionMode = _request.ProductionModeFlag
            });
        }
 public void start_with_only_the_folder_name_with_an_IActivator()
 {
     var servicePath = ".".ToFullPath().ParentDirectory().ParentDirectory().ParentDirectory().AppendPath("SampleService");
     using (var runner = new RemoteServiceRunner(servicePath))
     {
         runner.WaitForServiceToStart<SampleService.SampleService>();
         runner.Started.Any().ShouldBeTrue();
     }
 }